TagHistory
- Last UpdatedMar 10, 2025
- 8 minute read
Historian needs some essential information about how time-series data is stored ("metadata") in order to correctly interpret that data when stored in the history blocks. Since this metadata can change over the life of a tag, the system must preserve the complete metadata record for all history blocks. The ability to store tag metadata to an alternate file location is also possible.
When a tag record gets modified or deleted in the Tag table, the system automatically preserves the previous tag version in the TagHistory table. The TagHistory table should not be modified by the user, otherwise the data stored in the history block may become inaccessible.
Contains one row for each tag metadata instance uniquely identified by the TagId column.
Important: This table is for internal use only. Do not edit this table as it may result in unpredictable behavior. Additionally, Invensys reserves the right to make modifications to the structure/schema of the table as needed.
|
Column |
Data Type |
Description |
|---|---|---|
|
(PK) TagId |
uniqueidentifier NOT NULL |
The unique identifier for the tag. Internal use only. |
|
TagName |
TagNameType (nvarchar(256)) NOT NULL |
The unique name of the tag within the AVEVA Historian system. Internal use only. |
|
Description |
nvarchar(512) NULL |
The description of the tag. Internal use only. |
|
AcquisitionType |
tinyint NOT NULL |
The method by which the tag's value is acquired. If the tag value is acquired from an I/O Server, specify the name of the I/O Server, topic, and item. 0 = Not acquired; 1 = Acquired via an I/O Server; 2 = Acquired via HCAL or MDAS or a manual update; 3 = System driver. Internal use only. |
|
StorageType |
smallint NOT NULL |
The type of storage defined for the tag. 0 = Not stored; 1 = Cyclic; 2 = Delta; 3 = Forced storage; 17 = The storage type has been changed from cyclic to "not stored." 18 = The storage type has been changed from delta to "not stored." 19 = The storage type has been changed from "forced" to "not stored." Internal use only. |
|
StorageRate |
int NOT NULL |
The rate at which the tag is stored if the storage type is cyclic. The rate is in milliseconds. Internal use only. |
|
TagType |
int NOT NULL |
The type of tag. 1 = Analog; 2 = Discrete; 3 = String; 5 = Event, 7 = Summary tag (analog or state). TagType is a foreign key from the TagRef table. Internal use only. |
|
TimeDeadband |
int NULL |
The minimum time, in milliseconds, between stored values for a single tag. Any value changes that occur within the time deadband are not stored. The time deadband applies to delta storage only. A time deadband of 0 indicates that the system will store the value of the tag each time it changes. Internal use only. |
|
DateCreated |
datetime2(7) NOT NULL |
The date that the tag was created. If not specified, this date will be automatically generated. Internal use only. |
|
CreatedBy |
nvarchar(256) NOT NULL |
The name of the user or application that created the tag. If not specified, this name will be automatically generated. Internal use only. |
|
CurrentEditor |
tinyint NOT NULL |
Used to specify which application or editing environment controls the tag definition. Tags imported from the InTouch HMI software use InTouch as the current editor. If modifications are made to an imported tag in the historian Configuration Editor, then the current editor for the tag is changed to AVEVA Historian. If a re-import is performed, any modifications made using the Configuration Editor are preserved. You can manually maintain InTouch as the current editor for re-importing; however, all changes made to the tag using the Configuration Editor are lost during the re-import. Tags (attributes) that are initially configured using AVEVA Application Server use the ArchestrA Integrated Development Environment (IDE) as the current editor. If you modify an Application Server tag using the historian Configuration Editor, then the current editor for the tag is changed to AVEVA Historian. However, the next time you redeploy the engine, the changes are not preserved. 0 = AVEVA Historian; 1 = InTouch; 2 = AVEVA Application Server. CurrentEditor is a foreign key from CurrentEditor table. Internal use only. |
|
ServerTimeStamp |
bit NOT NULL |
Used to indicate whether local timestamping by the AVEVA Historian is used. 0 = The IDAS timestamp is used; 1 = The AVEVA Historian time is used for the timestamp. If a fast-changing tag is configured to use server timestamping, the packet of data that is sent to the storage subsystem may contain multiple data values with the same timestamp, which may affect data calculations, such as for swinging door storage. Internal use only. |
|
DeadbandType |
smallint NOT NULL |
The type of delta storage deadband to be applied for the tag. This setting is only in effect if delta storage is configured for the tag. 1= Time and/or value deadband; 2 = Rate (swinging door) deadband. Internal use only. |
|
ChannelStatus |
tinyint NOT NULL |
Used for tags from AVEVA Application Server 2012 R2 or later or the AVEVA Historian SDK 2012 R2 or later. Used to specify how disconnects between these sources and the AVEVA Historian are reflected in the data until the disconnect period can be backfilled with store-and-forward data, if store-and-forward is enabled. 1 = Enabled. NULL values are injected into the data stream for the disconnect period. For a trend, this means that a line gap appears during the period of NULL values. The tag remains in store-and-forward mode until the timestamps become greater than the startup time of the server or the time that the connection was restored. 0 = Disabled. NULL values are not injected and no gap is shown in client-side trends. The channel status value is ignored for tags that use classic storage. ChannelStatus is a foreign key from ChannelStatus table. Internal use only. |
|
AIHistory |
bit NOT NULL |
Used to indicate whether data exists for a tag in both storage and classic storage. 0 = No data was previously collected by classic storage; 1 = The tag may have data previously collected by classic storage. Internal use only. |
|
Message0 |
nvarchar(64) NULL |
The message associated with the FALSE state of the discrete tag. The maximum number of characters is 64. A discrete tag set to 0 is in the FALSE state. Internal use only. |
|
Message1 |
nvarchar(64) NULL |
The message associated with the TRUE state of the discrete tag. The maximum number of characters is 64. A discrete tag set to 1 is in the TRUE state. Internal use only. |
|
Unit |
nvarchar(32) NULL |
The unit of measure. Examples are mph, grams, and pounds. Internal use only. |
|
DefaultTagRate |
init NULL |
The default rate, in milliseconds, at which tags are cyclically stored, based on engineering units. Although the system does not make use of this engineering unit based tag rate, you can reference this value in custom SQL scripts. The value you enter for this tag rate does not affect the default storage rate set for the tag. Internal use only. |
|
IntegralDivisor |
float NULL |
The factor to be applied when integrating a rate with the units [EngUnits/TimeUnit] to a quantity with units [EngUnits]. This factor is called the integral divisor. The default value of 1 assumes a time unit of seconds and ensures that a rate of [Unit/second] is correctly integrated to [Unit]. For a time unit of minutes, set the integral divisor value to 60; for a unit of hours, set the integral divisor value to 3600. The integral divisor is applied similarly to rates or quantities that are not expressed in terms of a time unit. For example, to convert watts to watt-hours, the integral divisor is 1/3600. To convert watts to kilowatt-hours, the integral divisor is 1/3600000. Internal use only. |
|
MinEU |
float NULL |
The minimum value of the tag, measured in engineering units. Internal use only. |
|
MaxEU |
float NULL |
The maximum value of the tag, measured in engineering units.Internal use only. |
|
MinRaw |
float NULL |
The minimum value of the raw acquired value. Internal use only. |
|
MaxRaw |
float NULL |
The maximum value of the raw acquired value. Internal use only. |
|
Scaling |
int NULL |
The type of algorithm used to scale raw values to engineering units. For linear scaling, the result is calculated using linear interpolation between the end points. 0 = None; 1 = Linear; 2 = Square Root. (Square root is reserved for future use). Internal use only. |
|
RawType |
int NULL |
The numeric type for the raw value. 1 = Euro Float, an outdated data type (4 bytes); 2 = MS Float (4 bytes); 3 = Integer (2 or 4 bytes); 4 = MS Double (reserved for future use) (8 bytes). Internal use only. |
|
ValueDeadband |
float NULL |
The percentage of the difference between the minimum and maximum engineering units for the tag. Any data values that change less than the specified deadband are not stored. The value deadband applies to delta storage only. A value of 0 indicates that a value deadband will not be applied. Internal use only. |
|
IntegerSize |
tinyint NULL |
The bit size of the analog tag. 12 = 12-bit; 15 = 15-bit; 16 = 16-bit; 32 = 32-bit; 64 = 64-bit (reserved for future use). Internal use only. |
|
SignedInteger |
bit NULL |
Used to specify whether an integer is a signed number (positive or negative) or an unsigned number (positive only). 0 = Unsigned; 1 = Signed. Internal use only. |
|
RateDeadband |
float NULL |
The percentage of deviation in the full-scale value range for an analog tag. The swinging door (rate) deadband applies to delta storage only. Time and/or value deadbands can be used in addition to the swinging door deadband. Any value greater than 0 can be used for the deadband. A value of 0 indicates that a swinging door deadband will not be applied. Internal use only. |
|
InterpolationType |
tinyint NULL |
The interpolation type for retrieval. 0 = Stair-stepped interpolation; 1 = Linear interpolation (if applicable, based on the tag type); 254 = System default interpolation mode. The system default interpolation type is to use the system default for the analog type, either integer or real. The system default interpolation type for an analog type is determined by the setting of the InterpolationTypeInteger and InterpolationTypeReal system parameters. This setting impacts Interpolated, Average, and Integral retrieval modes. Internal use only. |
|
RolloverValue |
float NULL |
The first value that causes the counter to "roll over." This rollover value is used by the "counter" retrieval mode. For example, a counter that counts from 0 to 9999, the counter rolls over back to 0 for the 10,000th value it receives. Therefore, set the rollover value to 10,000. Internal use only. |
|
MaxLength |
smallint NULL |
The maximum number of characters for the string. Valid values are: 8, 16, 24, 32, 48, 64, 128, 131, 256, 512. Internal use only. |
|
DoubleByte |
tinyint NULL |
Used to specify whether or not to store the string as a double-byte string. 0 = Not stored as double-byte; 1 = Stored as double-byte. The default is 0. Internal use only. |
|
StructureId |
uniqueidentifier NULL |
The unique identifier for the structure. StructureId is a foreign key from the StructureType table. Internal use only. |
|
SourceTag |
nvarchar(256) NULL |
The name of the source tag used for the replication tag. Internal use only. |
|
SourceServer |
nvarchar(255) NULL |
The name of the tier 1 server with the source tag. Internal use only. |