Where Are My Historical Data, Alarm and Event Files Located in My Citadel Database?

Updated Apr 18, 2023

Issue Details

When I find the location on disk where I stored my Citadel database, all I see is a bunch of files with different extensions.  What are all of these files? 
 

 

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 Files
File NameDescription
thd00001.thdStores 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.tdbThis 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.bakThe backup for the tdb.tdb file. If both this file and the tbd.tbd file are lost or corrupted, data cannot be recovered.
tdx.tdxTemporary 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 Files
File NameDescription
Ale00000.aleStores the actual body of alarm and event data.
Aleack00000.adxQuick lookup index for currently acknowledged alarms that have not been reset.
Aleset00000.adxQuick lookup index for currently set alarms that have not been acknowledged.
Aleldx00000.adxLookup Index of all alarms in the ALE files.
areas.datStores alarm areas.
mdx.mdxTop-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 Files
File NameDescription
cx00000001.cdpgData file(s).  This is equivalent to the *.thd extension in Citadel 4.
ix00000001.cdibPart of the page index files.  This is part of the *.tdx extension in Citadel 4.
stridm.cdinSub-index file. This is part of the *.tdx extension in Citadel 4.
pid.cdihHeader of page index file.  This is part of the *.tdx extension in Citadel 4.
nodetree.elogNode tree for browsing the database, high-level index file.  This is part of the *.tdb extension in Citadel 4.
nodetree.elog.ckpt0 (or .pt1Raw 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.cpctCompacted backup file of nodetree.  This is part of the *.tdb and *.bak extensions in Citadel 4.

 


Alarm and Event Files
File NameDescription
mssql.mdfSQL Server database for historical alarms and events.  This is part of the *.ale extension in Citadel 4.
mssql.ldfIndex file for historical alarms and events.  This is part of the *.adx extension in Citadel 4.
rdbfiles.lstList of MSDE files in detached database
sdb_lockLock 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.