0% found this document useful (0 votes)
59 views

Rdbms

Uploaded by

suporteb2e.gru
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
59 views

Rdbms

Uploaded by

suporteb2e.gru
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 56

Technical Document

Niagara Rdbms Driver Guide

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.

Copyright and patent notice


This document may be copied by parties who are authorized to distribute Tridium products in connection
with distribution of those products, subject to the contracts that authorize such distribution. It may not
otherwise, in whole or in part, be copied, photocopied, reproduced, translated, or reduced to any electronic
medium or machine-readable form without prior written consent from Tridium, Inc.
Copyright © 2019 Tridium, Inc. All rights reserved.
The product(s) described herein may be covered by one or more U.S. or foreign patents of Tridium.
Contents
About this guide .................................................................................................5
Document change log ................................................................................5
Related documentation ..............................................................................5

Chapter 1 Installation and configuration ...........................................................7


About the driver.........................................................................................8
Modules ..........................................................................................8
Prerequisites ....................................................................................9
Installing the network and database ............................................................9
Configuring database properties ..............................................................10
Testing the database connection ..............................................................12
Connection troubleshooting .....................................................................12
Replacing the standard alarm database .....................................................12

Chapter 2 Data management..........................................................................15


Discovering and adding points..................................................................15
Adding and configuring a new point query ................................................16
Editing an existing query ..........................................................................17
Rdbms implementation example ...............................................................17
Exporting history data to an Rdbms database............................................19
Export by history ID .......................................................................20
Export by history type ....................................................................22
Status and trend flags.....................................................................24
Unix time conversion for MySQL ...............................................................24
Importing history data from an Rdbms database........................................24
Updating an existing database to support Unicode and UTC......................25
Updating existing Orion databases to support Unicode .............................26

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.

Document change log


This topic summarizes the releases of this document .
August 7, 2019
Updates and edits for Niagara 4.8.

September 17, 2018


Initial release for Niagara 4.

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

About the driver


The Rdbms driver, is a non-field bus driver that uses a network architecture similar to other framework
drivers.
This driver has many properties and extensions in common with other field-bus-type network drivers. How-
ever, there are several distinctive Rdbms driver characteristics. The following list briefly notes some of the
distinctive points of the Rdbms driver:
• There is no separate R d b m s N e t w o r k driver component palette. The rdb palette provides history-related
components.
In addition to being available as a Type [of network] to add when you double-click the D r i v e r node in
the Nav tree, and click N e w at the bottom of the D r i v e r M a n a g e r view, the driver is also located on each
of the individual rdb Database module palettes.
• Appropriately-licensed Supervisor stations support these databases: SqlServer, Oracle, MySQL, and
HsqlDb. Embedded controllers support only the HsqlDbDatabase database.
• The Rdbms point device extension is unlike point device extensions associated with other drivers. This
point device extension uses the Rdbms Point Query component to filter database records and provide
candidate records for proxy points.
• The R d b m s N e t w o r k does not have a tuning policies component.
Fi gu re 1 Worker properties for tuning

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

alarmOrion OrionAlarmService, Converters alarmOrion-rt.jar Provides the OrionAlarmService, which replaces


the standard AlarmService so that a station can
support an RDBMS alarms database.

orion OrionService, DynamicTable, orion.jar Provides an Orion database system. Developed


OrionMigrator at Purdue University, this general-purpose uncer-
tain database system unifies the modeling of
probabilistic data across applications. (source: or-
ion.cs.purdue.edu)

rdb HistoryUnicodeUpdater and rdb.jar Defines database ords used to configure ex-
HistoryTimezoneUpdater ported data.

rdbHsqlDb RdbmsNetwork, RdbmsFolder, rdbHsqlDb.jar Supports an open source relational database


(optional) HsqlDbDatabase management system written in Java. (source:
Wikipedia)

rdbMySQL RdbmsNetwork, RdbmsFolder, rdbMySQL.jar Supports an open-source relational database


(optional) MySQLDatabase management system originally developed by Mi-
chael Widenius whose daughter's name was My.
SQL stands for Structured Query Language.
(source: Wikipedia)

8 August 7, 2019
Niagara Rdbms Driver Guide Chapter 1 Installation and configuration

Network component(s) in the .jar file name in the


Palette name Nav tree modules folder Function

rdbOracle RdbmsNetwork, RdbmsFolder, rdbOracle.jar Supports a multi-model database management


(optional) OracleDatabase system produced and marketed by Oracle Cor-
poration. (source: Wikipedia)

rdbSqlServer RdbmsNetwork, RdbmsFolder, rdbSqlServer.jar Supports a relational database management sys-


(optional) SqlServerDatabase tem developed by Microsoft. (source: Wikipedia)

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.

Installing the network and database


This task applies to installing rdbHsqlDb, rdbMySQL, rdbOracle, and rdbSqlServer.
P re re q u i s i t e s : You are working in Workbench running on a PC that is connected to the device network.
Step 1 Double-click the station’s D r i v e r s container, to bring up.
The D r i v e r M a n a g e r view opens.
Step 2 Click the N e w button.
The N e w network window opens.

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.

Co nfi g uri ng d at ab as e p ro pe rt ies


This procedure configures the selected database in your station.
P r e r e q u i s i t e s : You are working in Workbench.
Step 1 Right-click your rdbDatabase under D r i v e r s → R d b m s N e t w o r k in the Nav tree, and click V i e w -
s →Propert y She et.
The P r o p e r t y S h e e t opens.
Step 2 Select true for Sql Scheme Enabled.
Step 3 Set values for the other properties applicable to the rdbDatabase device.
The Properties Dictionary in this guide documents all properties. The following table indicates
which properties are available based on the rdbDatabase device.
Table 1 RdbmsNetwork database properties

P ro pe r t y HsqlDb MySQL Oracle SqlServer

Status (Information)

Enabled X X X X

10 August 7, 2019
Niagara Rdbms Driver Guide Chapter 1 Installation and configuration

Property HsqlDb MySQL Oracle SqlServer

Fault Cause (Information)

Health (Information)

Alarm Source Info X X X X

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

Use Unicode Encoding Scheme X X X X

Timestamp Storage X - X X

Points X X X X

Sql Scheme Enabled 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 .

Testing the database connection


This procedure applies to any type of rdb Database.
P r e r e q u i s i t e s : You are working in Workbench
Step 1 Right-click R d b m s N e t w o r k → R d b m s D a t a b a s e D e v i c e E x t e n s i o n in the Nav tree, and click
Actions→Ping.
If a valid connection to the database is made, the Health property displays {Ok}.
Step 2 If the Health property displays {Fail}, a connection is not made and you should examine the
Last Fail Cause property for details.

Co nnec tio n tro ub le sho o ti ng


This topic includes some general, as well as database-specific, suggestions for some of the more common
problems with establishing a network connection to the remote RDBMS databases.

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.

Re pl ac in g th e s t and ard al arm d atab as e


The AlarmService manages the standard alarm database. Instead, You can configure an RDBMS (SQL Server,
Oracle, or MySQL) to replace a station’s standard alarm database.
Use of an RDBMS to store alarm records differs from exporting histories to an RDBMS. Exported histories re-
side in the station's default history database (^\history\segN\(etc)), whereas, configuring for RDBMS
storage of alarms replaces use of the station's default alarm database (^\alarm\alarm.adb).
This procedure describes how to set up the RdbAlarmService.
Step 1 Install and configure the RdbmsNetwork driver and test the connection to your desired database.

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.

F ig ure 2 Database devices in the Nav tree

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.

Discovering and adding points


The discovery process uses the Rdbms Point Query Sql property to query the targeted rdb database and re-
turn only those points that satisfy the query.
Step 1 Click the D i s c o v e r button (at the bottom of the view). This executes the query (as defined in the
Rdbms Point Query Sql property) and any discovered points appear in the D i s c o v e re d pane at
the top of the view.
Step 2 Double-click on the desired Rdbms Point Query component.
The R d b m s P o i n t Q u e r y M a n a g e r view opens.
Step 3 At the bottom of the view, click the A d d button.
The A d d window opens, with all selected points in the top pane of the window.
The Point Manager's A d d button is available when you select (highlight) one or more data item in
the top D i s c o v e r e d pane. The toolbar has an available Add tool, and the Manager menu has an
Add command. Also, you can simply double-click a discovered item to bring it up in the Add
window
Step 4 Configure the properties and click O k .

August 7, 2019 15
Chapter 2 Data management Niagara Rdbms Driver Guide

Adding and configuring a new point query


You create proxy points under the R d b m s D e v i c e E x t e n s i o n for any of the database device types. As with
device objects in other drivers, each RdbmsNetwork device has a single P o i n t s extension.
P r e r e q u i s i t e s : The driver and database are installed.
The R d b m s P o i n t Q u e r y M a n a g e r works differently than other Point Manager views because of the way it
uses the Rdbms Points Query component. This component (using its Sql property) filters the data to provide
the candidate records that are available for adding as proxy points in the manager view.
Although the default view of 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 is the R d b m s P o i n t D e v i c e E x t M a n a g e r,
you may often need to use the P ro p e r t y S h e e t view and the R d b m s Q u e r y views.
In this procedure, the term “rdb Database” represents any valid Rdbms Database Device Extension.
Step 1 Expand D r i v e r s → R d b m s N e t w o r k in the Nav tree, expand your rdb Database node and double-
click the P o i n t s node.
The P o i n t D e v i c e E x t M a n a g e r view opens.
Step 2 Click the N e w button at the bottom of the view.
The N e w window opens.
Step 3 Select type of R d b m s P o i n t Q u e r y component to add, indicate the number of query components
to add, and click O k .
N O T E : If you add more than one, you can batch-edit most of the properties to configure them all
at once.
A second N e w window opens.
Fi gu re 3 Rdbms Point Query view

Step 4 Enter the query in the S q l property.


N O T E : The S q l property is BFormat. You can add BFormat syntax to the query string that proc-
esses before the driver sends the query to the database.
Step 5 Configure any other query properties and click O k .
The driver adds the new R d b m s P o i n t Q u e r y component(s) under the P o i n t s D e v i c e E x t e n s i o n
node in the Nav tree and displays them in the R d b m s P o i n t D e v i c e E x t M a n a g e r view.

16 August 7, 2019
Niagara Rdbms Driver Guide Chapter 2 Data management

Editing an existing query


You can change a query that already exists. The R d b m s Q u e r y V i e w that opens when you edit an existing
query is, typically, the most convenient place to work with queries as you are developing them because the
query executes 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 with an error message.
P re re q u i s i t e s : The query you are working on already exists.
Step 1 Expand the D r i v e r s → R d b n s N e t w o r k , expand 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 → R d b m s Q u e r y V i e w.
The R d b m s Q u e r y V i e w opens.
N O T E : This view executes on display. So as soon as you open this view the saved query executes
and displays results in the Q u e r y R e s u l t s pane.
Step 2 To edit the saved query, select and work with the text in the editor box (top box).
Each valid query entry in the Sql property returns a set of data. Two properties define the query:
• Sql is a large text editor that displays the text of the Query (if any).
• Update Frequency displays when (in hours, minutes, and seconds) the driver executes the
query and updates the control points.
Step 3 To test-run the query, click R u n .
Step 4 To save the query for future use, click S a v e .
C A U T I O N : If you change (or refresh) the view without clicking S a v e , any unsaved changes are lost.
No warning is given.

Rdbms implementation example


This hypothetical example illustrates how the RdbmsNetwork proxy points might be created and used.
A nationwide convenience store corporation uses a remote SqlServer database to archive fuel sales records
from each of its stores, archiving store records for three types of fuel to the database every 15 minutes. To
graphically display updated information over the Internet, they use the RdbmsNetwork and the Point Device
Extension, as illustrated in the following list of screen captures:
1. Each store exports transaction histories from its controller via a Supervisor, to a central SqlServer data-
base using the S q l S e r v e r H i s t o r y D e v i c e E x t and the H i s t o r y E x p o r t M a n a g e r view.

F ig ure 4 Rdbms histories

N O T E : Embedded controllers support only the HsqlDbDatabase.

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

F ig ure 7 Rdbms Point Device Extension Manager view

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.

F ig ure 8 Graphical display of total gallons sold

Exporting history data to an Rdbms database


Each Rdbms Device extension has an associated History Device Extension, which you can configure and use
to export data to an Rdbms database ( MySQL, Oracle, and SqlServer) and framework history file.
P re re q u i s i t e s : You are working in Workbench in a Supervisor station with an established connection to a
database.
The driver supports two database schema, which provide data export by ID or by Type. If the Database Ad-
ministrator (DBA) did not manually create each schema, the RdbmsNetwork driver creates them automati-
cally as it exports each history.
Your DBA may consider an export by type to be more suitable for the post process ETL (Extracting, Trans-
forming and Loading) of the data beyond the flat file produced by the driver. This is because the driver cre-
ates fewer tables and requires fewer permissions on the database.
In the following steps, the term rdb Database refers to any of the database types.
Step 1 Expand D r i v e r s → R d b m s N e t w o r k → rd b D a t a b a s e , and double-click the H i s t o r i e s node in the
Nav tree.
The H i s t o r y E x p o r t M a n a g e r view opens.
Step 2 Click the N e w button
As an alternative to the N e w button and window, you can click the D i s c o v e r button and browse to
find and select the history file to export.
The N e w window opens.

August 7, 2019 19
Chapter 2 Data management Niagara Rdbms Driver Guide

Fi gu re 9 Rdbms History Export view

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

Numeric writable export example


F ig ure 10 Example

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

History_Config when using BY_HISTORY_ID expo rts


Fi gu re 12 Example

The data types of this example are:

Fi gu re 13 History config data types

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.

Export by history type


In this method, the driver creates a single table for each type of record exported, recording the source point
in that table
This HISTORY_NUMERIC_TREND_RECORD is an example of the table.

22 August 7, 2019
Niagara Rdbms Driver Guide Chapter 2 Data management

F ig ure 14 History type example

The data types of this descriptive table are:


F ig ure 15 History numeric trend data types

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

The data types of this example are:

F ig ure 17 History type map data types

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)

0 {ok} 4 {down} 32 {overridden}

1 {disabled} 8 {alarm} 64 {null}

2 {fault} 16 {stale} 128 {unackedAlarm}

For example:

S T AT U S S T AT U S _ T A G

15 {disabled, fault, down, alarm}

136 (a;ar,. imacledA;ar,}

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.

Trend # T re n d ( t ag ) T re n d # Trend (tag) T re n d # Trend (tag)

1 {start} 4 {Hidden} 16 {Interpolated}

2 {OutofOrder} 8 {Modified}

Unix time conversion for MySQL


Unix time is a system for describing instants in time, defined as the number of seconds that have elapsed
since 00:00:00 Coordinated Universal Time (UTC), Thursday, 1st January 1970. Unix time is a single signed in-
teger number with which the driver time-stamps the Database records.
To convert Unix time into a readable date format in MySQL add the following query statement: FROM_UNI-
XTIME(TIMESTAMP/1000). This statement results in a timestamp with this syntax: YYYY-MM-DD HH:MM:SS.
ssss

Im p o rt ing hi st or y da ta fro m an R d bm s da tab as e


Each of the following Rdbms Device extensions has an associated History Device Extension, which you can
configure and use to import data to a station from an Rdbms database and framework history file: MySQL,
Oracle, and SqlServer. In the following steps, the term rdb Database refers to any of these database types.
Step 1 Expand D r i v e r s → R d b m s N e t w o r k , expand your rdb Database, right-click the H i s t o r i e s node in
the Nav tree and click 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.
The 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 view opens.
Step 2 Click the N e w button
As an alternative to the N e w button and window, you can click the D i s c o v e r button and browse to
find and select the history file to import.
The N e w window opens.
Step 3 Select Rdb History Import (the default) from the Type to Adddrop-down list and enter the num-
ber of import descriptors to add in the Number to Add property.

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.

Step 7 Configure the other import properties, and click O k .


The new history import descriptor(s) appears in the D a t a b a s e (lower) pane.
Step 8 Do one of the following to initiate an import action:
• Select one or more history descriptors in the database pane and click the A r c 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 import to
occur, as scheduled.
The D a t a b a s e pane displays the status and time of the last import action in the Status and Last
Success columns, respectively. Each import descriptor appears under the H i s t o r y node in the Nav
tree.

Updating an existing database to support Unicode and UTC


The computing industry standard known as Unicode handles text expressed in most of the world’s writing
systems. UTC (Coordinated Universal Time) is the primary time standard by which the world regulates clocks.
It does not observe daylight saving time. This procedure updates a database to support Unicode and UTC.
P re re q u i s i t e s : Before connecting to your database for the first time you enabled Use Unicode Encoding
Scheme.
Step 1 Back up the database(s) to update.

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.

Updating existing Orion databases to support Unicode


This procedure is for databases that are currently without UTF-8 support.
Step 1 Right-click the rdb Database node in the Nav tree and click V i e w s → P r o p e r t y S h e e t .
Step 2 Enable the Use Unicode Encoding Scheme property (set its value to true).
This property must be set to true before you configure the Orion properties.
Step 3 Open the orion palette and drag the O r i o n M i g r a t o r to the R d b m s N e t w o r k node in the Nav
tree.
Step 4 Configure the O r i o n M i g r a t o r component properties and click S a v e .

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.

F ig ure 18 HistoryUnicodeUpdater properties

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.

Poi n t con t ai ne r si mil a ri t ie s (c ompare d to oth e r dr i ve r s)


Like other Point Device Extensions, the Rdbms Point Device Extension:
• is a required (frozen) slot on the Rdbms Point Device component - it's always there, you cannot delete it.
• displays as a typical Points node under its appropriate RdbmsNetwork driver.
• is a container component, having several special views.
• is a parent of proxy points.
• has a default manager view (the Rdbms Point Device Ext Manager view) and uses Discover, Add, and
New buttons to add proxy points.

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

F ig ure 23 RdbmsPointQuery Property Sheet

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.

F ig ure 24 HsqlDatabase Property Sheet

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

You access Histories properties by expanding D r i v e r s → R d b m s N e t w o r k → M y S Q L D a t a b a s e followed by


right-clicking H i s t o r i e s and clicking V i e w s → P r o p e r t y S h e e t
This container itself contains the Retry Trigger container.

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

You access Histories properties by expanding D r i v e r s → R d b m s N e t w o r k → S q l S e r v e r D a t a b a s e followed by


right-clicking H i s t o r i e s and clicking V i e w s → P r o p e r t y S h e e t
This container itself contains the Retry Trigger container.

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

Fi gu re 30 Orion Service Property Sheet

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

F ig ure 32 Rdbms model with dynamic tables

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.

Pro p ert ie s d ic t io nar y


This topic documents the properties used to configure database and other components.

Property and Value Description


where to find it
App Ord (right- ord Specifies an ord path to an application. Either this property or
click DynamicTable the Db Ord property (but not both) are required for linking the
in the Nav tree and DynamicTable to a database.
click V i e w s → P ro p -
erty Sheet)
Base Directory file path Defines the path that points to the location of the Hsql data-
(HsqlDb device base. A typical configuration is to create a folder directly under
only) the station (in the file space). For example, if the folder is
named “hsqldb”, a path to the folder is specified as file:
^hsqldb.

August 7, 2019 37
Chapter 3 Components Niagara Rdbms Driver Guide

Property and Value Description


where to find it
Capacity (New im- drop-down list Configures the number of records to import.
port histories
window) Unlimited places no limit on the size of the import.
Record Count opens a property to define the number of re-
cords (defaults to 500).
Current Timestamp drop-down list Selects the policy that defines the time zone: Station Time
Storage Policy (His- Zone or History Config Time Zone.
toryTimezoneUp-
dater)
Database Name ( text Configures a connection to the Database
HsqlDb and
MySQL Database
devices only)
Database Ords ord Specifies an ord path to the appropriate updater(s).
(HistoryUnico-
deUpdater, Histo-
ryTimezoneUpdat-
er)
Days of the Week radio buttons Selects specific days of the week to perform a task, such as
sampling data for histories.

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

Property and Value Description


where to find it
Full Import On Ex- drop-down list Specifies to import either the full database (up to the specified
ecute (New import limit) or only the new data on each successive import action.
histories window)
Full Policy (New drop-down list (de- Determines what happens when the station database reaches
import histories faults to Roll) the maximum number of records it can hold.
window)
Roll overwrites the oldest records with the new ones.
Stop terminates the import job.

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

Property and Value Description


where to find it

You adjust to reflect the peak number of import or export re-


cords per archive that are expected to be processed; normally
increased to handle large volumes of data.
Max Threads (data- number Specifies the maximum number of multiple, concurrent con-
base device com- nections (threads) that the station makes with the external da-
ponents, Worker tabase. The default value is one thread. Each thread uses one
container) JDBC Connection to communicate with the database, so there
are as many connections created as there are threads.
Normally you increase this value to between 20 and 50 to im-
prove performance when handling large volumes of data.

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

Property and Value Description


where to find it
click V i e w s → P ro p - Dynamic Table
erty Sheet) C o n f i g view.
Service Name (Or- text Refers to the Oracle SID or System IDentifier, which uniquely
acleDatabase de- identifies a database instance. It allows you to configure a con-
vice only) nection to an Oracle database if the user has not been previ-
ously set up in the Oracle Database with a default SID, or to
connect to an SID that is not the default. If a default SID has
been set up and you need to connect to it, you can leave this
property blank.

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

Property and Value Description


where to find it
Timestamp Column text Specifies the Timestamp column for the imported data.
(New import histor-
ies window)
Timestamp enum property Exports or updates history timestamps to Coordinated Univer-
Storage drop-down list (de- sal Time (UTC) enabling the export of history records from dif-
faults to Dialect ferent timezones into a common database and be
Default) 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 ap-
ply to history exports.
N O T E : An Update Wizard is available to upgrade existing da-
tabases to support Unicode.

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

Property and Value Description


where to find it
N O T E : The effect of these History properties may be irrele-
vant depending upon the setting of theTimestamp Storage
Use Last Time- true or false false queries the database for the last timestamp in the data-
stamp (OracleDa- (default) base every time an export descriptor processes. Depending
tabase device only) on the size of the database table and the number of export de-
scriptors being processed, this can be a time consuming
activity.
true stores the last timestamp as a property on the export de-
scriptor each time it processes the export. This efficiency-re-
lated setting helps with overall system performance when
exporting data.

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.

Device Manager view


This view manages the rdb Database devices.
F ig ure 33 Device Manager view with Add and Edit windows

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.

Dynamic Table Config view


This is a multi-pane view on the DynamicTable component used to the columns on a dynamic table view.

46 August 7, 2019
Niagara Rdbms Driver Guide Chapter 4 Plugins (views)

F ig ure 35 Dynamic Table Config view

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.

Orion Db Manager view


This is the view on the FoxOrionDatabase component. It displays a table of all the Orion types and their as-
sociated module for the selected database.

August 7, 2019 47
Chapter 4 Plugins (views) Niagara Rdbms Driver Guide

Fi gu re 36 Orion Db Manager view

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.

Fi gu re 37 Orion Module Types

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)

F ig ure 38 Orion Type Summary view

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.

F ig ure 39 Orion Type Table view

This view shows a table of Orion application records.

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.

Point Device Ext Manager view


This is the default view of the Rdbms Point Device Extension. It has a single D a t a b a s e pane that displays
any Rdbms Point Queries that are present.
Fi gu re 41 Point Device Ext Manager view

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.

Fi gu re 42 The New query window

Rdbms Point Query Manager view


This is the default view for the R d b m s P o i n t Q u e r y component under the P o i n t s folder in the Nav tree. It
works in a way that is similar to the standard P o i n t M a n a g e r view and, like that view, it has a Discovered
and Database pane as well as similar buttons at the bottom of the view.

50 August 7, 2019
Niagara Rdbms Driver Guide Chapter 4 Plugins (views)

F ig ure 43 Point Query Manager view

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.

Fi gu re 45 Rdbms Query View

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.

Rdbm s Ses si on Vie w


This view provides information about the relational database session.

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.

Fi gu re 46 MySQL History Export Manager view

52 August 7, 2019
Niagara Rdbms Driver Guide Chapter 4 Plugins (views)

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 → M y S Q L D a t a b a s e , right-clicking the Histories


node in the Nav tree and clicking V i e w s → M y S Q L H i s t o r y E x p o r t M a n a g e r node in the Nav tree.

Oracle History Export Manager view


This view discovers, configures and exports history records to a Oracle Rdbms database. It is a view on the
Oracle Histories extension.
F ig ure 47 Oracle History Export Manager view

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 → O r a c l e D a t a b a s e , right-clicking the Histories


node in the Nav tree and clicking V i e w s → O r a c l e H i s t o r y E x p o r t M a n a g e r node in the Nav tree.

SqlServer History Export Manager view


This view discovers, configures and exports history records to a SqlServer Rdbms database. It is a view on
the SqlServer Histories extension.
F ig ure 48 SqlServer History Export Manager view

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 → S q l S e r v e r D a t a b a s e , right-clicking the His-


tories node in the Nav tree and clicking V i e w s → S q l S e r v e r H i s t o r y E x p o r t M a n a g e r node in the Nav tree.

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

You might also like