TN500 - Using Old and New Alarm Data From WWALMDB

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 7

Schneider Electric Software

Knowledge & Support Center

Doc Type Tech Notes

Doc Id TN500

Last Modified Date 02/20/2015

Using Old and New Alarm Data from WWALMDB


LEGACY TECH NOTE #

896

SUMMARY

This Tech Note explains how to use the old WWALMDB data in the new InTouch version.

Use this Tech Note when you need to use the old and the new Alarm data at the same time.

This usually happens after upgrading a system. For example, the InTouch/System Platform system has been upgraded but the WWALMDB
database may have been overlooked, or the data may not have been needed at the point of upgrade. Subsequently, you might require the old data
from the original WWALMDB, but the new WWALMDB has already been created.

There is no one-click method to merge the data into one single WWALMDB.

SITUATION

Application Versions
InTouch 10.1 or later

Important Information
Important: Review the following points before using this Tech Note.

These methods are not officially supported.


Only the step of restoring the archived alarm data from InTouch version 9.0 and 9.5 to separate WWALMDB of InTouch 10.1 (SP3 P01) has
been tested by Wonderware Tech Support. No other functionalities related to the WWALMDB have been tested.
The Logging mode (consolidated/detailed) for both the WWALMDBs must be the same.
For the ease of configuration, the Username and Password configured for the WWALMDBs must be the same when using two WWALMDBs.
If different SQL Server versions (e.g. 2005/2008) or editions (e.g. Enterprise/Standard) are used, make sure that only the base functionalities
that are common to both SQL Server versions are used. For example, if the WWALMDB is created in the Enterprise SQL Server with
compression or data partitioning, the DB backup from that edition cannot be restored on a Standard SQL Server.

See http://msdn.microsoft.com/en-us/library/cc645993%28v=SQL.100%29.aspx for more details.

Archive and Restore an Old WWALMDB


Use this method where a view or query needs to be done on the old and new alarm records within a single database. In terms of scripting, nothing
needs to be changed within the InTouch application.

Note: The old WWALMDB should be as small as possible, so that the resulting combined DB will not be too huge. This will also help to reduce the
time needed to restore the archived files. The bigger the WWALMDB size, the slower the query performance will be.

You can merge the old WWALMDB into a current WWALMDB using the following steps:

1. Backup the OLD WWALMDB.


2. Purge/Archive data from the OLD WWALMDB.
3. Restore the Archived data into CURRENT WWALMDB

To Purge/Archive data from the OLD WWALMDB

The Schneider Electric industrial software business and AVEVA have merged to trade as AVEVA Group plc, a UK listed company. The Schneider Electric and Life
Is On trademarks are owned by Schneider Electric and are being licensed to AVEVA by Schneider Electric.

Terms of Use | Privacy Policy

Copyright © 2018 AVEVA Group Plc. All rights reserved


1. Click Start -> Programs -> Wonderware -> InTouch and select Alarm DB Purge/Archive. The Purge/Archive window appears.
2. Click the General tab, and specify an Archive Folder Path as shown in Figure 1 (below)

Figure 1: Type the Archive Folder Path


3. Click the Database tab.
4. Select the old WWALMDB and type the correct User information to connect to that SQL Server (Figure 2 below).

Figure 2: Connect with Old WWALMDB


5. Click Test Connection and verify it succeeds.

In case the old server does not exist and you only have a backup of the old WWALMDB, then make sure you restore it to an existing SQL
Server as follows:

Create a new database called WWALMDBOLD and restore the old WWALMDB into this database using the Restore option inside SQL
Management Studio. Before starting the restore you have to go to the Options tab and rename the .mdf and .ldf files to
WWALMDBOLD.mdf and WWALMDBOLD_Log.ldf (Figure 3 below).

The Schneider Electric industrial software business and AVEVA have merged to trade as AVEVA Group plc, a UK listed company. The Schneider Electric and Life
Is On trademarks are owned by Schneider Electric and are being licensed to AVEVA by Schneider Electric.

Terms of Use | Privacy Policy

Copyright © 2018 AVEVA Group Plc. All rights reserved


Figure 3: Options Tab to Restore OLD AlarmDB

6. On the Purge/Archive Utility tab, make sure you select WWALMDBOLD.


7. Select the Activation Time as shown in Figure 4 (below).
8. Click Activate.

Figure 4: Select Archive Activation Time and Activate


9. Wait for the Purge and Archive process to finish successfully (Figure 5 below).

The Schneider Electric industrial software business and AVEVA have merged to trade as AVEVA Group plc, a UK listed company. The Schneider Electric and Life
Is On trademarks are owned by Schneider Electric and are being licensed to AVEVA by Schneider Electric.

Terms of Use | Privacy Policy

Copyright © 2018 AVEVA Group Plc. All rights reserved


Figure 5: Purge and Archive Successful
10. Verify the Archive files were created in the Archive Folder path (Figure 6 below).

Figure 6: Archive files

To Restore the Archived Data into the Current WWALMDB

1. If possible, stop the Alarm DB logger Manager writing to the current WWALMDB. It is not a requirement but a good practice for the following
reasons.

a) If both the Alarm DB Logger and Restore utility write to same database at same time, the records might be out of sequence.

b) If the Recreate Tables option is checked on the restore utility's Selection tab, it is good practice to stop Alarm DB Logger.
2. Click Start -> Programs -> Wonderware -> InTouch and select Alarm DB Restore.
3. Click the Configuration tab and specify the current WWALMDB details (Figure 7 below).
4. Click Test Connection and verify it succeeds.

The Schneider Electric industrial software business and AVEVA have merged to trade as AVEVA Group plc, a UK listed company. The Schneider Electric and Life
Is On trademarks are owned by Schneider Electric and are being licensed to AVEVA by Schneider Electric.

Terms of Use | Privacy Policy

Copyright © 2018 AVEVA Group Plc. All rights reserved


Figure 7: Destination WWALMDB Details
5. Click the Selection tab. Type the Folder Path for Archived Files.
6. For the Restore files later than (Date/Time) field, type a date/time that is earlier than the timestamp of the archived .txt files.

For this example, Figure 6 (above) shows the timestamp of the Archive files as 9/13/2012 10:36 am so you would set the Restore files later
than (Date/Time) field to 9/13/2012 10:00:00 am (Figure 8 below).

Figure 8: Set the Archive Folder Path and Restore Files Timestamp
7. Click Restore and wait for the restore process to finish (Figure 9 below).

The Schneider Electric industrial software business and AVEVA have merged to trade as AVEVA Group plc, a UK listed company. The Schneider Electric and Life
Is On trademarks are owned by Schneider Electric and are being licensed to AVEVA by Schneider Electric.

Terms of Use | Privacy Policy

Copyright © 2018 AVEVA Group Plc. All rights reserved


Figure 9: Restore the Archives Files

The Restore process can take a few seconds to many hours to complete, depending on the size of the archived files.

Using Two WWALMDBs


Use this method for a configuration where viewing or querying the old alarm records is needed, but it is not necessary to store new data into the old
WWALMDB.

For example, if the old WWALMDB is very large, merging the old and new alarm data (if any) could result in an even bigger database.

In terms of InTouch scripting and ActiveX configuration, they have to be updated to point to the old WWALMDB.

Use this method:

When a new ActiveX control can be inserted in a new InTouch window


When it can linked to the old WWALMDB, and
Nothing else needs to be changed.

Instead of merging old alarm data into the new WWALMDB, create a coexistence for the old and new WWALMDBs:

Backup the old WWALMDB OR perform a Detach operation on the WWALMDB.

If you detach the old WWALMDB, make sure to rename the WWALMDB to a different name in the original SQL Server before the
detachment.
Before renaming the DB, stop all processes, such as WindowViewer, AlarmDBLogger or other processes that lock the WWALMDB.
Rename the database to WWALMDBOLD or something similar.
Restore the WWALMDB to a separate database name OR attach the WWALMDBOLD.
Configure another AlarmDBViewer in InTouch to connect to the WWALMDBOLD.

To Detach and Attach the WWALMDB

1. Shut down all processes (AlarmDBLogger / WindowViewer / etc) that lock the WWALMDB.
2. In the old SQL Server Management Studio, rename the WWALMDB to WWALMDBOLD.
3. Right-click on the database and select Tasks/Detach (Figure 10 below).

Figure 10: Detaching the WWALMDB Database


4. Check Drop Connections and Update Statistics (Figure 11 below).

The Schneider Electric industrial software business and AVEVA have merged to trade as AVEVA Group plc, a UK listed company. The Schneider Electric and Life
Is On trademarks are owned by Schneider Electric and are being licensed to AVEVA by Schneider Electric.

Terms of Use | Privacy Policy

Copyright © 2018 AVEVA Group Plc. All rights reserved


Figure 11: Check Boxes When Detaching the WWALMDB
5. Copy the WWALMDBOLD.mdf file to the new server and place it in the MSSQL/DATA folder, depending on which drive Microsoft SQL
Server is installed in. This is the folder where the rest of the MDF files are located. If you are not sure of the actual location, perform a search
in the drives for this folder or MDF files.
6. In the new SQL Server, attach the WWALMDBOLD by right-clicking on Databases/Attach and select the WWALMDBOLD.mdf (Figure 12
below).

Figure 12: Attaching the WWALMDB Database

To Restore a Backup of WWALMDB

1. Before starting the Restore operation, go to the Options tab and rename the .mdf and .ldf files to WWALMDBOLD.mdf and
WWALMDBOLD_Log.ldf as shown in Figure 3 (above).
2. Create a new database called WWALMDBOLD and restore the old WWALMDB into this database using the Restore option inside SQL
Management Studio.

InTouch AlarmDBViewer configuration


In InTouch, create a new window and insert the Alarm DB Viewer ActiveX control. Configure it to point to the WWALMDBOLD database
(Figure 13 below), and configure the query filter accordingly.

Figure 13: AlmDBViewCtrl ActiveX Connection to the WWALMDBOLD Database

The Schneider Electric industrial software business and AVEVA have merged to trade as AVEVA Group plc, a UK listed company. The Schneider Electric and Life
Is On trademarks are owned by Schneider Electric and are being licensed to AVEVA by Schneider Electric.

Terms of Use | Privacy Policy

Copyright © 2018 AVEVA Group Plc. All rights reserved

You might also like