rdbSqlServer-SqlServerDatabase

This component models an Microsoft SQL Server database versions: SqlServer 2000, SqlServer 2005, SqlServer 2008, SqlServer 2008 R2 and SqlServer 2012. It is available in the rdbSqlServer palette.
Figure 31.   SqlServerDatabase properties
Image

You access the properties to configure the driver for this database by expanding Config > Drivers > RdbmsNetwork, and double-clicking the SqlServerDatabase node in the Nav tree.

The Rdbms driver does not support Windows Authentication alone. You must have selected SQL Server Authentication (mixed mode) for any user of this database. This is an SQL Server login property, not a Niagara property.

In addition to the standard properties (Status, Enabled, Fault Cause, Health and Alarm Source Info), these properties support this component.

Property Value Description
Host Address IP address Sets the IP address or hostname of the computer platform where the database resides. A Dialup selection option is available, if required. This property does not apply to the MySQL device.
Use Encrypted Connection true or false (default) Indicates if the connection between the station and the database is secure (true) or not secure (false). To ensure that your system cannot be hacked, leave this property set to true. Change it only if your database does not support data encryption.
User Name text Defines the user name used to log in to the database.

Login credentials must provide sufficient database privileges to allow you to perform one or more (depending on database type) of these commands: CREATE TABLE, CREATE INDEX, CREATE SEQUENCE

Password text Defines the password required to log in to the database. The Confirm property must be an exact match to the Password property.
Worker additional properties The “rdb-RdbmsWorker” topic documents these properties.
Export Mode drop-down list Specifies how histories are exported to the specified database.

By History Id exports one table per History Id. This is the default value setting.

By History Type exports one table per History Type. This option may make the data easier to query once exported.

Use Unicode Encoding Scheme true or false (default) Creates history table schemas with the Universal character set Transformation Format (UTF-8) or Unicode data types for string-valued columns to store Asian character sets.

false maintains backward compatibility with legacy history export mechanisms.

true enables the NVARCHAR data type for any column in a table that expects string data.

 NOTE: An Update Wizard is available to upgrade existing databases to support Unicode. 

Timestamp Storage drop-down list Exports or updates history timestamps to Coordinated Universal Time (UTC) enabling the export of history records from different timezones into a common database and be chronologically correct and independent of any specific source timezone characteristics. In other words, exported histories show the timestamp data from where the history is actually stored, making useable histories with a consistent timestamp.

Dialect Default maintains compatibility with legacy history export mechanisms. This property does not apply to the MySQL device.

Local Time Stamp applies to Orion databases only and does not apply to history exports.

Utc Timestamp exports all subsequent histories with UTC timestamps.

Utc Millis applies to Orion databases only and does not apply to history exports.

 NOTE: An Update Wizard is available to upgrade existing databases to support Unicode. 

Points folder Holds all points.
Sql Scheme Enabled true or false (default) Permits (true) and prohibits (false) the use of ORDs that contain sql:.

If a BFormat contains sql:, users can directly query the database bypassing framework access control and make direct changes to the database. This is a security risk. Best security practice sets this property to false.

Rdb Security Settings additional properties The “rdb-RdbSecuritySettings” topic documents these properties.
Instance Name text Configures a connection to a SqlServer database if the user has not been previously set up in the SqlServer with a default Database Name or Instance Name, or to connect to a name that is not the default. If a default name has been set up and you need to connect to it, you can leave this property blank.
Port number (defaults to 3306) Specifies the port number to use when connecting with the database. Defaults are:

HsqlDbDatabase, no port specified because this rdb is for local database use only:

MySQLDatabase: 3306

OracleDatabase: 1521

SqlServerDatabase: 1433

Histories additional properties “rdbMySQL-MySQLHistoryDeviceExt” documents these properties.
Extra Connection Properties normally left blank; if used takes the format: parameter1=value1;parameter2=value2;...etc. Configures additional properties that are not required for a normal connection to the database. The driver passes this information in plain text to the database.

You can set certain configuration properties as part of the extra connection properties of the RDBMS database to optimize the batch processing of the insert queries, specifically the history export queries.

To enable the JDBC driver of a MySQL Server to pack as many queries as possible into a single network packet, lowering network overhead, set rewriteBatchedStatements set to true.

Version drop-down list, defaults to Sql Server 2008 Determines if the Sql Server database supports the SQL DATE type. The DATE Sql type is supported from Sql server 2008 onwards and the database device needs to know how to translate timestamps when retrieving records. Set this property to match the version of the database you are connecting to.

Sql Server 2008 specifies that the Version of Sql Server you are connecting to is Sql Server 2008.

 NOTE: Use this option to connect to an Sql version that is more recent than Sql Server 2008, such as Sql Server 2012. 

Sql Server 2005 specifies that the Version of Sql Server you are connecting to is Sql Server 2005.

Sql Server 2000 specifies that the Version of Sql Server you are connecting to is Sql Server 2000.

Connector drop-down list (defaults to Jtds) Selects a JDBC (Java Data Base Connectivity) driver to connect the framework to a Microsoft SQL Server database.

Jtds selects the jTDS (Java Tabular Data Stream) open-source driver.

Mssql selects the JDBC driver provided by Microsoft.

Actions

This component supports the following actions:

  • Ping sends a message to a network object (device, database, etc). The message provokes a response, which indicates the current state of the object.
  • Allow Dialect Modifications makes the Timestamp Storage property writable within the RdbmsNetwork Update Wizard. When the wizard converts a database to UTC (Coordinated Universal Time), it sets this property to read-only.