Restoring and Upgrading the History Database
Scenario: You have an HDB backup that you want to restore. The HDB backup can be of the same version as that of the current SQL Server version or it can have the lower version. For information on restoring and upgrading the notification database, see Restoring and Upgrading the Notification Database (NDB).
In case of the same version, once the HDB backup is restored you can directly link it to the project (proceed to step 5).
If the HDB that you are about to restore has the lower version than that of the current SQL Server version, then after restore you must first stop the HDB, upgrade it to the version of the SQL Server, start the HDB and thereafter link it to the project.
Reference: For background information, see the reference section.
Workflow diagram:
Prerequisites:
- The Windows user configured in the System Account and in the HDB Service Account must be valid and assigned all required rights, See Log on as a Service Right in System Settings Procedures.
- SMC must be launched, the following prerequisites apply :
- The required Windows account configured on SQL Server with sysadmin fixed server role is available.
- If the required privileges are not available a dialog box appears to provide a Windows account configured on the SQL Server with sysadmin fixed server role.
- SMC launched with a Windows HDB owner user when HDB workflow do not need system administrator privileges.
- HDB workflows such as change HDB owner, which need system administrator privileges, a dialog box displays to provide a user having system administrator privileges on the SQL Server.
- A HDB backup is available at the known path.
Steps:
- SQL Server or SQL Server Express is available.
- A named instance is available on the SQL Server.
- In the SMC tree, select Database Infrastructure > [SQL Server Name].
NOTE: Do not select an existing History Database.
- Click Restore and select Restore History Database from the displayed options.
- Select the Database Information expander and type a new DB Name (no special characters or spaces).
- Select the Files and Paths expander and type the following data:
- Data file: D:\[MyProjectHDB]\HDB.mdf
- Log file: E:\[MyProjectHDB]\HDB.ldf
- Backup file: F:\[MyProjectHDB]\HDB.bak
- Recovery log path: E:\[MyRevoveryPath]
- Restore file: F:\[MyProjectHDB]\HDB.bak
- Select the Security expander and check the displayed user names.
a. DB owner: Desigo CC SMC user who requires HDB owner rights. You can change it as required. The HDB owner must be different than the HDB user and the HDB service user.
b. DB user: Desigo CC project user who requires HDB user rights for read and write operations. You can change it as required in System Account Settings. See Settings Expander in SMC System Settings.
c. DB service user: Desigo CC service user who requires HDB service user rights for maintenance operations. You can change it as required in HDB Service Account Settings. See Settings Expander in SMC System Settings.
- Click Save .
- Click Yes to restore a backup file.
- The History Database is read back and displayed in the SMC tree. The HDB status is seen as outdated if the restored HDB needs an upgrade.
- The History Database is started automatically following successful restore.
You need to stop the restored and started HDB to proceed with HDB upgrade.
- The HDB status is seen as Outdated.
- The History Database is started.
- In the SMC tree, select Database Infrastructure > [SQL Server Name] > [History Database name].
- Click Stop Automatic Maintenance .
- The History Database is stopped. No more maintenance activities are performed on the database. So, make sure that the HDB is always started or else there is a possibility of data loss.
The History Database must be upgraded for a new version. The following workflow illustrates the preconditions and different variants for upgrading the History Database.
- SMC is launched with a Windows account configured on the SQL Server with sysadmin fixed server role. If the required privileges are not available a dialog box appears to provide a Windows account configured on the SQL Server with sysadmin fixed server role.
- The HDB status is seen as follows:
Outdated: The database needs to be upgraded.
Outdated - Resolve conflicts before upgrade: The database needs to be upgraded but before upgrade the HDB owner must be changed to a user other than the HDB user and the HDB service user.
- Select the Security expander and check if the displayed user names are as required.
a. DB owner: Desigo CC SMC user who requires HDB owner rights. You can change it as required. The HDB owner must be different than the HDB user and the HDB service user.
b. DB user: Desigo CC project user who requires HDB user rights for read and write operations. You can change it as required in System Account Settings. See Settings Expander in SMC System Settings.
c. DB service user: Desigo CC service user who requires HDB service user rights for maintenance operations. You can change it as required HDB Service Account Settings. See Settings Expander in SMC System Settings.
- The Upgrade icon is enabled in the SMC toolbar.
- Click Upgrade .
- A message displays.
- Click Yes.
- The HDB is upgraded successfully is stopped by default and is linked to the named SQL Server instance under History Databases in the SMC tree and the HDB status is seen as Current.
You need to start the HDB once you upgrade it.
- The History Database is stopped.
- In the SMC tree, select Database Infrastructure > [SQL Server Name] > [History Database name].
- Click Start Automatic Maintenance .
- The History Database is started. Maintenance activities are performed on the database.
- In the SMC tree, select your project.
- Select the Project Settings tab and then the Server Project Information expander.
- In the Linked HDB drop-down list, select the restored History Database.
- Click Save .
- The History Database is linked with the project and logs history data.
- At least one active project is available under Projects node in SMC tree.
- The project is stopped and has unique port numbers.
- (Only applicable for Projects on FEP)
- You have copied and imported the same Windows key file, as that on the Server computer, on the disk of the FEP computer.
- You have re-aligned the Client/FEP Project with the updated project on the Server.
- In the SMC tree, select Projects > [project].
- Click the Project Settings tab.
- Project Settings displays.
- Click Start Project .
- The Pmon service in the Windows services starts which in turn starts the project.