Download Overview of Citadel Historical Database Archiving Methods

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Microsoft SQL Server wikipedia , lookup

Serializability wikipedia , lookup

Entity–attribute–value model wikipedia , lookup

Oracle Database wikipedia , lookup

IMDb wikipedia , lookup

Extensible Storage Engine wikipedia , lookup

Ingres (database) wikipedia , lookup

Open Database Connectivity wikipedia , lookup

Functional Database Model wikipedia , lookup

Microsoft Jet Database Engine wikipedia , lookup

Relational model wikipedia , lookup

Database wikipedia , lookup

Concurrency control wikipedia , lookup

Database model wikipedia , lookup

Clusterpoint wikipedia , lookup

ContactPoint wikipedia , lookup

Transcript
Overview of Citadel Historical Database Archiving Methods
Print this Page
A Citadel database is used by Lookout and the LabVIEW Datalogging and Supervisory Control module for
historical data and alarms and events logging. Each database consists of several files. You can learn more
about the files in the Historical Data, Alarm, and Event Files in Citadel 4 Developer Zone document. This
document discusses the options you have for archiving a Citadel database.
Table of Contents:

Using Third-Party Utilities

Backing Up Database to a Remote Computer

Using CitadelControl in Lookout

Using Archive Database.vi in the LabVIEW DSC Module

Using Historical Data Viewer in MAX
Using Third-Party Utilities
The Citadel historical database uses proprietary mechanism for data storage. The internal format of the files is not
supported by any third-party utilities. Therefore, the utilities can only access the database as an atomic unit and back up
the database in whole. National Instruments (NI) tools discussed later are able to read the content of the database and
can back up the database, in part.
There are plenty of utilities that can back up the database by copying or archiving all the files, such as NT Backup or the
Windows 2000 Backup (Accessories»System Tools). However, the third-party tools cannot archive database that is
currently open for logging. An open database keeps part of its data in memory buffers. Making a copy would create an
incomplete and inconsistent database. You can only execute third-party backups on database that is not open by Citadel
service.
Citadel database comes with an ODBC driver. If you want to make a copy of your data and stored the data in a thirdparty database, such as Oracle or MS SQL server, you can leverage off the ODBC driver. The driver can read data from
a database that is currently open for logging. The ODBC driver can read just part of the data, not the whole database.
The only limitation is that the ODBC driver cannot access the alarms and events stored in the database and also does
not support traces of a binary string data type (BLOBs). The ODBC driver supports numerical, Boolean and text strings.
Refer to the document below to learn how to configure the ODBC driver.
See Also:
Setting up a Citadel Database as an ODBC Data Source for Lookout or LabVIEW DSC.
Backing Up Database to a Remote Computer
The NI archive tools can only back up data on the same computer, where the source database resides. NI archive tools
cannot create a backup on a remote computer, or a shared or mapped folder. In order to create a remote backup you
have to use an additional tool. If you want to back up a database that is currently open for logging you have to first create
a local archive, because of the restriction mentioned in the previous section. The complete scenario is outlined on the
following figure:
1) Use an NI tool to create a local archive of your current Citadel database.
2) Use an additional tool to copy the archive to a remote computer.
Using CitadelControl in Lookout
Lookout 4.5 version and higher ships with the CitadelControl object that can perform database archives. You can
execute the archive operation on an open database. The object can archive the database in whole or in part. You can
archive just a subset of traces and/or just a certain time interval. These parameters are defined in the CitadelControl
object.
Note If you execute periodic archives and you keep data in the destination database, the archive operation won't try to
rewrite the already archived part, instead it will only add the new data that is missing. For example if you execute the
archive every midnight, only the new data, since the last midnight will be archived. This significantly saves the archive
execution time.
In the example CitaelControl object below, as soon as the ArchiveNow_Pb pushbutton is pressed, all of the traces ("*")
from the c:\project\database directory will be archived to the c:\project\database_backup directory
on the same computer. Complete traces, across all their lifespans will be archived (from and to times set to 0).
For a complete example on how to use the CitadelControl, refer to the link below. The example in the link also shows
how to perform archiving to a remote computer, by using a MS-DOS copy command. You can use more sophisticated
copy utility, for example the Windows 2000 Backup.
See Also:
Archiving Citadel Database to a Remote Computer in Lookout
Using Archive Database.vi in the LabVIEW DSC Module
The LabVIEW DSC module 6.1 version ships with a set of Citadel database control VIs. One of the VIs, Archive
Database.vi, allows you to perform a destructive (deletes the archived data) or nondestructive (keep the archived data)
archive. You can execute the archive operation on an open database. The VI can archive the database in whole or in
part. You can archive a subset of traces and/or a certain time interval, by wiring the VI parameters.
Note If you execute periodic archives and you keep data in the destination database, the archive operation will not try to
rewrite the already archived part, instead it will only add the new data that is missing. For example, if you execute the
archive every midnight, only the new data--since the last midnight-- will be archived. This significantly saves the archive
execution time.
The source and destination database have to be on the same computer. You can not archive a local database to a
remote computer with this VI. You have to first create a local archive and then copy the archive to a remote computer
with some additional tools. For a complete example on how to use the VI to archive database to a remote computer refer
to the link below.
You can also archive alarms and events. The same rules and restrictions apply. Use the following VI to execute the
archive.
See Also:
Archiving Citadel Database to a Remote Computer in the LabVIEW DSC Module
Using Historical Data Viewer in MAX
Both Lookout 5.0 and the LabVIEW DSC module 6.1 ship with a new Citadel database management tool: the Historical
Data Viewer. The tool is an integral part of the Measurement and Automation Explorer. Aside from other capabilities, the
Historical Data Viewer allows you to manually archive a Citadel database. You can execute the archive operation on an
open database, in whole or in part. The archive operates on views. The Trace view groups a subset of selected traces.
You can also specify a time interval in which you want the archive operation to operate.
Note If you execute a subsequent archive and you keep data in the destination database, the archive operation will not
try to rewrite the already archived part, instead it will only add the new data that is missing. For example, if you execute
the archive every midnight, only the new data--since the last midnight--will be archived. This significantly saves the
archive execution time.
To archive alarms and events, create a Alarms/Events view by right-clicking a database and selecting New
View»Alarms/Events. The same rules and restrictions apply.
Refer to the Measurement and Automation Explorer for more information about the Historical Data Viewer.