copy a database within SQL Server Express?
Solution 1:
In SSMS 2008 you can do this:
Create a backup of the database you want to copy
In SSMS, right-click 'Databases' and select 'Restore Database'
Select the database you wish to copy from the 'From database' drop-down list in the 'Source for restore' section
Enter the name of the new database in the 'To database' field in the 'Destination for Restore' section - this cannot be the name of an existing database.
Click OK
You're done! :)
Solution 2:
In SQL Server Express 2012 you can do following steps:
- Create a backup of the database you want to copy
- right-click "Databases" and select "Restore Files and Filegroups"
- Enter the name of the new database in the "To database" field.
- Select "From device" and then select the file that you backuped in the first step
- click "OK"
this will "clone" the Database with the correct table settings such as the "default value" and "auto increase" etc.
Solution 3:
SQL Express database has an export button, I just exported the database to a new database on the same server, it is copying the database. Just right-click on the database name.