Back Up, Move & Restore a Database

Database Overview

SQL System Administrator (sa) credentials are required to back up or restore a database if the SQL Server instance is not a TDG instance (a SQL Server Express instance provided with the MERL installer).

A backup of the MERL database takes a snapshot of the entire database. The backup is stored on the database server’s hard drive by default.

Backing up data is essential, unless data loss is not a primary concern. At a minimum, backups should always be performed prior to ALL import of data into MERL and also before ALL updates.

There are three different ways to manage databases in MERL:

The Options menu located within the MERL User Login screen

The Tools menu in MERL

The Database Manager, a separate utility installed with MERL

Option 1 – The User Login screen
Log in to MERL. Select the Options button on the User Login screen. Within this menu you can back up, restore, create, and switch the active database.

Option 2 – The Tools menu
Open the Tools menu in MERL. Within this menu you can back up and restore databases before making significant edits or importing data into MERL.

Option 3 – The Database Manager Utility
Open the MERL Database Manager Utility located on your desktop as an icon. (By default, installing MERL adds this shortcut to your desktop and start menu).
‎Within this menu, you will have the option to backup, restore, and delete MERL databases.

Back Up a Database

To create an online backup, see the instructions to Create, Restore, or Delete an Online Backup in MERL.

Select the Options… button from the MERL User Login window.

The MERL User Login window displays when MERL is first opened. If MERL has already been logged in, exit and reopen MERL to access this window.

Select Back up Database… from the menu to open the Backup Database window.

Picture 1

Select a Server using one of the following methods:

Select a server from the dropdown menu.

Enter a valid SQL Server Instance name (not case sensitive).

Select <browse for more> from the dropdown menu.

Select a database from the dropdown menu, or use Browse Server for DBs to locate a database.

Optional: Enter a Name and Description for the backup.

Select the Browse button (the folder icon) to select a location for the backup. If a selection is not made, the default backup location will be selected.

Typically, the default location is:

C:\Program Files\Microsoft SQL Server\MSSQL11.MSSQLSERVER\MSSQL\Backup

When making a backup to move the existing database to a new server, select a backup location on the server machine (it cannot be copied to a network drive). Once the backup is created, copy the backup file to a network drive or flash drive.

Select the Create Backup button.

C:\Users\CREYNO~1\AppData\Local\Temp\SNAGHTMLad6daa3f.PNG

Agencies not using SQL Express provided with MERL will need to enter the sa password to complete the backup. Contact agency technical support staff to obtain this password if it has not already been provided.

Enter the sa password and select the OK button. Select Try TDG Passwords if it is believed that SQL Server Express is installed (provided with the MERL installer), not the enterprise version SQL Server (or other paid for version).

If a backup file with the same name already exists, the Overwrite Backup File window will appear with the option to overwrite the existing file. Select the OK button to confirm backup overwrite.

Move Database

MERL databases can be moved from server to server after completing a backup. Follow the instructions on how to Back Up a Database.

Once a backup is created on the old server, copy the backup directly on the new server, to a shared network location, or a flash drive.

If the file is copied to a shared network drive or flash drive, locate the backup copy from the new server and save it to the new server.

The backup file must be saved on one of the server’s physical drives. It cannot be restored from a network path or a flash drive.

Complete the instructions on how to Restore a Database.

Restore a Database

Restoring a MERL database completely overwrites the current database with the selected backup if the existing database name is used. It is not recommended to use SQL Server Management Studio to restore a database.

Select the Options… button from the MERL User Login window.

The MERL User Login window displays when MERL is first opened. If MERL has already been logged in, exit and reopen MERL to access this window.

Select Restore Database… from the menu to open the Restore Database window. Restore Database can also be found in the Tools menu and the Database Manager utility.

Picture 2

Select a Server using one of the following methods:

Select a server from the dropdown menu.

Enter a valid SQL Server Instance name (not case sensitive).

Select <browse for more> from the dropdown menu.

C:\Users\CREYNO~1\AppData\Local\Temp\SNAGHTMLad6daa3f.PNG

Agencies not using SQL Express provided with MERL will need to enter the sa password at this step. Contact agency technical support staff to obtain this password if it has not already been provided.

Select a backup source to restore:

To restore from a server backup:

Select the From Server radio button.

Select a backup from the Backups In Selected Device list.

To restore from a file backup:

Select the From File radio button.

Select a backup from a location on the server. Browse for the backup file from physical drives on the server computer (network shares will not be available for browsing).

Select the OK button.

Enter the database name in the Database field, or select the database from the drop-down.

A new database is created by typing a new name in the Database field, use the existing database name to overwrite the database with the backup file.

The database name must either be “MERL” or begin with “MERL”.

Select the Restore button.

Select OK to confirm continuing with the restore, or select Cancel. Before logging into the restored database, select OK to confirm the restore was completed successfully.