This guide is for skilled computer administrators with experience in working with databases. It is intended to help you restore an SQL database. However, this guide is in no way a basis for claims in case of data loss. The customer is solely responsible for ensuring a full, correct and recoverable backup of all data.
As described in “Setting up an SQL backup for BMD NTCS”, a correctly configured and working SQL backup is required!
First, you have to create a directory to which the database will be restored. In this example, we use the path C:\BMDDataBaseRESTORE.
From Windows 10 / Server 2016
Search for “SQL Server Management Studio” in the Windows Start menu or in the Windows task bar search box.
Alternatively, you can also find the program in Windows Explorer under the following path:
C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Microsoft SQL Server 20xx
Replace “xx” with the SQL version in use.
Older SQL Server versions have a slightly different path and name and can be found under the following path:
C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Microsoft SQL Server 20xx
PLEASE NOTE!
If Windows User Account Control (UAC) is active, you have to start SQL Server Management Studio by right-clicking and selecting “Run as administrator”!
In SQL Management Studio → right-click on “Databases” → Restore Database…
Select “Device” and click on the ellipsis button for more options.
Under “Backup media type” select “Backup device”, click on “Add” and select “Backup-BMD” as your backup device.
Alternatively, you have the option to enter the backup file instead of the backup device in “Backup media type”.
Enter the name of the new database (BMDRESTORE) and select which backup sets are to be restored. Under “Backup Timeline”, you can even select to restore the backup to a specific point in time.
In “Files”, the next page in the menu, you now have to define the new path for restoring the database. In this case we relocate the database files from “C:\BMDDataBase” to “C:\BMDDataBaseRESTORE”. In SQL 2012 or later versions, you can simply use the option “Relocate all files to folder”.
Under “Options”, you then have to make sure that “Take tail-log backup before restore” and “Leave source database in the restoring state” are not enabled:
You can now start to restore the database by clicking on “OK”.
If everything was set up correctly, you will see a progress bar in the upper right corner:
Once recovery of the database is complete, you should receive the following notification:
Now, you have to add the new alias name. To do so, start the program \BMDsoftware\BMDDBUpdate.exe and click on the icon next to the database name. Add the new database and confirm by clicking on “Accept”.
Then, you have to set the “Login mode” to “Windows login”. Clicking on “Log in” starts the program.
When the following window appears, exit the program by clicking on “Close”.
Now you can log in to the restored database:
Once the desired data have been exported, make sure to detach and delete the database to prevent users from continuing to work in the wrong database.