To back up the database manually:
1. Right-click on the database you want to back up-tasks-backup
On the General Options page you can choose whether the backup type is a full database backup or a differential database backup
2. Click the Add option to select the storage path for the database file.
Note the filename is appended with the suffix. bak to facilitate recovery when searching
Database restore:
Right-click Database-Restore Database-Add the database file path that needs to be restored
In the Restore source option you can select ' Source database ', ' source device '. 1. Selecting the Source database tool automatically displays some of the backups that were before the database, and then directly selects the database backup set that needs to be restored.
2. Select the source device click on the following ... to add the database files that need to be restored
Click Confirm to restore the database
Separation and addition of databases:
Detach Database:
1. After you start SSMs and connect to the database server, expand the server node in Object Explorer. Under Database objects, find the name of the database that needs to be detached, as an example of the Student_mis database. Right-click the Student_mis database and select Properties from the popup shortcut menu.
2. Select the Options object in the area below the Select page on the left side of the Database Properties window, and then find the status item in the other options list in the right area, click the Restrict Access text box, and choose Single_user in its drop-down list.
3. After clicking the "OK" button a message box will appear informing us that this operation will close all connections to this database, and after clicking the "Yes" button, the database name is added after the "individual user" is displayed. Right-click the database name, and in the shortcut menu, select the two-level menu item "Detach" for "task".
4. The Detach Database window lists the names of the databases we want to detach, and when the parameters are set, click the OK button at the bottom to complete the detach operation for the selected database.
Additional databases:
1. Copy the database files and log files that you want to attach to an already created folder.
2. Right-click the database object and select the Attach command from the shortcut menu to open the Attach Database window.
3. In the Attach Database window, click the Add button in the middle of the page to open the window that locates the database file, where you select the database file (suffix) to attach. MDF)
4. Click "OK" button to complete the installation of additional database files, click the OK button to complete the database additional tasks.
Database backup, restore, detach, attach