Microsoft SQL Server Data Driver

Information

Loads point-data from mssql databases.

The database is expected to be in a one-value-per-row format, as shown in the examples below.

Driver InfoDetail
Driver Type:Live and History
Platforms:All

Performance Notes

We suggest you avoid using a relational database for high-speed time series data.

If you are using an SQL database rather than a dedicated time-series database, you may need to ensure your tables contain appropriate keys.

You should have a key that includes both the Lookup Field and the Date Stamp, and vice-versa. This will make queries significantly faster, particularly if you are querying large amounts of data.

Note that for compatibility reasons, the driver does not use some of the function calls available in SQL Server 2016 and above. As such, the performance of this driver is not ideal.

Driver Settings - Live

Live drivers have the following options

OptionDescription
HostThe IP address or host name of your MSSQL server
PortThe TCP port to connect to
DatabaseThe name of the MySQL database
UsernameThe username to login as. Must have read access to the table.
PasswordThe password to go with the username above
TableThe database table to query
Lookup FieldThe field that contains the point name
Date StampThe field that contains the timestamp for the record (optional)
ValueThe field that contains the value for the record
FilterAn SQL filter you might want to add to the query (optional)

Example

We have a table in the recordings database on my.mssql.com with the following structure…

Records Table:

PointNamePointValue
R201_TEMP12.5
R202_TEMP13.2
R203_TEMP11.9

Here are the options you could use to connect…

OptionValue
Hostmy.mssql.com
Port3306
Databaserecordings
UsernameDBUser
PasswordDBPassword
TableRecords
Lookup FieldPointName
Date Stamp
ValuePointValue
Filter

Point Names

Point names are simply the value of the Lookup Field to find in the MySQL table.

Using the above example, a good point name would be R201_TEMP.

Driver Settings - History

History drivers have the following options

OptionDescription
HostThe IP address or host name of your MSSQL server
PortThe TCP port to connect to
DatabaseThe name of the MySQL database
UsernameThe username to login as. Must have read access to the table.
PasswordThe password to go with the username above
TableThe database table to query
Lookup FieldThe field that contains the point name
Date StampThe field that contains the timestamp for the record (optional)
ValueThe field that contains the value for the record
FilterAn SQL filter you might want to add to the query (optional)
Date FormatThe format the date is stored/communicated in. Almost always 'Timestamp'
Date DistributionSee the section on Scattered vs Synchronised Data Sources
TimezoneThe timezone all date stamps are stored in

Installation

Windows:
Available on the ARDI Downloads site for Windows servers.

Linux:

sudo apt-get install ardi-mssql