{}

Our Brands

Impact-Company-Logo-English Black-01-177x54

Welcome to the Schneider Electric Website

Welcome to our website.
Search FAQs
How to convert a live database to an archive database?

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

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

Environment
SQL Server 2005, SQL Server 2008 R2, SQL Server 2012, SQL Server 2014, SQL Server 2016

Cause
Need to convert live database to archive.

Resolution
*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.*


For instructions on creating a new ION_Data database, see FA270626 - How to create a new ION_Data Database.

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

** see attachment containing the SQL script text

Schneider Electric Canada

Attachment(s)
FA214016.sql [96 Bytes]
Explore more
Range:
Articles that might be helpful Users group

Discuss this topic with experts

Visit our Community for first-hand insights from experts and peers on this topic and more.
Explore more
Range: