Rdbms
Rdbms
August 7, 2019
Niagara Rdbms Driver Guide
Tridium, Inc.
3951 Westerre Parkway, Suite 350
Richmond, Virginia 23233
U.S.A.
Confidentiality
The information contained in this document is confidential information of Tridium, Inc., a Delaware
corporation (“Tridium”). Such information and the software described herein, is furnished under a license
agreement and may be used only in accordance with that agreement.
The information contained in this document is provided solely for use by Tridium employees, licensees, and
system owners; and, except as permitted under the below copyright notice, is not to be released to, or
reproduced for, anyone else.
While every effort has been made to assure the accuracy of this document, Tridium is not responsible for
damages of any kind, including without limitation consequential damages, arising from the application of the
information contained herein. Information and specifications published here are current as of the date of this
publication and are subject to change without notice. The latest product specifications can be found by
contacting our corporate headquarters, Richmond, Virginia.
Trademark notice
BACnet and ASHRAE are registered trademarks of American Society of Heating, Refrigerating and Air-
Conditioning Engineers. Microsoft, Excel, Internet Explorer, Windows, Windows Vista, Windows Server, and
SQL Server are registered trademarks of Microsoft Corporation. Oracle and Java are registered trademarks
of Oracle and/or its affiliates. Mozilla and Firefox are trademarks of the Mozilla Foundation. Echelon, LON,
LonMark, LonTalk, and LonWorks are registered trademarks of Echelon Corporation. Tridium, JACE,
Niagara Framework, and Sedona Framework are registered trademarks, and Workbench are trademarks of
Tridium Inc. All other product names and services mentioned in this publication that are known to be
trademarks, registered trademarks, or service marks are the property of their respective owners.
Chapter 3 Components...................................................................................27
rdb module ..............................................................................................27
HistoryUnicodeUpdater..................................................................27
HistoryTimezoneUpdater................................................................27
rdb Database modules .............................................................................28
RdbmsFolder .................................................................................28
RdbmsNetwork ..............................................................................28
Worker container ...........................................................................29
RdbmsPointDeviceExt ....................................................................29
RdbmsPointQuery ..........................................................................30
rdbHsqlDb ...............................................................................................31
HsqlDatabase ................................................................................31
rdbOracle module ....................................................................................32
OracleDatabase .............................................................................32
OracleHistoryDeviceExt .................................................................32
MySQL module ........................................................................................33
MySQLDatabase ............................................................................33
MySQL Histories ............................................................................33
August 7, 2019 3
Contents Niagara Rdbms Driver Guide
rdbSqlServer module................................................................................34
SqlServerDatabase .........................................................................34
SqlServerHistoryDeviceExt .............................................................34
orion module ...........................................................................................35
Orion API.......................................................................................35
OrionService ..................................................................................35
DynamicTable ................................................................................36
FoxOrionDatabase .........................................................................37
OrionModule .................................................................................37
OrionRoot......................................................................................37
OrionType......................................................................................37
OrionMigrator................................................................................37
Properties dictionary ................................................................................37
Chapter 4 Plugins (views) ...............................................................................45
Device Manager view ...............................................................................45
orion........................................................................................................46
Dynamic Table view........................................................................46
Dynamic Table Config view.............................................................46
Orion Db Manager view..................................................................47
Orion Module Types view ...............................................................48
Orion Type Summary view ..............................................................48
Orion Type Table View....................................................................49
rdb ..........................................................................................................49
Rdbms History Import Manager view ..............................................49
Point Device Ext Manager view.......................................................50
Rdbms Point Query Manager view ..................................................50
Rdbms Query View.........................................................................52
Rdbms Session View .......................................................................52
rdb Database ...........................................................................................52
MySQL History Export Manager view..............................................52
Oracle History Export Manager view...............................................53
SqlServer History Export Manager view ..........................................53
Index.................................................................................................................55
4 August 7, 2019
About this guide
This topic contains important information about the purpose, content, context, and intended audience for
this document.
Produ ct doc u me n t at io n
This document is part of the Niagara technical documentation library. Released versions of Niagara software
include a complete collection of technical information that is provided in both online help and PDF format.
The information in this document is written primarily for Systems Integrators. In order to make the most of
the information in this book, readers should have some training or previous experience with Niagara 4 soft-
ware, as well as experience working with JACE network controllers.
Document content
This document explains how to install and configure the RdbmsNetwork and database connections.
Related documentation
This topic identifies other documents that provide information about this driver.
The following documents are related to the content in this document and may provide addition information
on the topics it covers:
• Getting Started with Niagara
• Niagara Drivers Guide
August 7, 2019 5
Niagara Rdbms Driver Guide
6 August 7, 2019
Chapter 1 Installation and configuration
Topics covered in this chapter
♦ About the driver
♦ Installing the network and database
♦ Configuring database properties
♦ Testing the database connection
♦ Connection troubleshooting
♦ Replacing the standard alarm database
The Rdbms driver connects Niagara stations to various Relational Database Management Systems (Rdbms)
for the purposes of importing and exporting historical archive data and populating control points with the
results of SQL queries against the database.
This chapter describes how to use Workbench to install, configure and test Rdbms driver connections with
the following rdb Database devices:
N O T E : Refer to the Niagara Installation Guide for the latest information about supported databases and
operating systems.
• The MySQLDatabase supports the use of data from MySQL databases. MySQL is an Oracle Corporation
RDBMS (Relational Database Management System) that requires a GPL (General Purpose License) or
proprietary license.
To use MySQL with a Supervisor installation, you must also install a Java Data Base Connectivity (JDBC)
connector in the following folder (where C: represents the N4 installation location):$niagara_home
\jre\lib\ext, where niagara_home denotes the N4 installation location, for example: C:\Niagara
\Niagara-4.1.xx.xx.
The connector to install is “ConnectorJ” with a filename similar to the following: mysql-connector-
java-5.1.46-bin.jar or mysql-connector-java-8.0.13. It is available for download from:
http://dev.mysql.com. Refer to the Niagara Installation Guide for the latest supported connector
versions.
• The OracleDatabase supports the use of data from Oracle databases. The supported version may be
more recent than version 9i. Contact your support channel for more up-to-date information. Oracle is an
Oracle Corporation relational database management system (RDBMS) that requires a proprietary license.
For more information about Oracle, refer to: http://www.oracle.com/database/index.html
• SqlServerDatabase supports the use of data from Microsoft SQL Server database. Refer to the Niagara
Installation Guide for the latest information about supported databases and operating systems. This
Microsoft Relational Database Management System (RDBMS) requires a proprietary license. For more
information about Microsoft SQL Server, refer to: http://www.microsoft.com/sql/default.mspx
NOTE:
While it is beyond the scope of this document to describe the setup of the database, it is worthwhile
noting that during SQL Server setup, you must select an authentication mode for the Database Engine.
There are two possible modes: Windows Authentication mode and Mixed Mode. The SQL Server must
be configured for Mixed Mode Authentication because the Rdbms driver does not support Windows
Authentication.
• The HsqlDbDatabase supports the use of data from HSQLDB databases. HSQLDB (Hyperthreaded
Structured Query Language Database) is maintained by the HSQL Development Group and is available
under a BSD-type (free) license. For more information about HSQLDB, refer to: http://hsqldb.org/
N O T E : For embedded controllers, the driver supports only the H s q l D b D a t a b a s e .
August 7, 2019 7
Chapter 1 Installation and configuration Niagara Rdbms Driver Guide
Some measure of tuning is provided with the Rdbms Wo r k e r component which is available under individ-
ual Rdbms device drivers.
Modules
The Rdbms driver requires a set of modules. Required modules include rdb and orion. The specific rdbDa-
tabase module you require depends on your database configuration.
Network component(s) in the .jar file n ame in the
Palette name N a v t re e modules folder Function
rdb HistoryUnicodeUpdater and rdb.jar Defines database ords used to configure ex-
HistoryTimezoneUpdater ported data.
8 August 7, 2019
Niagara Rdbms Driver Guide Chapter 1 Installation and configuration
Prereq ui si tes
To successfully install and using the Rdbms driver and specific supported rdb Database your installation
needs to meet specific requirements.
Use of any of the databases mentioned in this document is subject to the terms and conditions of the respec-
tive database supplier. For additional copyright and licensing information, please refer to the individual sup-
plier documentation.
In addition to the right to use a specific database, you must have:
• Niagara 4.4 framework or later and Workbench running on PC
• Niagara license for a specific database type in the license file
• An IP network connection to the database host
• Appropriate rights for the required data access
You must know:
• The user name and password to log in to the database
• If you are trying to connect to a named instance of a database, the name of the database instance
• If the database is using a non-default port number, the port number so you can configure your rdb Data-
base device correctly.
August 7, 2019 9
Chapter 1 Installation and configuration Niagara Rdbms Driver Guide
For information about creating new networks, see the Niagara Drivers Guide.
Step 3 Select Rdbms Network from the drop-down list, the number of networks to add, and click O k .
The N e w window used to name the network(s) opens.
Step 4 Change the default name(s) or use the default name(s) and click O k .
You should have network named R d b m s N e t w o r k (or whatever you named it) under your D r i v e r s
folder showing a status of {Ok} with the Enabled property set to true.
Step 5 To create the Rdbms Network Driver Device Database, double-click the R d b m s N e t w o r k you just
created, click N e w at the bottom of the D e v i c e M a n a g e r view, select the number of databases to
create, and click O k .
The window to name the database(s) opens.
Step 6 To add the Database Device to the Rdbms Network, click O k .
You should have an R d b m s N e t w o r k D r i v e r D e v i c e D a t a b a s e under your R d b m s N e t w o r k node
in the Nav tree.
Status (Information)
Enabled X X X X
10 August 7, 2019
Niagara Rdbms Driver Guide Chapter 1 Installation and configuration
Health (Information)
Host Address - X X X
User Name X X X X
Password X X X X
Worker X X X X
Export Mode X X X X
Timestamp Storage X - X X
Points X X X X
Base Directory X - - -
Database Name X X - -
Instance Name - - - X
Service Name - - X -
Port - X X X
Histories - X X X
Extra Connection Properties - X - X
Version - - - X
Step 4 To configure full UTF-8 Unicode support (NVARCHAR columns instead of VARCHAR columns), set
Use Unicode Encoding Scheme to true.
To preserve compatibility with legacy systems, this property defaults to false. It must be changed
before you connect to your database for the first time.
Most databases (except MySQL) have a property called Timestamp Storage. This property can
configure the driver to update and export history timestamps using Coordinated Universal Time
(UTC).
Step 5 As a best practice, set Export Mode to By History Type, as most database administrators would
rather manage a few tables instead of thousands of individual tables.
When exporting by By History Type, the driver exports histories of the same data type (Boolean,
Numeric, Enum, String) to the same table. For example, all numeric type histories export to a table
named HISTORYNUMERICTRENDRECORD. This table contains an additional column named HIS-
TORY_ID, which stores the history ID reference (ORD) from the station for each record in the table.
Step 6 To configure UTC timestamps, change Timestamp Storage from the default (Dialect Default)
to one of the UTC options.
With Dialect Default, you must set both Use Last Timestamp and Use History Config
Time Zone to true. This exports histories using the History Config Timezone. (If you set the
two properties to false, the driver exports histories using the station timezone).
Selecting the Utc Timestamp takes precedence over the Use Last Timestamp and Use History
Config Time Zone properties in the History Device Extension, rendering them effectively
irrelevant.
August 7, 2019 11
Chapter 1 Installation and configuration Niagara Rdbms Driver Guide
Switching back and forth between Dialect Default and Utc Timestamp pollutes the database
with inconsistent timestamps, which can negatively affect any query you run to determine whether
or not to export newer records.
Step 7 Define a name for the database. To complete the configuration, click S a v e .
Connection checklist
• Make sure that both the RdbmsNetwork and RdbmsDatabaseDevice have their Enabled property set to
true.
• Check that you have set the correct port number. Default port numbers may not have been used when
the database instance was initially configured.
• Check with the database administrator (or owner of the database) to make sure that your login creden-
tials have sufficient authorization for establishing a remote connection to the database.
SqlServer RDBMS connections
• If the Rdbms server is running a named instance of the database that you are trying to connect to, make
sure that you have the correct Instance Name. If Instance Name is empty, the driver ignores the prop-
erty and defaults to the database assigned in the SqlServer.
• For a station to connect, the Microsoft SQL Server instance must be configured for Mixed Mode
Authentication.
N O T E : By default, SqlServerExress provides named instances for databases. The default name provided is
"SQLEXPRESS."
To monitor the performance of an instance of SQL Server or troubleshoot problems with the queries being
submitted to the database by the station, alongside the usual Platform-Application Director output it is often
useful to use an SQL Profiler.
12 August 7, 2019
Niagara Rdbms Driver Guide Chapter 1 Installation and configuration
Step 2 Open the alarmRdb palette and copy the rd b A l a r m S e r v i c e component into the station's S e r v -
i c e s folder.
Step 3 To retain child components of any previous (standard) A l a r m S e r v i c e component (AlarmClasses,
Recipients), cut them from the old A l a r m S e r v i c e component and paste them into the new R d b A -
l a r m S e r v i c e component before deleting the original A l a r m S e r v i c e .
Step 4 Delete the old (standard) A l a r m S e r v i c e component from the station's S e r v i c e s folder.
N O T E : The driver does not migrate existing alarms to the new data store.
Step 5 Right-click on the r d b A l a r m S e r v i c e in the Nav tree and click V i e w → P r o p e r t y S h e e t .
The rdbAlarmService P r o p e r t y S h e e t view opens.
Step 6 Select the rdbms database device type from the Driver option list.
Only those RDBMS database devices that are located under the station’s R d b m s N e t w o r k node
appear as options in the list.
Step 7 To complete the configuration, click S a v e .
The new R d b A l a r m S e r v i c e is available for use.
August 7, 2019 13
Chapter 1 Installation and configuration Niagara Rdbms Driver Guide
14 August 7, 2019
Chapter 2 Data management
Topics covered in this chapter
♦ Discovering and adding points
♦ Adding and configuring a new point query
♦ Editing an existing query
♦ Rdbms implementation example
♦ Exporting history data to an Rdbms database
♦ Unix time conversion for MySQL
♦ Importing history data from an Rdbms database
♦ Updating an existing database to support Unicode and UTC
♦ Updating existing Orion databases to support Unicode
The Rdbms driver queries against the SQL database to import data, which populates control points, and
export historical data for archiving and further analysis. In the process, data can be transformed and
manipulated.
Under the RdbmsNetwork, each device component represents a specific type of relational database and
should be located under the R d b m s N e t w o r k driver.
August 7, 2019 15
Chapter 2 Data management Niagara Rdbms Driver Guide
16 August 7, 2019
Niagara Rdbms Driver Guide Chapter 2 Data management
August 7, 2019 17
Chapter 2 Data management Niagara Rdbms Driver Guide
2. For each store, a Supervisor station creates proxy points for each fuel type, by creating and configuring
an Rdbms Point Query for each fuel type.
Fi gu re 5 Fuel points
3. An Sql query displays the total fuel sold as of the latest update.
Fi gu re 6 Fuel counter query
This counter is scheduled to update every 15 minutes, providing a total that updates every 15 minutes
along with the time of the update.
In this example, these Sql parameters are optional:
• “1 AS myKey” creates a new column as a key column and is not required.
• “1 AS Total”, “AS Time”, and “AS Status” create titles for the respective columns. If these optional
parameters are not used, columns are titled “column1”, “column2”, “column3”, respectively.
4. Data are discovered and added under the R d b m s P o i n t D e v i c e E x t e n s i o n node.
18 August 7, 2019
Niagara Rdbms Driver Guide Chapter 2 Data management
5. Once added to the RdbmsNetwork, these proxy points are used to graphically display total gallons of
each fuel type sold as of the update time.
August 7, 2019 19
Chapter 2 Data management Niagara Rdbms Driver Guide
Step 3 Edit the Name, History Id, Execution Time, and Enabled properties, and click O k .
The new history export descriptor(s) appears in the D a t a b a s e (lower) pane.
Step 4 Do one of the following to initiate an export action:
• Select one or more history descriptors in the database pane and click the A rc h i v e button.
• Right-click on a single history descriptor in the database pane and click A c t i o n s → E x e c u t e .
• Using the Daily or Interval settings, as set in the N e w or E d i t windows, allow the export to
occur, as scheduled.
The Database pane displays the status and time of the last export action in the Status and Last Suc-
cess columns, respectively. Each export descriptor appears under the r d b m s D a t a b a s e H i s t o r i e s
node in the Nav tree.
The first time you export histories, the driver creates meta tables. The HISTORY_CONFIG and HISTORY_
TYPE meta tables include a column for DB_TIMEZONE. This column is based on the Timestamp Storage
property on the rdb Database device. The DB_TIMEZONE column stores the actual timezone that the data-
base is currently using to store timestamps (this is different from the pre-existing TIMEZONE column, which
reflects the timezone in which the history was created but not the one in which it is being stored). When re-
cords are being exported in UTC mode, the DB_TIMEZONE column updates accordingly.
For more detailed information about the H i s t o r y E x p o r t M a n a g e r, refer to the Drivers Guide.
Export by history ID
The driver stores each exported history in a dedicated table with a name that corresponds to the history
name in the framework. To ensure uniqueness and to make it possible to trace a history back to its source
via the descriptive HISTORY_CONFIG table, the driver adds an incrementing number as a suffix to duplicate
names.
N O T E : For an Oracle database, the maximum length of a table name is 30 characters.
20 August 7, 2019
Niagara Rdbms Driver Guide Chapter 2 Data management
In this example:
• The RdbmsNetwork maintains the ID and uses it for database indexing. The RdbmsNetwork driver does
not use this value in a station.
• TIMESTAMP records when the value was logged and can be localized to the exporting station or the
source station. This choice is stored in the HISTORY_CONFIG table.
• The VALUE column data type changes according to the type of the point exported, for example, double,
float, enum, string or boolean.
• VALUE can be {null}, for example, where {NaN} is recorded in the source history.
• The driver does not export point facets (units) from the database.
The HISTORY_CONFIG table keeps track of the exported tables as in this example:
F ig ure 11 History_config table
August 7, 2019 21
Chapter 2 Data management Niagara Rdbms Driver Guide
The SOURCE column shows the origin of the history. A space separates the source point ORD and the route
taken by the exported data to Supervisor. It is occasionally necessary to extend the length of the SOURCE
column when station naming conventions make the ORDs very long. The DBA performs this using SQL or da-
tabase management tools. This condition exhibits as a “Data Truncation” error in the application director
output of the station.
The INTERVAL column shows the collection interval of the source history extension in milliseconds, the string
prefix is “false” for Interval type histories.
22 August 7, 2019
Niagara Rdbms Driver Guide Chapter 2 Data management
The point type to table mapping required to achieve this type of export are described in the HISTORY_
TYPE_MAP table:
F ig ure 16 History type map
August 7, 2019 23
Chapter 2 Data management Niagara Rdbms Driver Guide
S t a t u s a n d t re n d f l a g s
Common to both types of History Export, the STATUS and STATUS_FLAG columns represent the state of
the point at the time the record was recorded where STATUS is the sum of the possible states.
Status flags
State # State (tag) State # S tate (tag) State # State (tag)
For example:
S T AT U S S T AT U S _ T A G
T re n d f l a g s
The TRENDFLAGS and TRENDFLAGS_TAG columns record event information about the history record, us-
ing the same 'sum' method described above.
2 {OutofOrder} 8 {Modified}
24 August 7, 2019
Niagara Rdbms Driver Guide Chapter 2 Data management
You need to add one unique import descriptor for each history file that you want to import.
Step 4 To continue, click O k .
A second N e w window opens.
Step 5 Use Key Column 1 and Key Column 2 to create a unique identifier for the imported data.
If you leave the key columns blank, the driver automatically uses the first column in the row as the
primary key.
Key Column 2 is optional. Use it when you need an additional data item to establish a unique com-
posite key.
The key columns you define (using the Key Column 1 and 2 properties) may not actually be primary
keys, although they often are.
An example situation where a single column cannot uniquely identify each row in a table might be
a table of fan motor types with columns for "manufacturer", "model" and "maximum speed". To
identify each row, you need to look at both the manufacturer and the model. These two columns
would be the Key Column1 and Key Column2 columns. Only with both of them can you identify any
given row, since individually neither column is unique.
Step 6 If you may need more than two key columns to specify a unique key, add another key column slot
from the RdbmsPointQuery S l o t S h e e t view.
August 7, 2019 25
Chapter 2 Data management Niagara Rdbms Driver Guide
C A U T I O N : This Unicode and UTC upgrade procedure is one-way only and cannot be reversed. It
is highly recommended that you back up the database(s) prior to running the wizard.
Step 2 Right-click the R d b m s N e t w o r k node in the Nav tree and click U p d a t e W i z a r d
The D a t a b a s e U p d a t e W i z a r d window opens to the the S e l e c t U p d a t e P r o c e d u r e s window.
Step 3 Enable one or both properties and click N e x t .
The wizard displays one or more databases to be updated to Unicode.
Step 4 Select the database(s) to update to Unicode and click N e x t .
The wizard completes the update and displays the results for review.
Step 5 To continue, click N e x t .
If you enabled both options, the wizard displays one or more databases to be updated to UTC.
Step 6 Select the database(s) to update to UTC and click N e x t .
If you updated UTC, the wizard opens the T i m e z o n e U p d a t e — T i m e s t a m p S t o r a g e P o l i c y view.
Step 7 To define the storage policy, select one or the other of the options and click N e x t .
The wizard completes the update and displays the results for review.
Step 8 To complete the update, click F i n i s h .
If you updated to Unicode, the wizard automatically sets the Use Unicode Encoding Scheme
property on the database P r o p e r t y S h e e t to true.
If you updated to UTC, the wizard automatically sets the Timestamp Storage property on the da-
tabase P r o p e r t y S h e e t to true and sets this property to read-only. To make Timestamp Stor-
age writable again, right-click the database device and click A c t i o n s → A l l o w D i a l e c t
Modifications.
When the procedures and databases have been specified in the Update Wizard, the updates are submitted
as jobs to the Job Service. The Update Wizard processes the database tables and changes the data types of
string-valued columns to the NVARCHAR data types and adjusts the database timestamps to UTC time. The
wizard provides visibility on the progress of individual jobs. At a later stage, you can view the jobs in the Job
Service. The update operations either complete entirely or roll back entirely if any error occurs.
26 August 7, 2019
Chapter 3 Components
Topics covered in this chapter
♦ rdb module
♦ rdb Database modules
♦ rdbHsqlDb
♦ rdbOracle module
♦ MySQL module
♦ rdbSqlServer module
♦ orion module
♦ Properties dictionary
Components include services, folders and other model building blocks associated with a module. You may
drag them to a property or wire sheet from a palette.
Descriptions included in the following topics appear as context-sensitive help topics when accessed by:
• Right-clicking on the object and selecting V i e w s → G u i d e H e l p
• Clicking H e l p → G u i d e O n T a rg e t
rd b m o du le
HistoryUnicodeUpdater
This component is available on the rdb module Palette view. Its granular and discrete functions serve as an
alternative to using the Update Wizard. You can use the Database Ords property in this component to add
one or more database paths to the Updater.
You access this property by double-clicking the H i s t o r y U n i c o d e U p d a t e r node in the Nav tree.
HistoryTimezoneUpdater
This component is available on the rdb module Palette view. You can use the Database Ords property in
this component to add one or more database paths to the Updater.
August 7, 2019 27
Chapter 3 Components Niagara Rdbms Driver Guide
Fi gu re 19 HistoryTimezoneUpdater properties
You access these properties by double-clicking the H i s t o r y T i m e z o n e U p d a t e r node in the Nav tree.
This component’s functionality is identical to that achieved by using the Update Wizard. It is available via the
palette to provide granular and discrete functionality as an alternative to using the Update Wizard.
rd b D a t a b a s e m o d u l e s
RdbmsFolder
This component is used to organize databases under an R d b m s N e t w o r k .
You create this folder using the N e w F o l d e r button in the D e v i c e M a n a g e r view for any R d b m s N e t w o r k .
RdbmsNetwork
Like other framework networks, this component provides a top-level component for all Rdbms driver com-
ponents. In keeping with the standard framework driver architectural model, many of the RdbmsNetwork
components, device extensions, and views resemble those in other drivers.
The RdbmsNetwork P ro p e r t y S h e e t view and the NiagaraNetwork property sheet share common proper-
ties described in the Drivers Guide.
Fi gu re 20 Example of an rdb Database Property Sheet
You access this view by expanding the D r i v e r s → R d b m s N e t w o r k , right-clicking your rdb Database and click-
ing V i e w s → P ro p e r t y S h e e t .
28 August 7, 2019
Niagara Rdbms Driver Guide Chapter 3 Components
Wo r k e r c o n t a i n e r
This child component of all rdb Database devices manages the queue and worker for asynchronous opera-
tions on a single database.
This component is available under any of the rdb (relational database) types: O r a c l e D a t a b a s e , and
SqlServerDatabase.
This component provides two properties for setting the maximum number of concurrent threads and for set-
ting the maximum allowable queue size for the database connection. These worker properties are not
pooled at the Network level, as with the NiagaraNetwork driver. Each database driver has its own thread
pool setting.
RdbmsPointDeviceExt
This component provides point import capability for the various relational database drivers using methods
and views that are similar to other proxy point driver views. It is available under most of the rdb (relational
database) types, including OracleDatabase, SqlServerDatabase, and MySQLDatabase.
F ig ure 21 Rdbms Point Query properties
You access these properties by expanding the D r i v e r s → R d b m s N e t w o r k node in the Nav tree, followed by
expanding your rdbDatabase and the P o i n t s folder it contains, right-click the R d b m s P o i n t Q u e r y node, and
click V i e w s → P ro p e r t y S h e e t .
The Sql property is a text editor used to create and display an entry for each Rdbms Point Query statement.
Named columns are optional. Unnamed columns are displayed as “column1, column2, ...” and so on. Key col-
umns are optional. If no key column is specified, the driver uses the first column as the primary key.
General information
With this component you can represent relational database cell values as proxy points. No configuration is
required for RdbmsNetwork Driver configuration. For more information, refer to “Using the Rdbms Point
Device Extension”, and "About the Points Extension" in the Drivers Guide.
The rdbDatabase devices resemble typical field-bus functionality in that Workbench represents them as devi-
ces. You can view all devices that are under the R d b m s N e t w o r k in a D e v i c e M a n a g e r view, or in the Nav
tree, with each device that is installed under the network representing an individual database type and
connection.
The Rdbms Point Device Extension provides point import capability for the various relational database driv-
ers using methods and views that are similar to other proxy point driver views. Using this point device exten-
sion to import points, you can represent relational database cell values as proxy points in Niagara, as shown
below.
August 7, 2019 29
Chapter 3 Components Niagara Rdbms Driver Guide
Fi gu re 22 Rdbms points
The Rdbms Point Device Extension (RdbmsPointDeviceExt) may contain one or more Rdbms Point Query
properties (depending on how many you add). Individual points are then added under each individual Rdbms
Point Query property using the discover and add process available in the R d b m s P o i n t Q u e r y M a n a g e r
view. Rdbms Points are always organized under their parent Rdbms Point Query in the Nav tree and are also
displayed in the D a t a b a s e pane of the R d b m s P o i n t Q u e r y M a n a g e r view.
P o i n t c o n t a i n e r d i ff e re n c e s ( c o m p a re d t o o t h e r d r i v e r s )
Unlike other Point Device Extensions, the Rdbms Point Device Extension:
• has a unique default view - the R d b m s P o i n t D e v i c e E x t e n s i o n M a n a g e r view.
• has a unique child component - the Rdbms Point Query component.
• has proxy points under the Rdbms Point Device Extension that are read-only; you cannot write to the
Rdbms using these points.
• has proxy points under the Rdbms Point Device Extension that use recorded database values not live val-
ues. It is possible to have points from the database update very frequently, depending on database ar-
chiving and updating parameters, but the data are always coming from a secondary source - the
database, not a control point.
RdbmsPointQuery
This component is a container and a child of the Rdbms Point Device Extension (P
Po i n t s folder). You use it to
construct and execute queries against any database to which you have access and sufficient privileges.
30 August 7, 2019
Niagara Rdbms Driver Guide Chapter 3 Components
You access these properties by expanding D r i v e r s → R d b m s N e t w o r k followed by expanding your rdb Data-
base node, expanding the P o i n t s folder, right-clicking an RdbmsPointQuery folder and clicking V i e w -
s→Proper ty Sheet .
The P o i n t s folder (Rdbms Point Device Extension) is unlike point device extensions associated with other
driver types. This point device extension uses the Rdbms Point Query component to filter database records
to provide candidate records for proxy points.
The Sql property contains the query statement. You can execute this query manually and also set a regular
interval time for updates using the Update Frequency property.
rd bH s q lD b
HsqlDatabase
This component models an HsqlDb (Hyperthreaded Structured Query Language Database) relational data-
base, which is maintained by the HSQL Development Group and is available under a BSD type (free) license.
It is available in the rdbHsqlDb palette.
August 7, 2019 31
Chapter 3 Components Niagara Rdbms Driver Guide
You access the properties to configure the driver for this database by expanding D r i v e r s → R d b m s N e t w o r k ,
and double-clicking the H s q l D a t a b a s e node in the Nav tree.
Individual properties are documented in the Properties Dictionary (in this guide).
rd b O r a c l e m o d u l e
OracleDatabase
This component models an Oracle relational database management system (RDBMS) that requires a propri-
etary license. It is available in the rdbOracle palette.
Fi gu re 25 Oracle Database Property Sheet
You access the properties to configure the driver for this database by expanding D r i v e r s → R d b m s N e t w o r k ,
and double-clicking the O r a c l e D a t a b a s e node in the Nav tree.
Individual properties are documented in the Properties Dictionary (in this guide).
OracleHistoryDeviceExt
This component is the Oracle implementation of HistoryDeviceExt, and a child of a the OracleDatabase
component.
The History Device Extension is fully described in the Drivers Guide. It is not available on the HsqlDbData-
base device since this database may not be used to import or export histories. In addition to the normal de-
fault “Retry Trigger” component, the History Device Extension contains the following two parameters which
are specific to this driver: Use Last Timestamp, and Use History Config Time Zone.
32 August 7, 2019
Niagara Rdbms Driver Guide Chapter 3 Components
MySQL module
MySQLDatabase
This component models a MySQL relational database, which is an Oracle Corporation relational database
management system (RDBMS) that requires a GPL or proprietary license. It is available in the rdbMySQL
palette.
F ig ure 26 MySQLDatabase Property Sheet
You access the properties to configure the driver for this database by expanding D r i v e r s → R d b m s N e t w o r k ,
and double-clicking the M y S Q L D a t a b a s e node in the Nav tree.
Individual properties are documented in the Properties Dictionary (in this guide).
MySQL Histories
This component is the MySQL implementation of HistoryDeviceExt. It is a child of a M y S Q L D a t a b a s e .
F ig ure 27 MySQL History Property Sheet
August 7, 2019 33
Chapter 3 Components Niagara Rdbms Driver Guide
rd b S q l S e r v e r m o d u l e
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.
Fi gu re 28 SqlServerDatabase Property Sheet
You access the properties to configure the driver for this database by expanding D r i v e r s → R d b m s N e t w o r k ,
and double-clicking the S q l S e r v e r D a t a b a s e node in the Nav tree.
You must select one of two possible authentication modes for the Database Engine: Windows Authentica-
tion mode and Mixed Mode. The SQL Server must be configured for Mixed Mode Authentication because
the Rdbms driver does not support Windows Authentication.
Individual properties are documented in the Properties Dictionary (in this guide).
SqlServerHistoryDeviceExt
This component is the SqlServer implementation of HistoryDeviceExt. It is a child of an S q l S e r v e r D a t a b a s e .
Fi gu re 29 SqlServer History Property Sheet
34 August 7, 2019
Niagara Rdbms Driver Guide Chapter 3 Components
orion module
Orion API
The Orion API (Application Programming Interface) provides commands to embed in applications which in-
voke orion module functions.
BRdbms
This function existed in earlier (before Niagara 4.6) versions of the framework to model an Rdbms database
for supporting SQLServer and Oracle database implementations. Applications (including stations running on
smaller controllers) are able to implement O/R mapping and maintain database independence by running a
local instance of any of the following RDBMS types: HSQLDB, MySQL, Oracle, or SQL Server
BOrionService
This service allows a station and its applications to use a local Orion relational database running in controllers
(including embedded controllers) to manage and display distributed-system (or distributed-application) in-
formation. This managed and configurable information includes certain types of component data that are
well suited for the relational model.
BIOrionApp
This is an installable application with a set of Orion object types for managing data in the Orion database.
BOrionSpace
This function provides component space for storing Orion objects. Other types of space include: History,
File, and Virtual space. An example ORD using the orion space is: local:|fpx:|propm://HsqlData-
base/hierarchy/NodeType.
BOrionObject
This is a common subclass for all objects stored in the Orion database. It represents an Orion object and its
associated database.
OrionSession
This is a CRUD (Create, Read, Update and Delete) interface for interacting with the Orion database and man-
aging object persistence.
OrionService
This component under the Service node in the Nav tree enables the Orion database in a station. It uses a lo-
cal relational database running in a controller (including embedded controllers) to manage and display dis-
tributed-system (or distributed-application) information. This managed and configurable information
includes certain types of component data that are well suited for the relational model. It is available in the
orion palette.
August 7, 2019 35
Chapter 3 Components Niagara Rdbms Driver Guide
To access the Orion properties, expand S e r v i c e s , and double-click the O r i o n S e r v i c e node in the Nav tree.
Orion is an Object-Relational (O/R) mapping architecture provided to support distributed-applications, large
systems, and other applications that may benefit from having relational data modeled as framework objects.
Object-Relational Mapping does not replace the config.bog (station) file, but provides for the creation of a
new space, the Orion space, that is stored outside the station database file (like histories, files, and mod-
ules). This functionality includes a means for alternative and multiple system hierarchy displays that can be
used for data presentation, system identification, and navigation.
DynamicTable
This component configures, retrieves and displays data from relational database tables or from other appli-
cation services. The Dynamic Table has a configuration view (Dynamic Table Config) and a table view (Dy-
namic Table). It is available in the orion palette.
Fi gu re 31 Dynamic Table properties
You drag a D y n a m i c T a b l e component from the orion palette to a location in your station and then config-
ure the component to display data from either an application that is using relational data or directly from a
relational database.
These properties are documented in the Properties Dictionary in this guide.
36 August 7, 2019
Niagara Rdbms Driver Guide Chapter 3 Components
FoxOrionDatabase
This component represents the Orion database. It contains the individual Orion Module Types. It appears in
theNav tree directly under the OrionRoot node and is not visible in the orion palette.
OrionModule
This component represents a module with types registered in an Orion database. The orion-OrionModule is
not visible in the orion palette.
OrionRoot
This component is the root component of an Orion component space. It contains the individual databases
that are managed by the OrionService. The orion-OrionRoot component appears in the Nav tree directly
under the station when the Orion service is configured and is not visible in the orion palette.
O r i o n Ty p e
This component is a wrapper for Orion Types, which display in the O r i o n Ty p e S u m m a r y view and O r i o n
Ty p e T a b l e view. The orion-OrionType component is not visible in the orion palette.
OrionMigrator
This component, available in the orion palette, is used to migrate existing Orion database data without
UTF-8 support into a new RdbmsDevice, which does support the UTF-8 Unicode Encoding Scheme.
August 7, 2019 37
Chapter 3 Components Niagara Rdbms Driver Guide
Db Ord (right-click ord Specifies an ord path to the relational database. Either this
DynamicTable in property or the App Ord property (but not both) are required
the Nav tree and for linking the DynamicTable to a database. With the O r i o n -
click V i e w s → P r o p - S e r v i c e installed, you can use a chooser to select the database
erty Sheet) under the D y n a m i c T a b l e node.
Enabled true or false Activates and deactivates use of the component.
Execution Time drop-down list and Configures when to import the history.
(New import histor- additional time
ies window) properties
Export Mode (da- drop-down list Specifies how histories are exported to the specified
tabase device database.
components)
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 op-
tion may make the data easier to query once exported.
Extra Connection normally left blank; Additional parameters, which not required for a normal con-
Properties (MySQL if used takes the nection to the database. The driver passes this information in
and SqlServer devi- format: parame- plain text to the database. A description of these parameters
ces only) ter1=value1;pa- is beyond the scope of this document, however, they can be
rameter2=val- used for advanced diagnostics or tuning under the guidance of
ue2;...etc. a support channel.
Fault Cause read-only Indicates the reason why a system object (network, device,
component, extension, etc.) is in fault. This property is empty
unless a fault exists.
38 August 7, 2019
Niagara Rdbms Driver Guide Chapter 3 Components
History Id (New im- two text boxes Specifies the station name and history name into these two
port histories fields.
window)
Host Address (da- IP address Sets the IP address or hostname of the computer platform
tabase device where the database resides. A Dialup selection option is avail-
components) able, if required. This property does not apply to the MySQL
device.
Icon (right-click Dy- file path Designates a graphic icon to associate with a dynamic table.
namicTable in the
Nav tree and click
Vi e w s → P ro p e r t y
Sheet)
Instance Name text Configures a connection to a SqlServer database if the user
(SqlServerData- has not been previously set up in the SqlServer with a default
base device only) 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.
Interval (New im- drop-down list (de- Configures when the system creates a history record.
port histories faults to
window) irregular) irregular creates records randomly.
regular opens an additional property for selecting a regular
interval.
Key Column 1 drop-down list Defines the primary key for imported data. This key uniquely
(New Rdbms Point identifies each row in a database table. It might be part of the
Query window) data record itself (for example, a unique user id) or an extra
piece of information that is not related to the actual data
record.
A primary key can consist of Key Column 1 and 2, creating a
composite key.
Key Column 2 drop-down list Augments Key Column 1 when Key Column 1 is not enough
(New Rdbms Point to establish a unique key for each imported data record.
Query window)
(optional)
Last Update date and time Indicates the last time the driver executed the query.
Max Queue Size number (defaults Specifies the maximum queue size supported for Rdbms ac-
(database device to 1000) tions specific to the associated database driver (that is, ex-
components, ports, imports).
Worker container)
August 7, 2019 39
Chapter 3 Components Niagara Rdbms Driver Guide
Name (New import text Provides a name for the import task or point query.
histories window,
New Rdbms Point
Query window)
Passkey text Defines a strong password to connect to the network.
Password (data- text Defines the password required to log in to the database. The
base device Confirm property must be an exact match to the Password
components) property.
Port number, default Specifies the port number to use when connecting with the
value depends on database.
the rdb Database
type: HsqlDbData-
base, no port
specified because
this rdb is for local
database use only;
MySQLDatabase,
3306; OracleData-
base, 1521; and
SqlServerData-
base, 1433
Query Predicate text Filters the records that are imported
(New import histor-
ies window)
Rdb Catalog Name text Redefines the catalog name on import.
(New import histor-
ies window)
Rdb Schema Name text Redefine the schema name on import.
(New import histor-
ies window)
Rdb Table Name text Redefines the table name on import.
(New import histor-
ies window)
Row Type (right- module:type (on Specifies the DynamicTable row in terms of module and type.
click DynamicTable the Property
in the Nav tree and Sheet); a drop-
down list in the
40 August 7, 2019
Niagara Rdbms Driver Guide Chapter 3 Components
Sql (New Rdbms text editor Provides an editor (one of several available) for viewing and
Point Query editing the query statement. The query provides the criteria
window) for database point discoveries initiated from the R d b m s P o i n t
Q u e r y M a n a g e r view and other views.
N O T E : This property is actually BFormat. This means that you
can add additional syntax to the SQL string that processes be-
fore the driver sends the query to the database.
Sql Scheme En- true or false Turns the Sql scheme on and off.
abled (database (default)
device true is required to execute queries against the relevant data-
components) base, and as a prerequisite for using the Rdbms Point Device
Extension.
false indicates you are not executing queries using the
Rdbms Point Device Extension, or loading data from Oracle.
Good security practice sets the property to false
N O T E : To use an rdbDatabase, you must set this property to
true (this property is located on the RdbmsNetwork Driver
Device P ro p e r t y S h e e t .
Station Time Zone hours Defines the time zone of the station to update the history
(HistoryTimezo- times.
neUpdater)
Status read-only Indicates the condition of the component at the last check.
{ok} indicates that the component is licensed and polling
successfully.
{down} indicates that the last check was unsuccessful, per-
haps because of an incorrect property, or possibly loss of net-
work connection.
{disabled} indicates that the Enable property is set to
false.
{fault} indicates another problem. Refer to Fault Cause
for more information.
Status Column text Specifies if a status column is included in the imported data or
(New import histor- not.
ies window)
Time Of Day hour Defines the beginning and end times during the day to collect
sample data.
August 7, 2019 41
Chapter 3 Components Niagara Rdbms Driver Guide
Timezone (New im- drop-down list Configures the local time zone.
port histories
window)
Trigger Mode drop-down list (de- Defines the method used to sample periodic data.
faults to
Interval) Manual requires an action to sample data.
Daily samples every day at the same time.
Interval samples at regular times throughout the day.
Update Frequency hours, minutes, Dictates how often the driver automatically executes the
(New Rdbms Point seconds query.
Query window)
Use Encrypted true (default) or Indicates if the connection between the station and the data-
Connection false base 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.
Use History Config true or false Configures how to normalize the timestamp before writing it
Time Zone (Oracle- (default) to the external database. It includes the time zone.
Database device
false normalizes values to the Supervisor station’s time zone.
only)
true writes the original timestamp value (retained by the
Supervisor) to the external database. Unfortunately, this op-
tion ignores the time zone. This causes difficulties with local
time zones, especially in relation to daylight savings time. The
Timestamp Storage property exports or updates history
timestamps to Coordinated Universal Time (UTC).
42 August 7, 2019
Niagara Rdbms Driver Guide Chapter 3 Components
User Name (data- text Defines the user name used to log in to the database.
base device
components) 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
Use Unicode En- true or false Creates history table schemas with the Universal character set
coding Scheme (default) Transformation Format (UTF-8) or Unicode data types for
(database device string-valued columns to store Asian character sets.
components)
false maintains backward compatibility with legacy history
export mechanisms.
true enables the NVARCHAR data type for any column in a ta-
ble that expects string data.
N O T E : An Update Wizard is available to upgrade existing da-
tabases to support Unicode.
Value Column text Specifies the Value column for the imported data.
(New import histor-
ies window)
Value Facets (New Config Facets Configures units.
import histories chooser
window)
Version (SqlServer drop-down list, de- Determines if the Sql Server database supports the SQL DATE
device only) faults to Sql type. The DATE Sql type is supported from Sql server 2008 on-
Server 2008 wards and the database device needs to know how to trans-
late 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.
N O T E : 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.
August 7, 2019 43
Chapter 3 Components Niagara Rdbms Driver Guide
44 August 7, 2019
Chapter 4 Plugins (views)
Topics covered in this chapter
♦ Device Manager view
♦ orion
♦ rdb
♦ rdb Database
Plugins provide views of components and can be accessed in many ways. For example, double-click a
component in the Nav tree to see its default view. In addition, you can right-click on a component and select
from its V i e w s menu.
For summary documentation on any view, select H e l p → O n V i e w (F
F1 ) from the menu or press F 1 while the
view is open.
You access this view by double-clicking the R d b m s N e t w o r k node in the Nav tree.
The N e w and E d i t buttons open N e w and E d i t windows, which add, configure and monitor rdb Database
devices.
Individual rdb database devices have different characteristics, features, and properties that are specific to
the type of database that they represent. However, most of the setup, configuration, import and export fea-
tures are similar among all rdb Database devices.
August 7, 2019 45
Chapter 4 Plugins (views) Niagara Rdbms Driver Guide
orion
Dynamic Table view
This the default view on the D y n a m i c T a b l e component. It displays data selected from a database that is
specified in the DynamicTable P r o p e r t y S h e e t view and according to the properties set up in the D y n a m i c
T a b l e C o n f i g view.
Fi gu re 34 Dynamic Table view
You add a DynamicTable component to a Supervisor station from the orion palette, create a table using the
D y n a m i c T a b l e C o n f i g view, then select Dynamic Table View from the drop-down list in the upper right
corner.
The F i l t e r button at the bottom of the view allows you to display a subset of the table data based on param-
eters that you can set in the associated F i l t e r s window. The H y p e r l i n k button changes the view to the P r o p -
e r t y S h e e t view of the (single) node that you have selected.
46 August 7, 2019
Niagara Rdbms Driver Guide Chapter 4 Plugins (views)
You access this view by expanding S e r v i c e s , right-clicking the DynamicTable node and clicking V i e w s → D y -
namic Table Config.
This view has two major panes: an upper and lower pane. The upper pane contains a table that displays the
data records from the row and columns that you designate in the lower pane. The lower pane contains three
selection windows and a Row Type option list that you can use to add specific columns to the table pane us-
ing the A d d C o l u m n button. The D e f a u l t C o l u m n s button adds columns to the upper pane based on Row
Type selection.
The DynamicTable P ro p e r t y S h e e t view points to a database or application ORD. This database or applica-
tion is the source for data in the Dynamic Table Config view Row and Column properties. By choosing a Row
Type, you can manually add columns to a dynamic table by selecting fields under the From, Property, and
Linked Property panes and clicking the A d d C o l u m n s or D e f a u l t C o l u m n s buttons.
August 7, 2019 47
Chapter 4 Plugins (views) Niagara Rdbms Driver Guide
This view of the Orion database is directly under the Station. To access it, expand S t a t i o n → O r i o n → D a t a b a -
s e N a m e (such as HsqlDbDatabase).
O r i o n M o d u l e Ty p e s v i e w
This is a view on the FoxOrionDatabase component. It displays a table of all the Orion types and their associ-
ated module for the selected database.
This view of the Orion database is directly under the Station. To access it, expand S t a t i o n → O r i o n → O r i o n -
D a t a b a s e N a m e (such as HsqlDbDatabase), then click the drop-down arrow next to the module name
(circled above).
O r i o n Ty p e S u m m a r y v i e w
This is a view on the O r i o n Ty p e component that has an upper and lower section.
48 August 7, 2019
Niagara Rdbms Driver Guide Chapter 4 Plugins (views)
This view shows the Type identification (module:type) and its Super Type in the top section. The Orion Type
properties are listed in a table in the lower section of the view.
You access this view by expanding S t a t i o n → O r i o n → D a t a b a s e N a m e followed by double-clicking orion, and
selecting Orion Type Summary from the drop-down list in the upper right corner of the view.
O r i o n Ty p e T a b l e V i e w
This is a view on the O r i o n Ty p e component.
rd b
Rdbms History Import Manager view
This view imports records from an Rdbms database as framework histories. It is a view on the Histories ex-
tension of an Rdbms database.
F ig ure 40 Rdbms History Import Manager View
August 7, 2019 49
Chapter 4 Plugins (views) Niagara Rdbms Driver Guide
You access this view by expanding D r i v e r s → R d b m s N e t w o r k , expanding your rdb Database, right-clicking
the H i s t o r i e s node in the Nav tree and clicking V i e w s → R d b m s H i s t o r y I m p o r t M a n a g e r.
You access this view by expanding the D r i v e r s → R d b m s N e t w o r k , expanding your rdb Database and dou-
ble-clicking the P o i n t s folder.
Using this manager view, you can do the following:
• Select one or more entries in the D a t a b a s e pane and use the popup (right-click) menu to cut, copy, dupli-
cate, rename, or other menu items to edit the rows. In addition, you can select individual rows and go to
other views of a selected entry.
• Add one or more queries to the Rdbms Points Device Extension. Once added, these Rdbms Point
Queries appear in the manager view as well as in the Nav tree.
50 August 7, 2019
Niagara Rdbms Driver Guide Chapter 4 Plugins (views)
You access this view, once you have created an RdbmsPointQuery by expanding D r i v e r s → R d b m s N e t w o r k
in the Nav tree, expanding the P o i n t s folder under your rdb Database node and double-clicking the
R d b m s P o i n t Q u e r y container.
This view works in a way that is similar to the standard Point Manager view and, like that view, it has D i s c o v -
e r e d and D a t a b a s e panes, as well as similar buttons at the bottom of the view.
Discovery
The D i s c o v e re d pane (top) displays the discovered points the driver finds when you click the D i s c o v e r but-
ton. The driver displays in the D i s c o v e r e d pane only data points that meet the parameters of the query.
The N e w F o l d e r, N e w, E d i t , C a n c e l , A d d , and M a t c h buttons work as described in the Drivers Guide.
Clicking the A d d or M a t c h buttons moves the discovered and selected points from the D i s c o v e r e d pane to
the D a t a b a s e pane and includes them under the P o i n t s node of the appropriate rdbDatabase.
F ig ure 44 Example of an Rdbms Query compared to the Discovered pane
Discovered points represent the results of executing the Rdbms point query. In fact, the results from the da-
ta in the D i s c o v e re d pane should match the data presented in the Query Results pane of the R d b m s Q u e r y
V i e w. The D i s c o v e r button executes the query defined by the Sql property in the N e w R d b m s P o i n t
Q u e r y window.
August 7, 2019 51
Chapter 4 Plugins (views) Niagara Rdbms Driver Guide
R d b m s Q u e r y Vi e w
This is a view on the R d b m s P o i n t Q u e r y component. It is typically a view for working with queries as you are
developing them because queries execute immediately and the lower pane displays the results as soon as
you click the R u n button (or with some delay, depending on database size and network connection speed). If
there are errors in the query, an error window opens an error message.
Assuming you have already created at least one query, you access this view for that query by expanding the
D r i v e r s → R d b n s N e t w o r k , expanding your rdbDatabase, expanding the P o i n t s folder, right-clicking the
R d b m s P o i n t Q u e r y node, and clicking V i e w s → R d b m s Q u e r y V i e w.
The R d b m s P o i n t Q u e r y View has two panes and two buttons.
• The top Q u e r y pane is a text editor you use to type a query directly into the editor box. Any saved
changes are also reflected in the Sql property of the RdbmsPointQuery P r o p e r t y S h e e t . Saved changes
in the P r o p e r t y S h e e t are also reflected here.
• The bottom Q u e r y R e s u l t s pane displays the data returned by the query when you click the R u n button.
• Clicking the R u n button executes the query as typed in the Q u e r y pane.
• Clicking the S a v e button saves the query as typed in the Q u e r y pane.
rd b D a t a b a s e
MySQL History Export Manager view
This view discovers, configures and exports history records to a MySQL Rdbms database. It is a view on the
MySQL Histories extension.
52 August 7, 2019
Niagara Rdbms Driver Guide Chapter 4 Plugins (views)
August 7, 2019 53
Chapter 4 Plugins (views) Niagara Rdbms Driver Guide
54 August 7, 2019
Index
A H
about this guide ...................................................5 history type
AlarmService export ............................................................22
replacing.........................................................12 HistoryTimezoneUpdater ....................................27
API.....................................................................35 HsqlDatabase.....................................................31
HsqlDb.................................................................8
B
I
BOrionApp.........................................................35
BOrionObject .....................................................35 import................................................................15
BOrionService ....................................................35 installation........................................................ 7, 9
BOrionSession ....................................................35
BOrionSpace ......................................................35
BRdbms .............................................................35 M
modules ...............................................................8
MySQL .................................................................8
C Unix time conversion .......................................24
components .......................................................27 MySQL Histories.................................................33
configuration........................................................7 MySQL History Export Manager view ..................52
database.........................................................10 MySQLDatabase.................................................33
connection troubleshooting ................................12
O
D Oracle database ...................................................8
data Oracle History Export Manager view ...................53
exporting........................................................19 OracleDatabase..................................................32
importing........................................................24 OracleHistoryDeviceExt......................................32
data management ..............................................15 orion ....................................................................8
database Orion API ...........................................................35
testing the connection.....................................12 Orion database
database configuration .......................................10 updating .........................................................26
databases supported ............................................8 Orion Db Manager view ......................................47
Device Manager view..........................................45 Orion Module Types view....................................48
document change log ...........................................5 Orion Type Summary view...................................48
driver component .................................................8 Orion Type Table View ........................................49
Dynamic Table Config view .................................46 OrionMigrator ....................................................37
Dynamic Table view ............................................46 OrionModule......................................................37
DynamicTable.....................................................36 OrionRoot ..........................................................37
OrionService ......................................................35
OrionType ..........................................................37
E
example .............................................................17 P
export................................................................15
by history ID....................................................20 ping ...................................................................12
by history type ................................................22 plugins ...............................................................45
Point Device Ext Manager view ...........................50
point device extension ..........................................8
F point query
adding and configuring....................................16
FoxOrionDatabase .............................................37 points ................................................................29
discovering .....................................................15
prerequisites ........................................................9
August 7, 2019 55
Index Niagara Rdbms Driver Guide
properties ..........................................................37
Q
query
editing ............................................................17
R
rdb-HistoryUnicodeUpdater................................27
RdbAlarmService ................................................12
Rdbms driver........................................................8
Rdbms History Import Manager view...................49
Rdbms Point Query Manager view.......................50
Rdbms Query View .............................................52
Rdbms Session View ...........................................52
RdbmsNetwork ..................................................28
RdbmsPointDeviceExt ........................................29
RdbmsPointQuery ..............................................30
related documentation .........................................5
S
SqlServer .............................................................8
SqlServer History Export Manager view...............53
SqlServerDatabase .............................................34
SqlServerHistoryDeviceExt .................................34
status flags .........................................................24
T
test ....................................................................12
trend flags..........................................................24
troubleshooting a connection..............................12
tuning policies
Worker component ...........................................8
U
Unicode
configuration ..................................................26
update wizard .................................................25
Unix time conversion ..........................................24
UTC
configuration ..................................................26
update wizard .................................................25
V
views..................................................................45
W
Worker container................................................29
56 August 7, 2019