You are on page 1of 40

OASyS DNA®

Archive Reference

www.schneider-electric.com
Legal Information
The Schneider Electric brand is the sole property of Schneider Electric Industries SAS. Any
trademarks of Telvent Canada Ltd. or Telvent USA, LLC referred to in this guide are the sole
property of Telvent Canada Ltd. or Telvent USA, LLC. The Schneider Electric brand and
trademarks may not be used for any purpose without the owner's permission, given in writing. This
guide and its content are protected, within the meaning of the applicable copyright and trademark
laws and international conventions. Unless otherwise agreed in writing, you may not reproduce all
or part of this guide on any medium whatsoever without the permission of Telvent Canada Ltd. You
also agree not to establish any hypertext links to this guide or its content. All other rights are
reserved.
© 2016 Telvent Canada Ltd. All rights reserved.
Archive Reference Table of Contents

Table of Contents
1 Archiving..................................................................................................................................................5
2 The Archive Process...............................................................................................................................6
2.1 rts_archive.csc................................................................................................................................6
3 The Archive/Dearchive Menu..................................................................................................................8
4 Opening the Archive Schedule Summary window...................................................................................9
4.1 Filtering the information on the Archive Schedule Summary window...........................................10
5 Archive Control dialog box.....................................................................................................................12
5.1 Opening the Archive Control dialog box.......................................................................................12
5.2 Adding a New Entry in the Archive Schedule Summary window..................................................13
5.3 Modifying an Entry in the Archive Schedule Summary window....................................................13
5.4 Deleting an Entry in the Archive Summary window......................................................................14
6 Archive Cutoff........................................................................................................................................15
7 Archive Intervals....................................................................................................................................16
7.1 Daily Archive.................................................................................................................................16
7.2 Monthly Archive............................................................................................................................17
7.3 Yearly Archive...............................................................................................................................18
8 Adding an Archive Device.....................................................................................................................20
8.1 Defining an Archive Device..........................................................................................................20
9 Media Initialization.................................................................................................................................22
9.1 Initializing an Archive Device........................................................................................................22
10 Archive Troubleshooting......................................................................................................................23
11 Data Dearchiving.................................................................................................................................24
11.1 Opening the Dearchive window..................................................................................................25
11.2 Opening the Dearchive dialog box..............................................................................................25
12 Data Cleanup.......................................................................................................................................27
12.1 rts_cleanup.csc...........................................................................................................................28
12.2 Cleaning up Dearchived Data (Method 1)..................................................................................28
12.3 Cleaning up Dearchived Data (Method 2)..................................................................................29
13 Data Rearchiving.................................................................................................................................30
14 MonitorArchive Process.......................................................................................................................31
15 Archive Support...................................................................................................................................32
16 Archive Structure.................................................................................................................................34
16.1 Archive Catalog Table.................................................................................................................34
16.2 Archive ConfigModEventKeys Table..........................................................................................35
16.3 Archive Device Table..................................................................................................................36
16.4 Archive DumpSchedule Table....................................................................................................36
16.5 Archive Rearchive Table.............................................................................................................36
16.6 Archive RearchiveDatabases Table............................................................................................37
16.7 Archive Schedule Table..............................................................................................................37
16.8 Archive ScheduleAuditTrail Table...............................................................................................38

3
Table of Contents Archive Reference

16.9 Archive ValidDeviceTypes Table.................................................................................................38

4
Archive Reference Archiving

1 Archiving
Disk space is gradually used up as data is stored in Historical. To conserve space, information should be
archived if it is not currently in use. Archive scheduling is the customer’s responsibility and must be
configured according to each customer’s individual requirements. If required, archived information can
be dearchived and restored to Historical.
An archive device can be installed on the archive host. The historical databases can then be configured
to be archived on the archive device. For the archiving to function properly, define and set up the
designated archive device entries, and then customize the archive schedule.

5
The Archive Process Archive Reference

2 The Archive Process


What’s in This Chapter?
2.1 rts_archive.csc....................................................................................................................................6

Archiving is a multi-step process. When archiving is initiated, the data to be archived is placed in a
temporary table. The temporary table is copied to disk and the new file is copied to an archive file on the
archive device. The archive device is configured in the archive schedule table. An archive file name
takes the following form:

system_service_database_table_date.archive_version

where:

system is the name of the local system.

service is the name of the service that contains the archived data; the default value is Archive.

database is the name of the database that contains the archived data.

table is the name of the table that contains the archived data.

date is the archive date.

version is the version number of the archive, starting with 0. The version number is incremented if data
is re-archived.

NOTE: OASyS DNA Services with SQL Servers may be scheduled for archiving data.

A log of the archive is written into the catalog table and the date of the archive is recorded in the
schedule table.

Data is automatically archived when it becomes older than the date specified by the archive cutoff date
set in the archive schedule table. The is used to set this value. The format of the Archive Cutoff field
entry contained in this form is YY:MM:DD. YY, MM, and DD specify the number of years, months, and
days, respectively, that should elapse before the specified data can be archived.

2.1 rts_archive.csc
Archiving is done by executing rts_archive.csc on the RealTime machine.

First, the rts_archive.csc locates the archive host, then executes archive_support.exe
program. The Job Scheduler (JSH) is normally configured to execute rts_archive.csc once per day,
usually at a time when the system is not busy. The syntax for rts_archive.csc is:

rts_archive.csc [-h] [-A archive_host] [-options]

where:

-h displays usage information.

-A specifies a host where the archive device is located. If a host is not specified, the primary Archive
Service host for the local system is used.

6
Archive Reference The Archive Process

Table 1 - rts_archive Parameters


Parameters Description
-c This catalogs any archives that are sent to the null device (NULL). If this option
is not set, then archives to the null device are not logged in the catalog. For more
information, refer to the description of the device entry for the archive schedule
table.
-d level This sets the level of debug message detail between 0 and 6; 0 gives no
message and 6 gives maximum detail.
-i interval This speeds up the archiving of the timeline..collect and the event..summary
tables. This is accomplished by doing a bulk copy (bcp) out of small chunks of
data at a time (less than one day); these chunks of data are later combined into
one large bcp file.The interval, which defaults to 0 and is specified in minutes,
indicates the the time in between archiving batches of collect data. For
example:-i 60The command in the example creates a temporary table with
one hour’s worth of data. The chunks of data that were bulk copied out hourly
are then combined into one large bcp file.
-h This displays the archive options.
-s service This is the service that hosts the archive database. Default value for service is
Archive.
-t directory This sets the name of the directory for temporary archive files. Default directory
is C:\DOCUMEN~1\dnaAdmin\LOCAL~1\Temp.
-m size This sets the maximum amount of disk device space (in megabytes) to be
reserved for operating system administration (for example, for relocating bad
blocks). The default is 10% of the disk, up to a maximum of 25 Megabytes.It is
important that the directory for temporary archive files has sufficient disk space
(10 to 20 Megabytes is recommended). However, this amount of disk space may
not always be available. If sufficient space is unavailable for the temporary file,
the data is not archived, even though space may be available on the final
destination device. Because of this, it is highly recommended that an alternative
directory be provided when running the archive program.
-b BCP arguments These are optional arguments to pass to BCP.

7
The Archive/Dearchive Menu Archive Reference

3 The Archive/Dearchive Menu


The Archive/Dearchive menu is used to create, modify, and delete archive schedule entries.

Figure 1 - Archive/Dearchive menu

NOTE: Creation of an archive device is performed by Schneider Electric personnel during system
configuration. To open the Archive/Dearchive Menu:

Procedure

• Select Archive/Dearchive on the ezXOS Navigation Menu.

The following table lists the buttons on the Archive/Dearchive menu and the corresponding actions
when these are chosen.

Table 2 - Buttons on the Archive/Dearchive Menu


Button Action/Reference
Archive Schedules Opens the Archive Schedule Summary window.
Add Device Opens the Add Archive Device dialog box.
Initialize Media Opens the Archive Initialization dialog box.
Dearchive Opens the Dearchive window.
Cleanup Initiates data cleanup; refer to the Data Cleanup section.

Related Information
Data Cleanup on page 27

8
Archive Reference Opening the Archive Schedule Summary window

4 Opening the Archive Schedule


Summary window
What’s in This Chapter?
4.1 Filtering the information on the Archive Schedule Summary window...............................................10
The Archive Schedule Summary window displays a list of archive schedules.

Procedure

• Click Archive Schedules on the Archive/Dearchive menu.

Figure 2 - Archive Schedule Summary window

The following table provides brief descriptions of the buttons, fields, and column headings that appear
on the Archive Schedule Summary window.

9
Opening the Archive Schedule Summary window Archive Reference

Table 3 - Items on the Archive Schedule Summary window


Item Description
Column Headings
ID No. Identification number of the archive schedule.
Service Service containing the data to be archived.
Database Database containing the data to be archived.
Table Table containing the data to be archived.
Device Device where the data is to be archived.
NOTE: Specifying NUL will advance the Archive time pointer
without saving an actual archive file.
Archive Cutoff Indicates how old the data must be before it is archived
Last Date Archived Date the data was last archived. If empty, archive has not been
performed.
Delete Cutoff Indicates how old the data must be before it is deleted
Enable Indicates whether or not archive is enabled.
BCP Format Indicates whether or not data is archived in any special format.
Buttons and Fields
Service Click this to specify the service with which to filter the displayed
information.
Database Click this to specify the database with which to filter the displayed
information.
Table Click this to specify the table with which to filter the displayed
information.
Device Click this to specify the archive device with which to filter the
displayed information.
Enabled Only Click this to specify that only schedules for which archive is enabled
should be displayed.
Search Click this to search using the enabled filters.
Clear Click this to clear all the field filters.
Add Schedule Click this to open the .

Related Information
Archive Intervals on page 16
Data Cleanup on page 27

4.1 Filtering the information on the Archive Schedule Summary


window
Data displayed on the Archive Schedule Summary window can be filtered using one or more of the
provided filters.

10
Archive Reference Opening the Archive Schedule Summary window

Procedure

1. To search using a filter, select one of the following check boxes:

1. • Service to filter using the service name

• Database to filter using the database name

• Table to filter using the table name

• Device to filter using the archive device name


2. Type the appropriate filter word in the newly enabled field.
3. Click Search.

11
Archive Control dialog box Archive Reference

5 Archive Control dialog box


What’s in This Chapter?
5.1 Opening the Archive Control dialog box...........................................................................................12

5.2 Adding a New Entry in the Archive Schedule Summary window......................................................13


5.3 Modifying an Entry in the Archive Schedule Summary window........................................................13

5.4 Deleting an Entry in the Archive Summary window..........................................................................14

The Archive Control dialog box is used to create or schedule an archive entry.

Figure 3 - Archive Control dialog box

5.1 Opening the Archive Control dialog box


Procedure

1. Open the Archive Schedule Summary window.


2. Click the row header of a record on the summary window. This opens the Archive Control dialog
box with its field populated by configuration information of the record.
Or

• Click Add Schedule on the summary window. This opens a blank Archive Control dialog box.
Use this to add a new signal configuration.

The following table provides brief descriptions of the buttons, fields, and column headings that appear
on the Archive Control dialog box.

12
Archive Reference Archive Control dialog box

Table 4 - Fields on the Archive Control dialog box


Field/Button Description
Service: The service that contains the data to be archived.
Database: The database that contains the data to be archived.
Table: The table that contains the data to be archived. The table must have a
column called time (of ultimate data type int), which contains the age of
the associated data as the number of seconds since Jan. 1, 1970 GMT.
Archive Device: The device where data is to be archived. An archive device can only be
modified if it was set initially as the null device, which is the default
setting.
Archive Cutoff: This indicates how old the data must be before it is archived. The effect
of this field on the archive process depends on whether the table being
archived is time-based or non-time-based. For more information, refer to
Archive Cutoff.
Delete Cutoff: This indicates how old the data must be before it is deleted. Refer to the
Archive Intervals section.
Enable If this check box is not selected, the schedule entry appears in the
Archive Schedule Summary window, but archive is not performed.
Add/Modify This button is available only if modifying an existing or new schedule
entry. Click this button to save the changes made.
Delete This is available only if modifying an existing schedule entry. Click this to
delete the schedule entry.
Dismiss Click this button to close the dialog box.

Related Information
Archive Intervals on page 16

5.2 Adding a New Entry in the Archive Schedule Summary


window
Procedure

1. Open the Archive Schedule Summary window.


2. Click Add Schedule. This opens the Archive Control dialog box (Figure 1).
3. Type the name of the service containing the data to be archived.
4. Type the name of the database containing the data to be archived.
5. Type the name of the table containing the data to be archived.
6. Type or select the archive device.
7. Type the archive and delete cutoff.
8. Select Enable if archive is to be performed.
9. Click Add.

13
Archive Control dialog box Archive Reference

5.3 Modifying an Entry in the Archive Schedule Summary


window
Procedure

1. Open the Archive Schedule Summary window.


2. Click the row header of the entry to be modified. This opens the Archive Control dialog box
(Figure 1). Only the Archive Device, Archive Cutoff, and Delete Cutoff fields are available.
3. Type the changes in the appropriate fields.
4. Click Modify.

5.4 Deleting an Entry in the Archive Summary window


Procedure

1. Open the Archive Schedule Summary window.


2. Click the row header of the entry to be deleted. This opens the Archive Control dialog box (Figure 1).
3. Click Delete. A dialog box appears asking for confirmation before deleting the schedule entry.

14
Archive Reference Archive Cutoff

6 Archive Cutoff
For time-based tables, the Archive Cutoff field indicates how old the data must be before being
archived (time-based tables contain a column named time).

The format is YY:MM:DD, where YY is the number of years old that the data must be, MM is the number
of months, and DD is the number of days. For example, if the current time is 05-Feb‑96 14:35 when
archive runs, then the conditions that are indicated in Archive Cutoff sample (time-based) (Table 1)
apply.

Table 5 - Archive Cutoff sample (time-based)


Cutoff Specifier Possible archive up to
00:00:00 05‑Feb‑96 00:00
00:00:01 04‑Feb‑96 00:00
00:01:00 05‑Jan‑96 00:00
00:02:00 05‑Dec‑95 00:00
01:00:00 05‑Feb‑95 00:00

For non-time-based tables, the cutoff indicates the interval at which the entire table’s data must be
archived. For example, consider the cutoff specifiers and possible archiving frequencies listed in
Archive Cutoff sample (non time-based) (Table 2).

Table 6 - Archive Cutoff sample (non time-based)


Cutoff Specifier Possible archive up to
00:00:01 daily
00:01:00 monthly
01:00:00 yearly

Note that the archive end time is not a guarantee that data is archived up to the end time. It guarantees
only that data younger than the end time is not archived. Refer to the Archive Intervals section for
more information.

15
Archive Intervals Archive Reference

7 Archive Intervals
What’s in This Chapter?
7.1 Daily Archive.....................................................................................................................................16

7.2 Monthly Archive................................................................................................................................17


7.3 Yearly Archive...................................................................................................................................18

An archive schedule is performed daily, monthly, or yearly depending on the Archive Cutoff field
configuration in the Archive Control dialog box.

A daily archive is performed on data that requests archiving at a cutoff interval of less than one month. A
monthly archive is performed on data that requests archiving at a cutoff interval of greater than or equal
to one month but less than one year. A yearly archive is performed on data that requests archiving at a
cutoff interval of greater than or equal to one year.
NOTE: Timestamps start on the midnight of the Archive server time, except on tables configured for
partitioning, where timestamps start on UTC midnight.
Related Information
Opening the Archive Schedule Summary window on page 9
Opening the Archive Control dialog box on page 12

16
Archive Reference Archive Intervals

7.1 Daily Archive


Daily archives are performed for archive schedules with an Archive Cutoff field value ranging from
00:00:00 to 00:00:31.

Figure 4 - Daily Archive example

The figure above shows a schedule created on January 1, 1997 with an Archive Cutoff value of three
days and a Delete Cutoff value of four days. Archiving does not take place until the start of the day on
January 5th since, until then, none of the collected data is more than three days old. Data that have
been archived once are not archived a second time even if these have not been removed by the
cleanup process. Data cleanup does not take place until the start of the day on January 6th since, until
then, none of the collected data is more than four days old.

7.2 Monthly Archive


Monthly archives are performed for archive schedules with an Archive Cutoff field value ranging from
00:01:00 to 00:11:00.

17
Archive Intervals Archive Reference

Figure 5 - Monthly Archive example

The figure above shows a schedule created on January 1, 1997 with an Archive Cutoff value of two
months and a Delete Cutoff value of two months. Archiving does not take place until the start of the
day, April 1, since until then, none of the collected data is older than two months. Intervals between two
and three months are considered to be two months for purposes of monthly archiving. Data cleanup
does not take place until the start of the day, April 1, since until then, none of the collected data is older
than two months. The data must be archived before the cleanup process because unarchived data
cannot be deleted. If the execution times for these two scripts were set up in the wrong order, the first
data cleanup would not take place until May 1.

18
Archive Reference Archive Intervals

7.3 Yearly Archive


Yearly archives are performed for archive schedules with an Archive Cutoff field value of 01:00:00 or
greater.

Figure 6 - Yearly Archive example

The figure above shows a schedule created on January 1, 1993 with an Archive Cutoff value of one
year and a Delete Cutoff value of one year. Archiving does not take place until the start of the day,
January 1, 1995 since, until then, none of the collected data is older than one year. Intervals between
one and two years are considered to be one year for purposes of yearly archiving. Data cleanup does
not take place until the start of the day, January 1, 1995 since, until then, none of the collected data is
older than one year. Unarchived data cannot be deleted; hence, the data must first be archived before
the cleanup process. If the execution time for these two scripts were set up in the wrong order, the first
data cleanup would not take place until January 1, 1996.

19
Adding an Archive Device Archive Reference

8 Adding an Archive Device


What’s in This Chapter?
8.1 Defining an Archive Device...............................................................................................................20

Prior to archiving data into an archive device, the device must first be defined and initialized. The Add
Archive Device dialog box is used to define an archive device.

Procedure

• To open the Add Archive Device dialog box, click the Add Device button on the Archive/Dearchive
menu.

Figure 7 - Add Archive Device dialog box

The following table lists the items that appear on the Add Archive Device dialog box.

Table 7 - Fields on the Add Archive Device dialog box


Field/Button Description
Arch Device: This is the name of the device where the data is to
be archived.
Device There are two options available. Choose
Removable Disk if the archive device is an optical
disk. Choose Fixed Disk if using a mapped drive.
Physical Device This specifies the device. For example, E:\ or C:
\archiveData.
Create Click this button to add the device.
Dismiss Click this button to discard changes.

Related Information
Data Cleanup on page 27

8.1 Defining an Archive Device


Devices must be defined prior to initializing and archiving to them.

20
Archive Reference Adding an Archive Device

Procedure

1. Open the Archive/Dearchive menu.


2. Click Add Device. This opens the Add Archive Device dialog box.
3. Type the name of the archive device.
4. Select the type.
5. Type the physical device.
6. Click Create.

21
Media Initialization Archive Reference

9 Media Initialization
What’s in This Chapter?
9.1 Initializing an Archive Device............................................................................................................22

Prior to archiving data into an archive device, the device must first be defined and initialized. The
Archive Initialization dialog box is used to initialize an archive device.

Figure 8 - Archive Initialization dialog box

1. To open the Archive Initialization dialog box, click Initialize Media on the Archive/Dearchive
menu.
Related Information
Archive Troubleshooting on page 23
Data Cleanup on page 27

9.1 Initializing an Archive Device


Devices must be initialized prior to archiving to them. The initialization process writes a label on the
media and performs any media formatting. Archive and dearchive programs use the label to determine if
the media volume is correct. For removable media, initialization must take place each time a new media
volume is used. Fixed media only need to be initialized once.

Procedure

1. Open the Archive/Dearchive menu.


2. Click Initialize Media. This opens the Archive Initialization dialog box.
3. Type or select the name of the device to initialize.
4. Click Initialize.

22
Archive Reference Archive Troubleshooting

10 Archive Troubleshooting
This section gives the generic alarm messages that the archive process may generate and the
recommended user response. The actual messages are often variations of those listed in this section.

Please mount and initialize media on some_device


Media must be initialized prior to archiving to it. Initialize the device (some_device) in question. Refer to
the Media Initialization section.

Please mount archive media with label some_label on device some_device

Either no disk is present in the disk drive or the wrong disk is in the drive. Remove the existing disk and
replace it with the disk having the label (some_label) that is indicated.

some_device media is full

When archiving to a fixed disk, this means that the disk is now full. For removable media, this means
that a new media is needed.
Related Information
Media Initialization on page 22

23
Data Dearchiving Archive Reference

11 Data Dearchiving
What’s in This Chapter?
11.1 Opening the Dearchive window......................................................................................................25

11.2 Opening the Dearchive dialog box..................................................................................................25


Data de-archiving is the process of transferring archived data from a storage media back to the
Historical service. It is performed using a series of dialog boxes.

NOTE: As of Elk SP3, if a supported table has been configured for Partitioning for the Historical service,
the Start Time and End Time will be determined by UTC time. However, the Start Time and
End Time of the other tables will still be determined by Archive host time. For more information
on Partitioning, see the Historical documentation.

Figure 9 - Dearchive window

24
Archive Reference Data Dearchiving

Table 8 - Items on the Dearchive window


Item Description
Column Headings
Service This is the service that contains the archived data.
Database This is the database that contains the archived data.
Table This is the table that contains the archived data.
Start Time De-archiving is restricted to data between the Start Time and End Time.
End Time
Buttons and Fields
Service: Click this to specify the service with which to filter the displayed information.
Database: Click this to specify the database with which to filter the displayed information.
Table: Click this to specify the table with which to filter the displayed information.
Start Time: Click this to specify the start time with which to filter the displayed information.
End Time: Click this to specify the end time with which to filter the displayed information.
Search Click this to search using the enabled filters.
Label This is the label of the device.
Clear Click this to clear the filters.

11.1 Opening the Dearchive window


Procedure

• Click Dearchive on the Archive/Dearchive menu.


Related Information
Data Cleanup on page 27

11.2 Opening the Dearchive dialog box


The Dearchive Control dialog box is used to dearchive data.
The most recent version of the archive file is the file that is dearchived. Do not initiate the dearchive
process close to the time when the daily archive occurs; this may interfere with the archive process. The
following procedure explains how to dearchive data.

Procedure

1. Open the Dearchive window.

You may use the filters to find the archived file to dearchive.
2. Click the row header of a selected record. This opens the Dearchive Control dialog box with its
field populated by configuration information of the record.
3. Select the archive host.

25
Data Dearchiving Archive Reference

4. (If required) Select the Service, the Database and the Table.
5. Select the Start/End Date.
6. Click Dearchive.

Figure 10 - Dearchive Control dialog box

The following table provides brief descriptions of the buttons, fields, and column headings that appear
on the Dearchive Control dialog box.

Table 9 - Fields on the Dearchive Control dialog box


Field/Button Description
Archive Host The name of the archive host. The archive host must be the primary
Archive server host.
Service: The service that contains the data to be dearchived.
Database: The database that contains the data to be dearchived.
Table: The table that contains the data to be dearchived. The table must have a
column called time (of ultimate data type int), which contains the age of
the associated data as the number of seconds since Jan. 1, 1970 GMT.
Dearchive Click this to dearchive the data.
Dismiss Click this to close the dialog box.

Related Information
Data Cleanup on page 27

26
Archive Reference Data Cleanup

12 Data Cleanup
What’s in This Chapter?
12.1 rts_cleanup.csc...............................................................................................................................28

12.2 Cleaning up Dearchived Data (Method 1)......................................................................................28


12.3 Cleaning up Dearchived Data (Method 2)......................................................................................29

After the historical data has been archived, it is eligible for cleanup. The cleanup process deletes all
data that has been archived and is older than the Delete Cutoff time specified in the Archive Control
dialog box. The date of the most recent deletion is also recorded in the schedule table.

After the historical data has been archived, it is eligible for cleanup. The cleanup process deletes all
data that has been archived and is older than the Delete Cutoff time specified in the Dearchive
Control dialog box. The date of the most recent deletion is also recorded in the schedule table.
In order to delete data, it must be archived. Therefore, when using JSH to schedule archiving and
cleanup, the former must be performed first. If you do not wish to save the data to an archive device,
then archive to the null device (i.e. NUL).

The Delete Cutoff field entry in the Archive Control dialog box specifies how old data must be before it
is deleted. Each entry follows the YY:MM:DD format, where YY specifies how many years must elapse,
MM specifies how many months must elapse, and DD specifies how many days must elapse before
deletion. The deletion time is calculated with respect to the start of the current day.

To illustrate, if the current time is 05-Feb‑96 14:35 when the cleanup process runs, the cutoff specifier
causes the archived data to be deleted as shown in the Delete Cutoff sample table below.

Table 10 - Delete Cutoff sample


Cutoff Specifier(Delete Cutoff: field on the Delete archived data up to
Archive Control dialog box)
00:00:00 05-Feb‑96 00:00
00:00:01 04-Feb‑96 00:00
00:01:00 05-Jan‑96 00:00
00:02:00 05-Dec‑95 00:00
01:00:00 05-Feb‑95 00:00

Previously deleted data that is subsequently dearchived is not cleaned up automatically by the system.

NOTE: Delete dearchived data as soon as it is no longer needed; otherwise, it fills up the database and
leaves no room for the data that is currently being collected.
Related Information
Using the Dearchive Cleanup dialog box
The Archive/Dearchive Menu on page 8
Opening the Archive Schedule Summary window on page 9
Adding an Archive Device on page 20
Media Initialization on page 22
Opening the Dearchive window on page 25

27
Data Cleanup Archive Reference

Opening the Dearchive dialog box on page 25


Cleaning up Dearchived Data (Method 1) on page 28
Cleaning up Dearchived Data (Method 2) on page 29

12.1 rts_cleanup.csc
Manual data cleanup can also be done using rts_cleanup.csc.

The process is started by executing rts_cleanup.csc on the RealTime machine. This locates the
Archive service host and executes the archive_support.exe program on that host. The syntax is:

rts_cleanup.csc [-h] [-A archive_host] [-parameters]

where:

-h displays usage information.

-A specifies a optional host name to force the command to run on. If a host is not specified, the primary
Archive service host for the local system is used.
NOTE: The Job Scheduler (JSH) is normally configured to run rts_cleanup.csc once per day after
rts_archive.csc has already run.

Table 11 - rts_cleanup parameters


Parameters Description
-c This option checks and reports if there is any
dearchived data that requires deletion. To delete
dearchived data, the -f flag must be specified.
-f This forces a full deletion, including manually
dearchived data.
-h This is used to display cleanup options described
in this table.
-p max_pages This sets the maximum number of pages to delete
with one SQL command. The default setting is
150.
-s service This option sets the name of the service which
hosts the database; default value for service is
Archive.
-d level This sets the level of debug message detail to
between 0 and 3 , where a level of 0 allows no
message and 3 gives maximum detail.

28
Archive Reference Data Cleanup

12.2 Cleaning up Dearchived Data (Method 1)


In this method, the cleanup is run on ezXOS.

Procedure

1. Open the Archive/Dearchive menu.


2. Click Cleanup. The Dearchive Cleanup dialog box appears to confirm the operation.
3. Select the Force full deletion, including manually dearchived data check box.
4. Click Execute.
Related Information
Data Cleanup on page 27

12.3 Cleaning up Dearchived Data (Method 2)


In this method, de-archived data is cleaned up by executing the following on the RealTime or on the
primary server host.

Procedure

1. Open a command prompt window on the primary Archive server host.


2. Type cleanup -f. The -f flag specifies a full delete. For more information, refer to the Cleanup
Options table.
3. Press enter.
Related Information
Data Cleanup on page 27

29
Data Rearchiving Archive Reference

13 Data Rearchiving
If historical data that has already been archived is edited, it is automatically scheduled for rearchiving.
Rearchive is triggered after each regular archive is performed by rts_archive.csc. The archive program
checks the rearchive table. If there are any entries in the table, the archive program collects information
from the schedule and catalog tables as required for rearchiving (for example, rearchive format and
device). After the information is collected, the rearchive is performed.

The archive file name for rearchived data is identical to the original file name, except that the version
number suffix is incremented each time the data is required. Therefore, the file name with the highest
version number reflects the most current state of the data.

Rearchive Troubleshooting
If rearchiving cannot be scheduled in the rearchive table after data is modified or inserted, the reason
may be one of the following:

• The data being modified or inserted has not been previously archived.

• The database and table in which the data was modified or inserted are not scheduled for archive in
the schedule table.

• The archive function is disabled in the RealTimeDB’s JSH table.

• The data being modified or inserted corresponds to the same period defined by the start and end
times of an entry already in the rearchive table, which was created previously due to modification or
insertion of the data in the same time interval in the same database and table.
If you need help to troubleshoot data rearchiving concerns, please contact your Service manager.

30
Archive Reference MonitorArchive Process

14 MonitorArchive Process
The monitorArchive process integrates the Archive Service into the Historical Service by
continuously transferring system data between the two services.

The monitorArchive process connects to the database server of the specified service and periodically
scans for any rearchive requests which have been logged there for processing.

NOTE: It gathers the rearchive requests and ensures that such requests are added to the rearchive
table.
In order to prevent overloading the specified system at peak period, the monitorArchive process halts
all connections during the first 10 minutes at the top of the hour.

The monitorArchive process also forwards the operational activities from the Archive Service to other
services for processing. Configuration modification events which are logged internally from various
Archive operations are forwarded by the monitorArchive process to the Historical Service in order to
complete proper OASyS DNA® event logging and audit trail.

Table 12 - monitorArchive Parameters


Parameter Description
-S <ServiceName> This is the name of service that will be monitored.
The default setting in the Historical database.
-T <IntervalTime> This is the interval time, in seconds, for which
rearchive requests are processed. The default
setting is 300 seconds.
-M <TOHMinuteValue> This is the time in minutes for which the process
will not update, started from the top of the hour.
The default setting is 10 minutes.
-h This generates a usage message with the
information in this table.

31
Archive Support Archive Reference

15 Archive Support
The archiveSupport program accepts requests on the Archive host to perform archive, dearchive and
cleanup operations.

It is called by rts_archive.csc, ezXOS Dearchive Control form and rts_cleanup.csc respectively. Specific
arguments which related to each operation are passed along to the archive.exe, dearchive.exe and
cleanup.exe as appropriate.

Table 13 - General arguments


Argument Description
-h Returns general usage information.
-f Archive function to perform (Initialize,
Dearchive, Cleanup, or Archive.

Table 14 - Archive arguments


Argument Description
-c Catalog archives to the null device.
-i <interval> Number of minutes between archives of batches
of collect data. Defaults to 0 (0 is not used.)
-s <Service> The name of the service which hosts the archive
data base. The default in Archive.
-e <directory> The name of the directory for temporary archive
files. The default is the user profile temp directory.
-m <size> The maximum amount of disk device space (in
megabytes) to keep for operating system
administration. Currently, Archive will keep 10%
to a maximum of 25 megabytes. This is only used
in disk devices.
-B "<BCP arguments>" These are optional arguments to pass to BCP.

Table 15 - Cleanup arguments


Argument Description
[options] All other options to be passed directly to the
cleanup executable, (run cleanup -h) for
details.

Table 16 - Initialize arguments


Argument Description
-d <device> The device tage from the Archive device table.
-t <device type> Use either FIXED_DISK or REM_DISK.
-p <physical device> The actual device being initialized.

32
Archive Reference Archive Support

Table 17 - Dearchive arguments


Argument Description
-S Specifies the service to dearchive to; for example
Historical.
-D Specifies the database to dearchive to.
-T Specifies the table to dearchive to.
-a Specifies the start date to dearchive from; it is
usually in the form of MM/DD/YY HH:MM.
-b Specifies the end date to dearchive from; it is
usually in the form of MM/DD/YY HH:MM.
-f Displays the informational messages while
executing.

33
Archive Structure Archive Reference

16 Archive Structure
What’s in This Chapter?
16.1 Archive Catalog Table.....................................................................................................................34

16.2 Archive ConfigModEventKeys Table...............................................................................................35


16.3 Archive Device Table......................................................................................................................36

16.4 Archive DumpSchedule Table.........................................................................................................36

16.5 Archive Rearchive Table.................................................................................................................36

16.6 Archive RearchiveDatabases Table................................................................................................37

16.7 Archive Schedule Table..................................................................................................................37

16.8 Archive ScheduleAuditTrail Table...................................................................................................38


16.9 Archive ValidDeviceTypes Table.....................................................................................................38

The Archive database is composed of tables that are only accessible to the System Manager. The
following sections list the tables in the Archive database.

A large part of the Archive database functionality is configured at system set-up. If you have questions
or concerns with the system, please contact your Service manager.

The following table provides information on Schneider Electric-defined data-types that are used in
Archive tables.

Table 18 - Telvent Data Types


Data Type Definition

boolType bit

cutoffType char(8)

deviceType varchar(40)

devnameType varchar(40)

eventNameType nvarchar(192)

filenameType varchar(80)

GMToffset smallint

GMTtime int

IDType smallint

labelType varchar(8)

sysNameType varchar(30)

34
Archive Reference Archive Structure

16.1 Archive Catalog Table


The catalog table keeps a complete list of Archive files which have been saved to specific Archive
media.

Internal Field Data Type Description


archId IDType This field is the Archive table identifier.
dbName sysnameType This field is the name of the database which the tableName belongs to.
tableName sysnameType This field is the name of the table which has had its data archived and
logged to the catalog table.
archLabel labelType This field is the label of the media for this archive.
archDevice devnameType This field is the name of the archive device.
archFile filenameType This field is the name of the archived data file.
archTime GMTtime This field shows the time that the archive was created (GMT).
archOffset GMToffset This field shows the local time zone that was in effect when archTime
was created.
startTime GMTtime This field is the start time of the data archive.
endTime GMTtime This field is the end time of the data archive.
dataOffset GMToffset This field shows the offset for the startTime and endTime.
verNum IDType This field is the version number of the archive. The version number is
assigned to the archive file name (archFile), which is composed of
<system ><server> <db> <table> <dd ><Mmm>
<YYYY>.archive_<version>. Version number starts at 0 and
increments for each rearchive occurrence for the table's data within the
same time frame.
currentVer boolType This field indicates whether the archive is the most current version.

16.2 Archive ConfigModEventKeys Table


The ConfigModEventKeys table stores details about configuration modifications done on the Archive
tables, which are to be forwarded to the Historical service for eventing purposes.

Internal Field Data Type Description


time GMTtime This field is the time of the event in GMT.
msec int This field is the millisecond section of time.
offset GMToffset This field is the difference (in minutes) between local time and
UTC when the time field was populated.
host eventNameType This field is the name of the host associated with the event.
process eventNameType This field is the name of the application or process associated
with the event.
tableName eventNameType This field is the name of the table associated with the event.
columnName eventNameType This field is the name of the table column associated with the
event.

35
Archive Structure Archive Reference

Internal Field Data Type Description


ptName eventNameType This field is the name of the point associated with the event.
message eventStringType This field is the text used for the event's message.
valueTypeString eventNameType This field is the type of the value changed.
oldStringValue eventStringType This field is the old value of the string.
newStringValue eventStringType This field is the new value of the string.
oldEnumIntValue int This field is the old value of the enumerated integer.
newEnumIntValue int This field is the new value of the enumerated integer.
modifiedUser eventNameType This field is the user who produced this modification.

16.3 Archive Device Table


The device table keeps track of the details of the devices on which the archive files are to be saved.

Internal Field Data Type Description


archDevice devnameType The field is the name of the archive device.
type deviceType This field displays the type of the archive device.
physicalDevice devnameType This field displays the type of the underlying physical device.
currentLabel labelType This field displays the label of the current archive media.
mediaState varchar(10) This field displays the state of the media which can be either EMPTY
or NONEMPTY, indicating whether or not archive files have been
saved to the device.

16.4 Archive DumpSchedule Table



This table is not used in versions of OASyS DNA beyond 6.0.

Internal Field Data Type Description


dbName sysnameType This field is the name of the database using Sybase procedures.
whenChanged tinyint This field indicates whether backup is needed whenever a changed is
detected in the database.
numBackups tinyint This field indicates the maximun number of backups to retain before
writing over the oldest one.
xactid binary This field is the ID of the newest transaction within the database.

36
Archive Reference Archive Structure

16.5 Archive Rearchive Table


The rearchive table stores the table details which need to be rearchived due to data modification.

Internal Field Data Type Description


archId smallint This field is the Archive table identifier.
svrName sysnameType This field is the name of the SQL Server.
dbName sysnameType This field is the name of the database to archive.
tableName sysnameType This field is the name of the table.
startTime GMTtime This field is the start time of the data archive.
endTime GMTtime This field is the end time of the data archive.
archFile filenameType This field is the name of the archived data file.
verNum IDType This field is the version number of the archive. The version number is
assigned to the archive file name (archFile), which is composed of
<system ><server> <db> <table> <dd ><Mmm>
<YYYY>.archive_<version>. Version number starts at 0 and
increments for each rearchive occurrence for the table's data within the
same time frame.

16.6 Archive RearchiveDatabases Table


The rearchiveDatabase table details the database under which tables are allowed to be rearchived.

Internal Field Data Type Description


serviceName sysnameType This field is the name of the OASyS DNA® service.
dbName sysnameType This field is the name of the database.

16.7 Archive Schedule Table


The schedule table stores the details on the list of tables which are set up to be archived.

Internal Field Data Type Description


archId IDType This field is the unique Archive identifier.
archEnable boolType This field indicates whether to enable or diable archiving.
svrName sysnameType This field is the name of the SQL Server.
dbName sysnameType This field is the name of the database to archive.
archDevice devnameType This field is the name of the destination archive device.
archCutoff cutoffType This field specifies the last date of records to be archived.
The format is YY:MM:DD.
archTime GMTtime The field is the last date of records that was archived.
archOffset GMTtime This field is the offset to the local time zone that was in effect
when archTime occurred.

37
Archive Structure Archive Reference

Internal Field Data Type Description


delCutoff cutoffType This field specifies the last date of records to be deleted. The
format is YY:MM:DD.
delTime GMTtime This field is the last time of records that was archived.
delOffset GMToffset This filed is the offset to the local time zone that was in effect
when delTime occurred.
bcpFormat text This field specifies the bulk copy format.
partitioningConfigured boolType This field indicates if the table to be archived has been
partitioned with OASyS DNA™ partitioning strategy.

16.8 Archive ScheduleAuditTrail Table


The scheduleAuditTrail table details the configuration modification done on archive schedules.

Internal Field Data Type Description


archId IDType This field is the unique Archive identifier.
archEnable boolType This field indicates whether to enable or diable archiving.
svrName sysnameType This field is the name of the SQL Server.
dbName sysnameType This field is the name of the database to archive.
tableName sysnameType This field is the name of the table to archive.
archDevice devnameType This field is the name of the destination archive device.
archCutoff cutoffType This field specifies the last date of records to be archived. The format is
YY:MM:DD.
delCutoff cutoffType This field specifies the last date of records to be deleted. The format is
YY:MM:DD.
lastModUser nvarchar(96) This field indicates the user who modified the archive schedule.
lastModTime datetime This field indicates the time of modification.

16.9 Archive ValidDeviceTypes Table


®
The validDeviceTypes table stores the list of OASyS DNA supported device types.

Internal Field Data Type Description


devType deviceType This field lists all the device types that can be selected for specifying a
new device type. The options are Null Device, Removable Disk, and
Fixed Disk.

38
Archive Reference Archive Structure

39
Schneider Electric
49 Quarry Park Blvd SE
Calgary, AB T2J 6V8 - Canada
Phone: 1 (403) 253-8848
www.schneider-electric.com

As standards, specifications, and designs change from time to time,


please ask for confirmation of the information given in this publication.

© Schneider Electric. All Rights Reserved.

You might also like