SQL Server
For more details regarding backup and restore in SQL Server, see Microsoft's documentation.
Assumptions
The procedures in this section were developed based upon the following assumptions:
- The VoiceConsole database is using the simple recovery model.
- VoiceConsole On Prem deployment 6.2.1 is installed on the server to which a database is being restored. The instructions below include stopping the VoiceConsole On Prem deployment 6.2.1 service on the machine to which the database is being restored.
- This document addresses the architecture of a primary server with VoiceConsole On Prem deployment and the database installed on the same server, and one or more backup servers with VoiceConsole On Prem deployment and the database installed. If a different architecture is being used, then some of the steps are different.
- The database cannot be in use during the time of a restore operation; so any instance of the VoiceConsole On Prem deployment 6.2.1 service pointing to the database being restored must be stopped.
- The restore operation is always restoring an existing VoiceConsole database. The procedures listed below do not address restoring the database to a database server on which there is no existing VoiceConsole database. This is possible, but the procedure is not covered in this document.
How to Create a Backup of the VoiceConsole Database
- Open SQL Server Management Studio and connect to the database server.
- Click Databases.
- Right-click on the VoiceConsole database (the actual name is whatever was chosen at install time).
- Select Tasks.
- Select Back Up. The Back Up Database window appears.
- In the Backup type drop-down list, select Full.
- For Backup component, select Database.
- In the Backup set section, enter a name for the backup, or accept the default.
- Enter a description, if desired.
- In the Destination section, select Disk for Back up to.
- Accept the default destination, or use the Add and Remove buttons to specify a different destination.
- In the Select a page navigation bar on the left, select Options.
- In the Overwrite media section, select Back up to the existing media set.
- Select Overwrite all existing backup sets.
- In the Select a page navigation bar on the left, select General.
- Click OK at the bottom of the window. The progress meter at the bottom left of the window indicates the status of the process.
- When the backup is complete, click OK to close the Back Up Database window.
How to Schedule a Backup of the VoiceConsole Database
- Follow the steps in How to Create a Backup of the VoiceConsole Database.
- On the menu bar at the top of the Back Up Database window, select Script > Script Action to Job. The New Job window appears.
- On the General page, change the name of the job, the owner, and description if desired, or accept the default settings.
- In the Select a page navigation bar on the left, select Schedules.
- Click the New button at the bottom of the window. The New Job Schedule window appears.
- In the Name field, give the schedule a name.
- Make sure that the Schedule type is set to Recurring.
- Use the rest of the fields in this window to set the schedule and time that the backup is to run. Honeywell recommends backing up the database daily and scheduling the backup to run at a time of light system usage.
- When you are done configuring the schedule, click OK in the New Job Schedule window.
- In the New Job window, click OK. The script that creates the backup is to run. The progress meter at the bottom of the Back Up Database window indicates the status of the process.
- When the process is complete, click Cancel at the bottom of the Back Up Database window to close the window.
- Verify that the backup job was created by expanding SQL Server Agent, and then expanding Jobs. The new backup job appears.
How to Restore the VoiceConsole Database
How to Restore a Backup of the VoiceConsole Database to the Server on Which the Backup was Created
- VoiceConsole On Prem deployment needs to be stopped to restore the database. The application is unavailable while the database is being restored.
- Select Start > Control Panel > Administrative Tools > Services.
- Select the VoiceConsole On Prem deployment service, and stop the service.
- Open SQL Server Management Studio, and connect to the database server.
- Expand Databases.
- Right-click on the VoiceConsole database (the actual name that was chosen at install time).
- Select Tasks.
- Select Restore.
- Select Database. The Restore Database window appears.
- The default settings should be correct. Click OK. The restore process begins. The progress meter at the bottom left of the window indicates the status of the process.
- When the process is complete, click OK to close the window.
- Start the VoiceConsole On Prem deployment service.
How to Restore a Backup of the VoiceConsole Database to a Different Server Than the One on Which the Backup was Created
- Copy the backed up database file to the server to which the backup is to be restored.
- Select Start > Control Panel > Administrative Tools > Services.
- Select the VoiceConsole On Prem deployment service, and stop the service.
- Open SQL Server Management Studio, and connect to the database server.
- Expand Databases.
- Right-click on the VoiceConsole database (the actual name that was chosen at install time).
- Select Tasks.
- Select Restore.
- Select Database. The Restore Database window appears.
- In the Source for restore section, select From device.
- Click the ... button. The Specify Backup window appears.
- For Backup Media, select File (.bak).
- Click the Add button to navigate to the location of the backup file.
- Browse to the backup file, and click OK. The backup location is now listed in the Specify Backup window.
- Click OK.
- In the Select the backup sets to restore table, check the box in the Restore column for the backup.
- In the Select a page navigation bar on the left, select Options.
- Select the check box for Overwrite the existing database.
- All other settings should be correct. Click OK at the bottom of the Restore Database window. The restore process begins. The progress meter located in the bottom left corner of the window indicates the status of the process.
- When it is complete, click OK to close the Restore Database window.
For this procedure to be successful, you must perform the following steps.
- SQL Server logins have a unique Security ID (SID) that belongs to a particular instance of SQL Server.
- If there are any users in the VoiceConsole database, you must update the user records in the restored database so that they refer to the SID of the corresponding SQL Server login on the instance of SQL Server on this server.
- Run the following command against
the VoiceConsole database in SQL
Query Analyzer to find users that must have the SID changed:
EXEC sp_change_users_login' Report'
- If any records are returned, run
the following command for each user returned:
EXEC sp_change_users_login
'Auto_Fix', username - where username represents
the user name that needs to have its SID fixed.
The command should display the following output indicating that the user's SID was fixed:The row for user "voice_console_db_22" will be fixed by updating its login link to a login already in existence.
The number of orphaned users fixed by updating users was 1.
The number of orphaned users fixed by adding new logins and then updating users was 0. - Start the VoiceConsole On Prem deployment service.