(a), SQL Backup of the database :
1. Open Start menu → program →microsoft SQL Server 2008→SQL server Management studio→ database: dsideal_school_db is the database of students we need to back up
Figure (1)
2, select the database to be backed up "dsideal_school_db", right click → tasks → backup, (2):
Figure (2)
3. In the "Backup Database-dsideal_school_db" dialog box that opens, click Delete, then click "Add", (3):
Figure (3)
4. In the "Select Backup Destination" dialog box that pops up, (4)
Figure (4)
5, choose the path of the backup (such as the "D" Jiangxi-student-database backup folder), file type select "All Files", "file name" that location fill in the name of the database you want to back up (preferably after the name of the database you backed up with a date to facilitate later search), followed by a continuous click "OK" button to complete the backup operation of the database, (5):
Figure (5
(ii), SQL Restoring the database :
1. Select the database you want to restore "dsideal_school_db", right click → tasks → restore → database, (6):
Figure (6)
2. In the "Restore Database-school_web_db" dialog box that appears, select "Source Device", and then click on the "..." button later, (7):
Figure (7)
3. In the "Specify Backup" dialog box that appears, click the "Add" button, (8):
Figure (8)
4, find the path of the database backup, select the database you want to restore "dsideal_school_db" (Note: File type Select all files), and then " two times " click the "OK" button, (9):
Figure (9)
5. In the "Restore Database-dsideal_school_db" dialog box that appears, tick the check box before "Select the database under user restored backup set" (10)
Figure (10)
6. Then select "Option", tick "Overwrite existing database", (11):
Figure (11)
Third, restore the database problem solution
When restoring the database "dsideal_school_db", sometimes you will encounter the problem "because the database is in use, so you cannot gain exclusive access to the database", we can follow the following steps to resolve this problem
1. Right-click the database "dsideal_school_db" and select "Properties", as
2. In the Database Properties-dsideal_school_db dialog box that appears, select options, and in status under Other options, locate restrict access. Select "Single_user" and click "OK" button, such as:
3, follow the normal restore database steps, restore the database.
SQLServer2008 to modify the sa password with the SQL Server 2008 database backup and restore