Technical FAQs

Ask a Question

How to convert a live database to an archive database?

Issue
How to convert a live database to an archive database. 

Product Line
ION Enterprise 6.x
Struxureware Power Monitoring 7.x
Power Monitoring Expert 7.x, 8.x

Environment
Archiving Databases

Cause
Need to convert live database to archive.

*Warning: Take backups of any files prior to modifying them. Ensure the backups are in a location that will not be overwritten (i.e. the Desktop).*
*Warning: Irreparable database damage can occur. This procedure should only be performed by users familiar with SQL Server Management Studio. Databases should be backed up prior to performing this procedure.* 

Resolution

For instructions on creating a new ION_Data database, see FA270626 - How to create a new ION_Data Database in PME 7.2 and PME 8. 

Instructions below can be used to have the old ION_Data database behave as an archive
1) Open SQL Enterprise Manager (SQL Server Management Studio)
2) Open the tree hierarchy on the left hand pane of Enterprise Manager until you see the ION_Data_Archive database under the Databases folder
3) Open the ION_Data_Archive Tables
4) Right-click on the Registry table in the right-hand pane and select 'Edit Top 200 Rows'
5) Find the cell under the Value column that says 'ION_Data'
6) Click inside that cell and edit the text to say 'ION_Data_Archive' (case sensitive) and hit Enter
7) Close SQL Enterprise Manager

If the above sequence of steps do not work, use the following query. 
1) Open SQL Enterprise Manager (SQL Server Management Studio)
2) Open a new query window by clicking file > new query.
3) Enter the following query below:

Warning: Make sure that the correct ION_Data_Archive database is selected or inputted into the query correctly.
Use the following SQL statement to properly update the database and set it to an archive, in the query below, ION_Data_Archive_2015, is being updated.
USE  [ION_Data_Archive_2015
UPDATE Registry SET Value='ION_Data_Archive'
WHERE Name='Schema'

4) Open the tree hierarchy on the left hand pane of Enterprise Manager until you see the ION_Data_Archive database under the Databases folder
5) Open the ION_Data_Archive Tables
6) Right-click on the Registry table in the right-hand pane and select 'Edit Top 200 Rows'
7) Find the cell under the Value column that says 'ION_Data_Archive' to confirm the changes.
8) Close SQL Enterprise Manager

Was this helpful?
What can we do to improve the information ?