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.
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:
- SMC is launched.
- 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 History Infrastructure > [SQL Server Name].
NOTE: Do not select an existing History Database.
- Click Restore
.
- Select the Settings expander and type a new HDB 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 entered user.
- Click Save
.
- Click Yes to restore a backup file.
- The History Database is read back and displayed in the SMC tree. A message is displayed in the Historic Data if the restored HDB needs an upgrade.
- The History Database is started automatically following successful restore.
Normally, the System Management Console automatically initiates History Database start and stop.
You need to stop the restored and started HDB to proceed with HDB upgrade.
- A message displays in the Info pane of the Historic Database:
You need to upgrade your database. Stop the HDB before upgrading!
- The History Database is started.
- In the SMC tree, select History Infrastructure > [SQL Server Name] > [History Database name].
- Click Stop
.
- 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.
- 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 Infrastructure in the SMC tree.
Normally, the System Management Console automatically initiates History Database start and stop. You need to start the HDB once you upgrade it.
- The History Database is stopped.
- In the SMC tree, select History Infrastructure > [SQL Server Name] > [History Database name].
- Click Start
.
- The History Database is started. History data is logged.
- In the SMC tree, select your project.
- Select the Project Settings tab and then the History Database Connection expander.
- In the History Database 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.
