Solution
When you locate your Citadel database on disk, you will notice that it is separated into a number of different files. The historical data, alarm, and event information is stored in these files. Citadel stores databases in a designated group of files on the hard drive. A Citadel database typically resides in a folder unique to that database. You can store only one Citadel database in a folder. National Instruments recommends that you avoid placing non-database files in a folder containing a Citadel database. The following is an explanation of the different file extensions in the Citadel database.
Citadel 4
Historical Data FilesFile Name | Description |
thd00001.thd | Stores the actual historical data. Contains the pages of data from the traces. Each page is 4096 bytes. There are 256 pages per file, with 256 additional bytes of header information. |
tdb.tdb | This file defines the database. It includes trace names, database version info, and other similar information. If this file is lost or corrupted, you will need the backup file to recover. |
tdb.bak | The backup for the tdb.tdb file. If both this file and the tbd.tbd file are lost or corrupted, data cannot be recovered. |
tdx.tdx | Temporary meta block and page index. This contains a quick-lookup index for the components of a trace to speed up viewing of the database. This file will be regenerated if lost. It takes a while to regenerate if your database is large. |
Alarm and Event FilesFile Name | Description |
Ale00000.ale | Stores the actual body of alarm and event data. |
Aleack00000.adx | Quick lookup index for currently acknowledged alarms that have not been reset. |
Aleset00000.adx | Quick lookup index for currently set alarms that have not been acknowledged. |
Aleldx00000.adx | Lookup Index of all alarms in the ALE files. |
areas.dat | Stores alarm areas. |
mdx.mdx | Top-level meta-index. This is similar to tdx.tdx in that it can be regenerated if lost. This file helps open the database faster. |
Alarm and event data are contained in files with the Ale prefix. Files with the *.adx extension can be regenerated if they are lost or damaged.
Citadel 5
Historical Data FilesFile Name | Description |
cx00000001.cdpg | Data file(s). This is equivalent to the *.thd extension in Citadel 4. |
ix00000001.cdib | Part of the page index files. This is part of the *.tdx extension in Citadel 4. |
stridm.cdin | Sub-index file. This is part of the *.tdx extension in Citadel 4. |
pid.cdih | Header of page index file. This is part of the *.tdx extension in Citadel 4. |
nodetree.elog | Node tree for browsing the database, high-level index file. This is part of the *.tdb extension in Citadel 4. |
nodetree.elog.ckpt0 (or .pt1) | Raw backup file of nodetree, pt0/pt1 are alternating files extensions to give maximum robustness. This is part of the *.tdb extension in Citadel 4. |
nodetree.elog.cpct | Compacted backup file of nodetree. This is part of the *.tdb and *.bak extensions in Citadel 4. |
Alarm and Event FilesFile Name | Description |
mssql.mdf | SQL Server database for historical alarms and events. This is part of the *.ale extension in Citadel 4. |
mssql.ldf | Index file for historical alarms and events. This is part of the *.adx extension in Citadel 4. |
rdbfiles.lst | List of MSDE files in detached database |
sdb_lock | Lock file exists when database has active logger |
Each distinct piece of alarm and event data is composed of several fields of data of varying types. Although Citadel can store numeric data efficiently, Citadel is not optimized for storing record-based data. Storing alarm and event data in the primary Citadel format can lower efficiency and provide a less than optimal mechanism for returning alarm data for viewing.
National Instruments stores alarm and event data in an attached Microsoft SQL Server 2005 Express Edition (SQL Server Express or SSE) relational database. SSE is freely redistributable and therefore does not impact the pricing of the DSC Module. SSE can be upgraded to Microsoft SQL Server if necessary. National Instruments recommends that you treat the attached SSE database as a part of Citadel and access it via the API provided with the DSC Module.
The alarms and events portion of a Citadel database is limited to 4GB. The SQL Server Express database imposes this restriction. If you require more than 4GB alarm and events in a single Citadel database, you can purchase SQL Server 2005 Workgroup Edition from Microsoft, which removes the 4GB restriction.
Caution: Do not modify, move, or delete a database file while the database is attached. Doing so results in a database corruption. If you modify or delete a database file while the database is detached, you might not be able to reattach the database, and you might lose some or all of the data in the database. If you move or copy a detached database, move or copy all database files.