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 the "target", add the file to which you want to back up. Click OK. (b) Restore: 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. Separation and addition of databases (one) 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. (b) Attach 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.
SQL Backup Restore Detach append