How to transfer sql server mdf file to another SQL Express server?

I am trying to transfer a database.mdf file from a development environment to a SQL Server Express hosted on my VPS, but I cannot figure out how to connect the file to my database server. Help!

+1


source to share


4 answers


sp_attach_db

(or CREATE DATABASE FOR ATTACH) - don't forget to add the LDF files (log) as well.



+4


source


I'm not sure if you can, but you can use Sql Studio Management Express, which allows you to attach (and then attach) a database.



Your app can also use a local instance and connect directly to the .mdf database in the app.data folder.

+2


source


While you can use detach / attach it is recommended to use backup / restore (don't forget: SQL Server backup is online)

+1


source


0


source







All Articles