I have a database in my sql management studio how can script the database schema to file so that I can put it in another device?
thanks
I have a database in my sql management studio how can script the database schema to file so that I can put it in another device?
thanks
Shutdown SQL Server, copy the MDF and LDF Files to a new server and attach them on that instance by right clicking on Databases and choosing Attach. Specify the location of the files.
Alternatively, you could also backup the database from the source and restore it in the destination.
The above two methods copy all data too. If you want only the schema, Right click on the database and choose Generate SQL Scripts and follow the instructions.