How to Restore/Replace or Back up a Database using SQL Management Studio

SQL Server Management Option

When restoring or replacing a database on a server, the Active Directory Group will need to be remapped once the database is restored. 

Restore a backup database

To restore your database, do the following:

  1. Launch SQL Server Management Studio (SSMS) and connect to your SQL Server instance.

  2. Right-click the Databases node in Object Explorer and select Restore Database...

  3. Select Device: from the Source tab and then select the ellipses (...) to locate your backup file.

  4. Select Add and navigate to where your .bak file is located. Select the .bak file and then select OK.

  5. Select OK to close the Select backup devices dialog box.

  6. Select OK to restore the backup of your database.

Replacing a database bak file with Overwrite 

If you are overwriting the database with a new one, then click the Options page and check the "Overwrite with existing database (WITH REPLACE)" then click OK. 

Note: If you get an error overwriting a database, then more than likely there are still users connected to the database and the database will need to be taken offline and then back online.

 
 
1. Right-click the database > Task > Take Offline
 
2. Check the Drop all Active Connection then click OK. 
 
3. Next bring the database back Online and then follow the steps above to Replace the database. Once that is done then you need to Remap the Login credentials.
 

Mapping Login Credentials to the database. 

After the database is restored, then the next step is to map login credentials to the database. In the link, the areas to focus on are:
1. mapping the login credentials to the database/s
2. adding write access to the cost database (if it's a cost database).  
3. adding permissions to the DESTINIData database (this is only done if you are replacing that database)
 
 Note 6: During Implementation, there may be several databases sent from the Implementation Lead to get restored and remapped on the server.

Making a backup

To take a backup of your database, do the following:

  1. Launch SQL Server Management Studio (SSMS) and connect to your SQL Server instance.
  2. Expand the Databases node in Object Explorer.
  3. Right-click the database, hover over Tasks and select Back up...
  4. Under Destination, confirm the path for your backup is correct. If you need to change this, select Remove to remove the existing path, and then Add to type in a new path. You can use the ellipses to navigate to a specific file.
  5. Select OK to take a backup of your database.