Restoring a database - Metasys - LIT-12011202 - Software Application - Metasys Database Manager - 13.0

Metasys Database Manager Help

Brand
Metasys
Product name
Metasys Database Manager
Document type
User Guide
Document number
LIT-12011202
Version
13.0
Revision date
2023-08-14
Product status
Active
Language
English
Important: If you perform an out-of-place upgrade, restore the databases and then rename the device before you install the ADS, ADX, OAS, NAE85, or LCS85 software. For more information, see Renaming field contents in Metasys databases and Introduction.
In order to restore databases to the new computer during an out-of-place upgrade, copy the backup files from the old computer to the same folder on the new computer before proceeding with the directions in this section.
Note: The Metasys Database Manager may not restore your databases from all file locations. To avoid any issues, use the default path C:\ProgramData\Johnson Controls\Metasys\SQLData.
Important:

Restoring a database deletes any information that exists in the database from the time the backup was created to when it was restored. Use this option to restore a database during an out-of-place upgrade, or to repair a corrupted database only. Do not use this feature to view historical data in the Metasys system. Instead, use the Metasys Export Utility for storing and viewing historical data in more user-friendly formats.

You cannot restore database backups from a newer version of SQL Server software to an older version of SQL Server software. For example, you cannot create a backup of Metasys databases that are hosted on SQL Server 2019 software and restore them to SQL Server 2016 software. However, you can restore database backups from an older version of SQL Server to a newer version of SQL Server. If you restore a database that was created using a version of SQL Server software that is older than the version you are currently using, the Metasys Database Manager upgrades the database so it can function with the current SQL Server software version.

If you restore a database from an earlier release of Metasys software than you are using, the ADS, ADX, OAS, NAE85, or LCS85 stops functioning. No fail-safes prevent you from restoring a database that is older than the database you are using. Be sure to restore databases from the same release that you are using if the ADS, ADX, OAS, NAE85, or LCS85 is already installed. If you are not performing an out-of-place upgrade as detailed in the Metasys Server Installation and Upgrade Instructions (LIT-12012162) , you cannot restore a database from a system that does not have the Metasys Advanced Reporting System installed to a system that does have the reporting system installed. The database does not contain all the stored procedures required to use the reporting system. If you attempt to do this, the reporting system does not function.

Do not restore databases from a different server unless you follow the process for performing an out-of-place upgrade as detailed in the Metasys Server Installation and Upgrade Instructions (LIT-12012162) . Even if both systems have the same name and are at the same Metasys release, there are underlying differences in the databases.

For more information about the fields on the Restore tab, see Restore tab. The Restore tab is available in Expert Mode only.

Expert Mode and the Restore tab are not available to all users. Access is dependent on the user's access rights. See Required access rights.

To restore a database, complete the following steps:

  1. Use Windows Explorer to browse to C:\Program Files (x86)\Johnson Controls\Metasys Database Manager.
  2. In the Metasys Database Manager folder, double-click Expert Mode. The Metasys Database Manager opens in expert mode with the Restore tab enabled.
    Note:

    If the User Account Control window appears, click Yes.

    If the User Account Control window does not appear and the Metasys Database Manager opens with only the Statistics tab available, verify your Windows access rights. See Required access rights.

  3. Click the Restore tab. A warning appears. If the Restore tab is not present, see Required access rights.
  4. Read the warning and click Continue. The Restore tab appears (Figure 1).
  5. To navigate to the database you want to restore, click Browse. For information on specifying back up file locations, see Backup tab.
    Note:

    You can restore only one database at a time.

    After you select a backup file, a Restore Database File Path field may appear if the following conditions occur:
    • The database name is the name of an existing database.
    • The database is trying to replace a database that does not exist; for example, the backup file name is JCIEvents.bak and the JCIEvents database does not exist in the system.
    If prompted to select a Restore Database File Path, select the appropriate file path of the database.
    Figure 1. Restore Path Dialog Box

  6. Click Restore Now. The Restore in Progress window appears. You can ignore a Not Responding label that appears in the title bar. The restore is progressing but the page is not refreshing. Wait until the restore is complete, and the Database backup has been successfully restored message box appears.
    Note:
    • If you receive an error while restoring a database, you may need to run a SQL script to fix the problem. Contact the Johnson Controls┬« Field Support Center (FSC) for assistance.
    • When you restore a database, the Metasys Database Manager creates a backup of the database before you start the restore and saves it in the same file location as the database. If you accidentally overwrite a database, see Troubleshooting.

If the security restrictions on your computer prevent you from using Metasys Database Manager to restore a database you can manually restore databases using Microsoft SQL Management Studio.

Note: This process can ONLY be used to restore backups that were from the same machine at the same Metasys release. Trying to restore backups from other machines or from previous versions of Metasys will cause problems.

To restore a database using SQL Management Studio, complete the following steps:

  1. Open the Command Prompt in Administrator mode, type net stop miiidm, and press Enter to stop the Metasys III Device Manager Service.
  2. Exit Metasys Database Manager.
  3. Open Microsoft SQL Server Management Studio or SQL Server Management Studio Express, and log in with credentials that have system admin role capabilities.
  4. Expand folder to browse to the database you want to restore.
  5. Right-click the database name, click Tasks > Restore > Database.
    Figure 2. SQL Server Management Studio Tree

  6. In the Restore Database window, in the Source area in the right pane, select Device.
    Figure 3. Restore Database - General Tab

  7. To navigate to the database you want to restore, click Browse. For information on specifying backup file locations, see Backup tab.
    Note: The backup file must be in a directory that the SQL Server service account has read access to.
  8. Click OK.
  9. Under Select the backup sets to restore, select the check box next to the database you want to restore.
  10. Open the Options tab and click Overwrite the existing database and Close existing connections to destination database.
    Figure 4. Restore Database - Options Tab

  11. Click OK to start the restore.
  12. When you are finished restoring your databases, open the Command Prompt, type net start miiidm, and press Enter to start the Metasys III Device Manager Service.