Copy and append of database
(a) Separation:
1. Stop the SQL Server service and copy the. mdf and. Ldf,ndf. Then start the service again.
2. In the SQL Server operator interface, right-click the database you want to copy-all Tasks-detach. Copy the. mdf and. Ldf,ndf.
(ii) additional
In SQL Server Object Explorer, right-click on "Database"--select "Attach"--in the pop-up window select the. mdf file you want to attach, click OK.
Note: two files. mdf and. LDF should have access rights. Everyone has full control.
Backup and restore of the database.
(a) Backup:
In Object Explorer, right-click the database you want to back up, select Tasks--Backup, and in the pop-up window, in target, add the file you want to back up to. Click OK.
(ii) Restoration:
1. First build a data with the same name.
2. Right-click on the database with the same name--"task"--"restore"-"database". In the pop-up window, select "Source Device" in the "restored source"--Add the database backup file that you backed up before, tick it. Click OK.
Note: If you have a database file that has a different path than the one where you created the database file, you should override the existing database file path by changing the path from options in the Restore Database dialog box.
SQL (4)-Replication and attach, backup, and restore of databases