Back up and Restore the Database

The backup utility backs up the Data Workbench QAS database to a single file so that if anything happens to the database, it can be restored to the point at which the backup was created. It is recommended that the backup be stored on a safe network location so that the backup file does not get lost if your local machine goes down. 

NOTE: The backup does not include any load files created. Load files need to be backed up separately to a safe network location.

Back up the Database

  1. Click on the Administration page.
  2. Click Backup Database.
  3. Type a name for the backup file.
  4. Select a file location to store the backup.
  5. Click Save.

 Restore a Database

To restore the QAS database, all the connections to QAS database must be closed. The default database owner, qasUser, does not have the permissions to kill all processes that use the QAS database. For this reason, you need to create a new sysadmin user for the SQL Server instance. Use the following SQL to create the necessary user.

NOTE: This step is best performed by a SQL Server Administrator.

CREATE LOGIN qasRestoreUser WITH PASSWORD = 'Qu@dr8q@s';

GO

EXEC master..sp_addsrvrolemember @loginame = N'qasRestoreUser', @rolename = N'sysadmin'

GO

The new user qasRestoreUser will be used by QAS service only for this operation and it can be deleted after use.

After creating the qasRestoreUser, take the following steps to restore the database.

  1. Click on the Administration page.
  2. Click Restore Database
  3. Browse to the location where your backup is stored. 
  4. Select the file name.
  5. Click Open

The database will be restored to the state of the selected backup.

Schedule a Database Backup

Use the Microsoft Windows Administrative tools to schedule database backups.

  1. Open the Microsoft Windows Task Scheduler.
  2. Choose Create Basic Task to open the Create a Basic Task wizard.
  3. Enter a name for the task and choose the schedule.
  4. Specify that you would like to Start a Program.
  5. In the Program/Script box, use the following command.

    "C:\Program Files\Quadrate\QAS\QuadrateAuthenticationServer.Service.exe" /Backup <value>

    where <value> is the path and the name of the backup file to be created.   The backup file extension must be .qbak.