ihCollectors Table
The ihCollectors table contains the configuration and status information for each collector connected to the Historian server. Each row in this table represents a collector that is connected to the archiver. The following table describes the columns of the ihCollectors table.
Column Name | Data Type | Description |
---|---|---|
CollectorName | VT_BSTR | The name of the collector. The collector name is unique in a specific Historian server. |
CollectorDescription | VT_BSTR | The user description for the collector. |
Comment | VT_BSTR | The user comment associated with the collector. |
ComputerName | VT_BSTR | The name of the Windows computer on which the collector is running. |
Status | VT_BSTR | The status of the specified collector:
|
CollectorType | VT_BSTR | The type of collector responsible for collecting data for the tag:
|
MaximumDiskFreeBufferSize | VT_I4 | The maximum size (in MB) of the disk buffer for outgoing data. |
MaximumMemoryBufferSize | VT_I4 | The maximum size of the memory buffer (in MB) for outgoing data. The memory buffer stores data during short-term or momentary interruptions of the server connection. The disk buffer handles long-duration outages. |
ShouldAdjustTime | VT_BOOL | If the data source supplies the timestamps, this value is False . If the collector supplies the timestamps, this value is True .Note: This column does not change collector times to match the server time. It indicates whether an increment of time is added or subtracted to compensate for the relative difference between the server and collector clocks, independent of time zone differences. |
ShouldQueueWrites | VT_BOOL | Indicates whether queue writes are allowed. |
CanBrowseSource | VT_BOOL | If True , this column indicates that the collector can browse its source for tags. |
CanSourceTimestamp | VT_BOOL | Indicates whether the data source can provide timestamps along with the data. |
StatusOutputAddress | VT_BSTR | An address or tagname in the data source to output current collector status. |
RateOutputAddress | VT_BSTR | An address or tagname in the data source into which the collector writes the current value of the events per minute output. |
HeartbeatOutputAddress | VT_BSTR | The address in the source database into which the collector writes the heartbeat signal output. |
CollectorGeneral1 | VT_BSTR | The general (or spare) configuration fields for the collector. The CollectorGeneral1 column is not user-defined, and is different for each collector. |
CollectorGeneral2 | VT_BSTR | The general (or spare) configuration fields for the collector. The CollectorGeneral2 column is not user-defined, and is different for each collector. |
CollectorGeneral3 | VT_BSTR | The general (or spare) configuration fields for the collector. The CollectorGeneral3 column is not user-defined, and is different for each collector. |
CollectorGeneral4 | VT_BSTR | The general (or spare) configuration fields for the collector. The CollectorGeneral4 column is not user-defined, and is different for each collector. |
CollectorGeneral5 | VT_BSTR | The general (or spare) configuration fields for the collector. The CollectorGeneral5 column is not user-defined, and is different for each collector. |
LastModified | VT_DBTimeStamp | The date and time that the collector configuration was last modified. The time structure includes milliseconds. |
LastModifiedUser | VT_BSTR | The username of the Windows user who last modified the collector configuration. |
SourceTimeInLocalTime | VT_BOOL | For data source timestamps only. Indicates whether the timestamps use local time. If the value is False , UTC time is used. |
CollectionDelay | VT_I4 | The length of time, in seconds, that the collector should delay collection at startup (to allow the data source time to initialize). |
DefaultTagPrefix | VT_BSTR | The prefix that is automatically applied to all tagnames added by the specified collector. |
DefaultCollectionInterval | VT_I4 | The collection interval, in milliseconds, for tags added by the collector. |
DefaultCollectionType | VT_BSTR | Type of collection used to acquire data for tags added by the collector:
Note: Not all collectors support unsolicited type collection. |
DefaultTimeStampType | VT_BSTR | Type of timestamping applied to data samples at collection time for tags added by the collector:
|
DefaultCollectorCompression | VT_BOOL | Indicates whether default collector compression is enabled for tags added by the collector. |
DefaultCollectorCompressionDeadband | VT_R4 | The default collector compression deadband for tags added by the collector. |
DefaultCollectorCompressionTimeout | VT_I4 | The default collector compression timeout value. |
DisableOnTheFlyChanges | VT_BOOL | Indicates whether a user can make on-the-fly changes to this tag. When enabled (True ) you can make changes to this tag without having to restart the collector.When disabled ( |
DefaultSpikeLogic | VT_BOOL | Indicates whether Spike Logic is enabled. |
DefaultSpikeMultiplier | VT_R4 | The default Spike Logic multiplier. |
DefaultSpikeInterval | VT_I4 | The default Spike Logic interval. |
RedundancyEnabled | VT_BOOL | Indicates whether collector redundancy is enabled. |
PrincipalCollector | VT_BSTR | Indicates the primary collector. |
IsActiveRedundantCollector | VT_BOOL | Indicates whether the current collector is active. |
FailoverOnCollectorStatus | VT_BOOL | Indicates whether the collector is set to fail over on an unknown collector status. |
FailoverOnBadQuality | VT_BOOL | Indicates whether the collector is set to fail over on bad data quality received from the watchdog tag. |
FailoverOnValue | VT_BOOL | Indicates whether the collector is set to fail over on a change in value. |
FailoverValueChangeType | VT_I4 | The value for the FailoverOnValue option. |
WatchdogValueMaxUnchangedPeriod | VT_I4 | The maximum period for an unchanged value. |
WatchdogTagName | VT_BSTR | The watchdog tag name. |
TimeZone | VT_BSTR | The type of time zone used:
|
DaylightSavingTime | VT_BOOL | Indicates whether Daylight Saving Time logic should be applied to timestamps. |
RowCount | VT_I4 | The maximum number of rows that can be returned. A value of 0 indicates there is no limit to the number of rows returned. |
ihCollectors Examples
One task that you might want to perform on the ihCollectors table could be retrieving and recording the state of the collectors when an event happens. Recording conditions when an event happens is useful in troubleshooting.
Sample SQL statements for the ihCollectors table are outlined in the following examples.
Example 1: Retrieve All Collectors With Status Information
SELECT collectorname, collectordescription AS desc, status
FROM ihcollectors
Example 2: Retrieve All Collectors Not Running
SELECT collectorname, collectordescription AS desc, status
FROM ihcollectors WHERE status!=running