Niagra AX 3.x RDBMS
Niagra AX 3.x RDBMS
Niagra AX 3.x RDBMS
NiagaraAX-3.x RdbmsNetwork
Driver Guide
October 1, 2008
NiagaraAX Rdbms Driver Guide
Copyright © 2008 Tridium, Inc.
All rights reserved.
3951 Westerre Pkwy, Suite 350
Richmond
Virginia
23233
U.S.A.
Copyright Notice
The software described herein is furnished under a license agreement and may be used only in accor-
dance with the terms of the agreement.
This document may not, 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 Trid-
ium, Inc.
The confidential information contained in this document is provided solely for use by Tridium
employees, licensees, and system owners; and is not to be released to, or reproduced for, anyone else;
neither is it to be used for reproduction of this Control System or any of its components.
All rights to revise designs described herein are reserved. While every effort has been made to assure
the accuracy of this document, Tridium shall not be held responsible for damages, including conse-
quential 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 release and technology contained herein may be protected by one or more U.S. patents, foreign
patents, or pending applications.
Trademark Notices
BACnet and ASHRAE are registered trademarks of American Society of Heating, Refrigerating and
Air-Conditioning Engineers. Microsoft and Windows are registered trademarks, and Windows NT,
Windows 2000, Windows XP Professional, and Internet Explorer are trademarks of Microsoft Corpo-
ration. Java and other Java-based names are trademarks of Sun Microsystems Inc. and refer to Sun's
family of Java-branded technologies. 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, NiagaraAX and Vykon are registered trademarks, and Work-
bench, WorkPlaceAX, and AXSupervisor, are trademarks of Tridium Inc. All other product names and
services mentioned in this publication that is known to be trademarks, registered trademarks, or ser-
vice marks are the property of their respective owners. The software described herein is furnished
under a license agreement and may be used only in accordance with the terms of the agreement.
CONTENTS
Preface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . iii
Document Change Log . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . iii
Related documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3–iii
Database licensing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3–iii
NiagaraAX-3.x
i
NiagaraAX-3.x RdbmsNetwork Driver Guide
September 24, 2008
NiagaraAX-3.x
ii
NiagaraAX-3.x RdbmsNetwork Driver Guide
PREFACE
Preface
Document Change Log
Related documentation
The following documents are related to the content in this document and may provide addition infor-
mation on the topics it covers:
• NiagaraAX-3.x User Guide
• NiagaraAX-3.x Drivers Guide
Database licensing
Use of any of the databases mentioned in this document is subject to the terms and conditions of the
respective database supplier. For additional copyright and licensing information, please refer to the
individual supplier documentation. See “Types of RdbmsNetwork Driver Devices” on page 2-5 for links
to some database supplier web sites.
NiagaraAX-3.x
iii
NiagaraAX-3.x RdbmsNetwork Driver Guide
Database licensing
October 1, 2008
NiagaraAX-3.x
iv
NiagaraAX-3.x RdbmsNetwork Driver Guide
CHAPTER 1
RdbmsNetwork Installation and Configuration
This chapter describes how to use WorkbenchAX to install, configure and test an RdbmsNetwork driver
with the following Rdbms database device extensions:
• Db2
• MySQL
• Oracle
• SqlServer
• HsqlDb
To connect to an RDBMS from a NiagaraAX workstation (for example, for importing, exporting, or
querying data) you must:
1. Install the RdbmsNetwork driver
2. Configure the RdbmsNetwork
3. Test the RdbmsNetwork Connection
Requirements
The following list includes prerequisites for successfully installing and using the RdbmsNetwork:
• NiagaraAX license feature for the appropriate Rdbms database
Each database type requires a specific license feature entry in the license file. Figure 1-1 shows part
of a license file with five rdbDatabases that are licensed.
NiagaraAX-3.x
1–1
NiagaraAX-3.x RdbmsNetwork Driver Guide
Installing the RdbmsNetwork driver and rdbDatabase device Chapter 1 – RdbmsNetwork Installation and Configuration
October 1, 2008
Figure 1-2 Use the Palette menu from the WorkbenchAX toolbar menu
Step 2 On the Palette Toolbar, click the Open icon. The Open Palette dialog box appears.
Note: In the following steps, the term rdbDatabase is used to represent any one of the following databases: Db2,
MySQL, Oracle, SqlServer.
Step 3 In the Open Palette dialog box, scroll to select the desired rdbDatabase module in the list and click
OK to confirm the selection. The rdbDatabase palette opens in the Palette Side Bar pane.
Figure 1-3 Selecting a module in the Open Palette dialog box opens it in the palette Side Bar pane
Step 4 From the rdbDatabase palette, drag and drop (or copy and paste) the RdbmsNetwork driver component
onto the Drivers node in the nav tree, as shown in Figure 1-4.
Figure 1-4 Add the RdbmsNetwork driver under the drivers node
Step 5 Right-click on the RdbmsNetwork node in the nav tree and select Property Sheet from the popup
menu. The RdbmsNetwork Property Sheet view displays.
Step 6 From the RdbmsNetwork Property Sheet view, set the Enabled property to true.
Step 7 From the rdbDatabase palette, drag and drop (or copy and paste) the rdbDatabase device component
onto the RdbmsNetwork node in the nav tree. The database device component appears under the
RdbmsNetwork node in the nav tree, as shown in Figure 1-5.
NiagaraAX-3.x
1–2
NiagaraAX-3.x RdbmsNetwork Driver Guide
Chapter 1 – RdbmsNetwork Installation and Configuration Installing the RdbmsNetwork driver and rdbDatabase device
October 1, 2008
Figure 1-6 Use the Palette menu from the WorkbenchAX toolbar menu
Step 2 On the palette Toolbar, click the Open icon. The Open Palette dialog box appears.
Step 3 In the Open Palette dialog box, scroll to select the rdbHsqlDb module in the list and click OK to
confirm the selection. The rdbHsqlDb palette opens in the Palette Side Bar pane.
Figure 1-7 Selecting rdbHsqlDb module in Open Palette dialog box opens it in the Palette Side Bar pane
Step 4 From the rdbHsqlDb palette, drag and drop (or copy and paste) the RdbmsNetwork driver component
onto the Drivers node in the nav tree, as shown in Figure 1-8.
Figure 1-8 Add the RdbmsNetwork driver under the drivers node
Step 5 Right-click on the RdbmsNetwork node in the nav tree and select Property Sheet from the popup
menu. The RdbmsNetwork Property Sheet view displays.
Step 6 From the RdbmsNetwork Property Sheet view, set the Enabled property to true.
Step 7 From the rdbHsqlDb palette, drag and drop (or copy and paste) the rdbHsqlDb device component onto
the RdbmsNetwork node in the nav tree. The database device component appears under the
RdbmsNetwork node in the nav tree, as shown in Figure 1-9.
NiagaraAX-3.x
1–3
NiagaraAX-3.x RdbmsNetwork Driver Guide
Configuring an RdbmsNetwork driver Chapter 1 – RdbmsNetwork Installation and Configuration
October 1, 2008
NiagaraAX-3.x
1–4
NiagaraAX-3.x RdbmsNetwork Driver Guide
Chapter 1 – RdbmsNetwork Installation and Configuration Configuring an RdbmsNetwork driver
October 1, 2008
NiagaraAX-3.x
1–5
NiagaraAX-3.x RdbmsNetwork Driver Guide
Testing the Rdbms connection Chapter 1 – RdbmsNetwork Installation and Configuration
General RdbmsNetwork Notes October 1, 2008
• Database Name
Type in the name of the database that you are connecting to. If the database does not already exist,
the HsqlDb database is created when you save the property sheet values with a completed Base Di-
rectory and Database name.
Step 3 3. Click the Save button to save all property settings.
• If a valid connection to the database is made, the Health property displays an "Ok" value. If the
Health property displays a "Fail" value, then a connection is not made. Verify your database name is
correct.
SqlServer Notes
The following list applies to 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 the property is blank, it is ignored.
Note: SqlServerExress, by default, provides named instances for databases. The default name provided is
"SQLEXPRESS".
NiagaraAX-3.x
1–6
NiagaraAX-3.x RdbmsNetwork Driver Guide
CHAPTER 2
About the RdbmsNetwork
The RdbmsNetwork driver, shown in Figure 2-1, is a “non field bus” type driver that uses a network archi-
tecture similar to other NiagaraAX drivers.
The RdbmsNetwork driver has many properties and extensions in common with other "field bus” type
Network Drivers. However, there are several distinctive RdbmsNetwork driver characteristics. The
following list briefly notes some of the distinctive points of the RdbmsNetwork driver:
• The RdbmsNetwork Driver Component Location
There is not a separate RdbmsNetwork driver component palette. In addition to being available from
the Driver Manager view (shown in Figure 2-2) the driver is also located on each of the individual
rdb database module palettes.
Figure 2-2 Adding the RdbmsNetwork driver from the Driver Manager view
When you add the RdbmsNetwork driver component from the Driver Manager view, using the New
dialog box, the component is placed under the Station "Drivers" node.
Note: Starting in NiagaraAX-3.4, appropriately-licensed NiagaraAX Supervisor stations support
SqlServer, Oracle, Db2, MySQL, and HsqlDb databases. For embedded JACEs, the HsqlDbDatabase
is the only database that is supported.
• Rdbms Point Device Extension
The 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. Refer to “About the Rdbms Point Device Extension”
on page 2-6 for details.
NiagaraAX-3.x
2–1
NiagaraAX-3.x RdbmsNetwork Driver Guide
About the RdbmsNetwork hierarchy Chapter 2 – About the RdbmsNetwork
Types of RdbmsNetwork network-level components and properties October 1, 2008
Figure 2-3 Set thread and que values at the “device” level
The following device components and properties are identical to those listed under “Types of
RdbmsNetwork network-level components and properties” on page 2-2 and described in the NiagaraAX
Drivers Guide.
• Status
• Enabled
NiagaraAX-3.x
2–2
NiagaraAX-3.x RdbmsNetwork Driver Guide
Chapter 2 – About the RdbmsNetwork About the RdbmsNetwork hierarchy
October 1, 2008 About the RdbmsNetwork device components and extensions
• Fault Cause
• Health
• Alarm Source Info
Properties and components that are common to (or similar among) most Rdbms drivers are visible from
the Rdbms driver property sheet view, shown in Figure 2-6, and described in the following list:
• Host Address
Use this field to set the IP address of the computer platform where the database resides. A Dialup
selection option is available, if required.
• Owner Name
Use this field to set the optional (string) property name of the owner of the database. If this property
is left blank (default), then the User Name property is assumed to be an owner. "Owners" are allowed
to invoke DDL statements (see the following note).
Note: SQL statements are divided into two major categories: data definition language (DDL) and
data manipulation language (DML). DDL statements define or alter a data structure such as a table.
For example, DDL statments include: CREATE, ALTER, DROP, RENAME, and TRUNCATE.
• User Name
This property is the user name that is used to login to the database.
• Password
This property is the password that is used to login to the database.
• Worker
This is a child component of all Rdbms driver devices. The "Rdbms Worker" manages the queue and
threads for asynchronous operations on a single parent database. The Worker component provides
two properties for setting the maximum number of concurrent threads and for setting the maximum
allowable queue size for the database connection. These worker properties are not pooled at the Net-
work level, as with the NiagaraNetwork driver, each database driver has its own thread pool setting.
The following two parameters apply to Worker properties:
• Max Threads
This value allows you to specify the maximum number of concurrently working threads. The
default value is one thread. Each thread uses one JDBC Connection to communicate with the
database, so there are as many connections created as there are threads.
• Max Queue Size
This value allows you to specify the maximum queue size supported for Rdbms actions specific
to the associated database driver (i.e. exports, imports). The default Max Queue Size is 1000.
• Export Mode
This property allows you to specify how histories will be exported into the specified database. The
two possible options are:
• By History Id
This choice specifies that histories are exported as one table per History Id. This is the default
value setting.
• By History Type
This choice specifies that histories are exported as one table per History Type. This option may
make the data easier to query once it has been exported.
NiagaraAX-3.x
2–3
NiagaraAX-3.x RdbmsNetwork Driver Guide
RdbmsNetwork Device Manager View Chapter 2 – About the RdbmsNetwork
About the RdbmsNetwork device components and extensions October 1, 2008
• Points
This component is available starting in NiagaraAX-3.4 and is a child of all Rdbms driver devices. The
"Rdbms Point Device Extension" provides point import capability for the various relational database
drivers using methods and views that are similar to other proxy point driver views. Using this fea-
ture, you can represent relational database cell values as proxy points. See “Using the Rdbms Point
Device Extension”, and "About the Points Extension" in the NiagaraAX Drivers Guide.
• Sql Scheme Enabled
This property has true and false (default) options that allow you to specify that Sql Scheme be
enabled. This property must be set to true in order for the Rdbms Point Device Extension to work.
• Database Name
The value of this property specifies the name of the database that you are connecting to. For the Or-
acleDatabase device the "Service Name" property identifies the database and for SqlServerDatabase
device the "Instance Name" property identifies the database.
• Port
The value of this property specifies the port number to use when connecting with the database. De-
fault values are:
• Db2Database - Port 6789
• HsqlDbDatabase - no port is specified because this rdb is for local database use only.
• MySQLDatabase - Port 3306
• OracleDatabase - Port 1521
• SqlServerDatabase - Port 1433
• Histories
This is the History Device Extension, which is described in the NiagaraAX Drivers Guide. This
extension is not available on the HsqlDbDatabase device since this database may not be used to
import or export histories. Also see "About the Histories Extension in the NiagaraAX Drivers
Guide.
In addition to the standard views (property sheet, wire sheet, slot sheet, and others) the RdbmsNetwork
also uses the Device Manager view. The Device Manager view has New and Edit dialog boxes that are
used to add, configure, and monitor RdbmsNetwork drivers similar to the way other network drivers are
used.
Individual RDBMS drivers have some 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
features are similar among all RDBMS driver devices.
NiagaraAX-3.x
2–4
NiagaraAX-3.x RdbmsNetwork Driver Guide
Chapter 2 – About the RdbmsNetwork Types of RdbmsNetwork Driver Devices
October 1, 2008 About the RdbmsNetwork device components and extensions
• HsqlDbDatabase
The NiagaraAX rdbHsqlDb module 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, re-
fer to: http://hsqldb.org/
• MySQLDatabase
The NiagaraAX rdbMySQL module supports the use of data from MySQL databases. MySQL is a
Sun Microsystems relational database management system (RDBMS) that requires a GPL or propri-
etary license. In order to use MySQL, you must also install the JDBC driver for MySQL. It is available
for download from: http://dev.mysql.com
• OracleDatabase
The NiagaraAX rdbOracle module supports the use of data from Oracle databases, version 9i. Ora-
cle is an Oracle Corporation relational database management system (RDBMS) that requires a pro-
prietary license. For more information about Oracle, refer to: http://www.oracle.com/
database/index.html
• SqlServerDatabase
The NiagaraAX rdbSqlServer module supports the use of data from Microsoft SQL Server database
versions: SqlServer 2000 and SqlServer 2005. SQL Server is a Microsoft relational database manage-
ment system (RDBMS) that requires a proprietary license. For more information about Microsoft
SQL Server, refer to: http://www.microsoft.com/sql/default.mspx
NiagaraAX-3.x
2–5
NiagaraAX-3.x RdbmsNetwork Driver Guide
About the Rdbms Point Device Extension Chapter 2 – About the RdbmsNetwork
Characteristics of the Rdbms Point Device Extension October 1, 2008
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 Rdbms Point
Query Manager view. Rdbms Points are always organized under their parent Rdbms Point Query in the
nav tree and are also displayed in the Database pane of the Rdbms Point Query Manager view.
NiagaraAX-3.x
2–6
NiagaraAX-3.x RdbmsNetwork Driver Guide
Chapter 2 – About the RdbmsNetwork About the Rdbms Point Device Extension
October 1, 2008 About the Rdbms Point Device Ext Manager View
Figure 2-15 Dialog Boxes for Adding New Rdbms Point Queries to the Rdbms Point Device Ext Manager
view
NiagaraAX-3.x
2–7
NiagaraAX-3.x RdbmsNetwork Driver Guide
About the Rdbms Point Device Extension Chapter 2 – About the RdbmsNetwork
About the Rdbms Point Query October 1, 2008
Figure 2-16 Example Rdbms Point Device Extension Property Sheet View
Figure 2-17 Adding a key column field from the Slot Sheet view
An example situation where a single column cannot uniquely identify each row in a table might be
a table of fan motor types where there is a column for "manufacturer", "model", and "maximum
speed". In this case, in order to identify each row you need to look at both the manufacturer and the
NiagaraAX-3.x
2–8
NiagaraAX-3.x RdbmsNetwork Driver Guide
Chapter 2 – About the RdbmsNetwork About the Rdbms Point Device Extension
October 1, 2008 Types of Rdbms Point Query Properties
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.
Figure 2-18 Example Rdbms Point Device Ext used with SqlServer database
The Rdbms Point Query component properties are described in the following list:
• Status
This is a read-only indication of the component's state.
• Fault Cause
This is a read-only indication of the reason for a fault.
• Enabled
This property allows you to enable (true) or disable (false) the execution of the query associated
with this component.
• Update Frequency
This value dictates how often the query is automatically executed.
• Last Update
This value indicates the last time that the query was executed.
• Sql
This property provides a field (one of several available) for viewing and editing the query statement.
The query provides the criteria for database point discoveries initiated from the Rdbms Point Query
Manager View and other views.
Note: The SQL field on is actually a BFormat. This means that additional syntax can be added to
the SQL string that will be processed before the SQL is sent to the database.
• Key Column1
It often (but not always) defines the primary key. Use this property together with Key Column2, if
necessary, to establish the unique "composite key". See “About Key Columns and Primary Keys” on
page 2-8.
• Key Column2
Use this field if Key Column1 is not enough to establish a unique Key for the imported data. See
“About Key Columns and Primary Keys” on page 2-8.
NiagaraAX-3.x
2–9
NiagaraAX-3.x RdbmsNetwork Driver Guide
About the Rdbms Point Device Extension Chapter 2 – About the RdbmsNetwork
About the Rdbms Query View October 1, 2008
• Query Pane
This top pane is a text editor field that allows you to type a query directly into the field. Any "saved"
changes that you make in this field are also reflected in the Sql field of the Rdbms Point Query com-
ponent. Saved changes in the Rdbms Point Query component property sheet are also reflected here.
• Query Results Pane
This pane displays any data returned by the query (as typed in the Query Pane) any time that you
click the Run button.
• Run button
This button executes the query (as typed in the Query Pane) whenever it is clicked.
• Save button
This button saves the query (as typed in the Query Pane).
Caution If you change (or refresh) the view without clicking the Save button, any unsaved changes are lost. No
warning is given.
• Discovered Pane
This is the top pane in view. It displays all the results of the "Discovery" action that is executed when
the Discover button is clicked. Discovered points are presented in the top "Discovered" pane and
may be added to a "Database" pane for inclusion under the "Points" node of the appropriate Rdbm-
sNetwork database. Discovered points represent the results of the Rdbms Point Query execution. In
fact, the results from the data in the Discovered pane should match the data presented in the Query
Results pane of the Rdbms Query View. An example of this is shown in the following illustration.
• Discover button
This button executes the query that is saved as a the value of the Rdbms Point Query "Sql" property.
Only data points that meet the parameters of the query are displayed in the Discovered pane. As with
the standard Point Manager view, points that appear in the Discovered pane may be added to the
Database pane using the Add or Match buttons.
NiagaraAX-3.x
2–10
NiagaraAX-3.x RdbmsNetwork Driver Guide
Chapter 2 – About the RdbmsNetwork About Orion
October 1, 2008 About the Rdbms Query View
About Orion
Available starting in NiagaraAX-3.4, 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 Niagara objects. As a new mapping architecture for Niagara components,
Object-Relational Mapping does not replace the "config.bog" (station) file but provides for the creation
of a new Niagara "space" (the Orion space) that is stored outside the station database file (like histories,
files, and modules). This new functionality includes a means for alternative and multiple system
hierarchy displays that can be used for data presentation, system identification, and navigation.
The Orion service has a Status, Fault Cause, and Enabled properties, as shown in Figure 2-24.
This service allows a station and its applications to use a local relational database running in control-
lers (including embedded JACEs) to manage and display distributed-system (or distributed-applica-
tion) information. This managed and configurable information includes certain types of Niagara
component data that are well suited for the relational model.
• BIOrionApp
this is an installable application that has a set of Orion object types that allow you to manage data in
the Orion database.
• BOrionSpace
this is the component space for storing Orion objects. Other types of “space” include "History",
"File", and "Virtual" space. Figure 2-25 shows an example ORD using the orion space.
NiagaraAX-3.x
2–11
NiagaraAX-3.x RdbmsNetwork Driver Guide
About Orion Chapter 2 – About the RdbmsNetwork
About the Dynamic Table October 1, 2008
• BOrionObject
this is a common subclass for all objects stored in the Orion database. It represents an object asso-
ciated with Orion that also knows what database it is associated with.
• OrionSession
this is a CRUD (Create, Read, Update and Delete) interface for interacting with the Orion Database
and managing object persistence
You can drag a DynamicTable component from the orion palette to a location in your station and then
configure the component to display data from either an application that is using relational data or directly
from a relational database, as illustrated in Figure 2-27.
• Icon
This property allows you to designate a graphic icon to associate with the Dynamic Table.
• Row Type
This property specifies the row in terms of module and type (module:type). You can use the Row
Type option list in the Dynamic Table Config view to set the row information in this field (see
Figure 2-29).
NiagaraAX-3.x
2–12
NiagaraAX-3.x RdbmsNetwork Driver Guide
Chapter 2 – About the RdbmsNetwork About Orion
October 1, 2008 Types of Dynamic Table views
Figure 2-29 Selecting a row type in the Dynamic Table Config view
• Db Ord
This property allows you to specify an ord path to the relational database. Either this field or the App
Ord field (but not both) are required for linking the DynamicTable to a database. With the Orion
service installed, you can use the Orion chooser to choose the database under the Orion node, as
shown in Figure 2-30.
• App Ord
This property allows you to specify an ord path to an application. Either this field or the Db Ord field
(but not both) are required for linking the DynamicTable to a database.
NiagaraAX-3.x
2–13
NiagaraAX-3.x RdbmsNetwork Driver Guide
About Orion Chapter 2 – About the RdbmsNetwork
Types of Dynamic Table views October 1, 2008
NiagaraAX-3.x
2–14
NiagaraAX-3.x RdbmsNetwork Driver Guide
CHAPTER 3
Common RdbmsNetwork tasks
The following main sections provide information related to some of the common uses of the
RdbmsNetwork:
• Prerequisites
• Creating Rdbms proxy points
• Using an Rdbms for NiagaraAX alarm database
• Importing and exporting data using the RdbmsNetwork
For a list of related articles, see: About the NiagaraAX RdbmsNetwork.
Prerequisites
The following list includes the prerequisites for successfully installing and using the RdbmsNetwork
driver and specific supported rdb database types:
• NiagaraAX license feature for the appropriate Rdbms database. See “Prerequisites” on page 3-1.
• RdbmsNetwork installed in the station (under the "Drivers" node). See “Installing the RdbmsNet-
work driver and rdbDatabase device” on page 1-2.
• RdbmsNetwork database device installed under the RdbmsNetwork. See “Installing the Rdbm-
sNetwork driver and rdbDatabase device” on page 1-2.
• IP Network connection to the database host
• User Name and Password for database login
• Appropriate rights for required data access
In addition, there may be specific database-related items that you need to know. For example, if you are
trying to connect to a "named instance" of a database, you may need to know the name of the database
instance. Also, if the the database is using a non-default port number, you need to know the port number
so you can configure your RdbmsNetwork database device correctly.
NiagaraAX-3.x
3–1
NiagaraAX-3.x RdbmsNetwork Driver Guide
Creating Rdbms proxy points Chapter 3 – Common RdbmsNetwork tasks
October 1, 2008
NiagaraAX-3.x
3–2
NiagaraAX-3.x RdbmsNetwork Driver Guide
Chapter 3 – Common RdbmsNetwork tasks Creating Rdbms proxy points
October 1, 2008
Step 2 At the bottom of the view, click the Add button. The Add dialog box appears, with all selected points in
the top pane of the dialog box.
Step 3 In the Add dialog box, edit the following properties, as desired:
• Name
Individually edit the Name property, if desired, by selecting a single point and typing in this field.
This is the display name of the proxy point, when added.
• Type
Individually edit (or batch-edit) this property for all points in the top pane, as desired. Once the Point
type is designated, it cannot be changed without deleting and re-adding the point.
• Value Column
Individually edit (or batch-edit) this property for all points in the top pane, as desired. The value col-
umn is the table column that holds the value that you want the proxy point to display.
Step 4 Click the OK button. The points are added to the Database pane and appear in the nav tree.
Example Rdbms implementation
Note: The following is a hypothetical example to illustrate 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. In order to graphically display updated information over the Internet, they use the NiagaraAX
RdbmsNetwork and the Point Device Extension, as illustrated in the following list of screen captures:
• Each store exports transaction histories from its JACE to a central SqlServer database using the Sql
Server History Device Ext and the History Export Manager view, as shown in Figure 3-1:
• For each store, an AXSupervisor station creates proxy points for each fuel type, by creating and con-
figuring an Rdbms Point Query for each fuel type, shown in Figure 3-2.
• An Sql query for total fuel sold as of the latest update is shown below, scheduled to update every 15
minutes. This query, shown in Figure 3-3, provides a total that is updated every 15 minutes, along
with the time of the update.
Note: In this example, the following Sql parameters are optional:
– “1 AS myKey”: this creates a new column as a key column and is not required
– “1 AS Total”, “AS Time”, “AS Status”: these create titles for there respective columns. If
these optional parameters are not used, columns are titled “column1”, “column2”,
“column3”, respectively.
NiagaraAX-3.x
3–3
NiagaraAX-3.x RdbmsNetwork Driver Guide
Using an Rdbms for NiagaraAX alarm database Chapter 3 – Common RdbmsNetwork tasks
October 1, 2008
• Data is "Discovered" and "Added" under the Rdbms Point Device Extension node, as shown below:
• 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.
NiagaraAX-3.x
3–4
NiagaraAX-3.x RdbmsNetwork Driver Guide
Chapter 3 – Common RdbmsNetwork tasks Importing and exporting data using the RdbmsNetwork
October 1, 2008
Step 5 In the rdbAlarmService property sheet, select the desired rdbms database device type from the Driver
option list.
Note: Only those Rdbms database devices that are located under the station’s RdbmsNetwork node appear as
options in the list.
Step 6 Click the Save button at the bottom of the view.
Once you complete this final step, the new RdbAlarmService is available for use.
NiagaraAX-3.x
3–5
NiagaraAX-3.x RdbmsNetwork Driver Guide
Importing and exporting data using the RdbmsNetwork Chapter 3 – Common RdbmsNetwork tasks
October 1, 2008
The new history export descriptor(s) appears in the Database (lower) pane.
Step 6 Initiate an export action by doing any one of the following:
• Select one or more history descriptors in the database pane and click the Archive button.
• Right-click on a single history descriptor in the database pane and select Actions > Execute.
• Using the Daily or Interval settings, as set in the New or Edit dialog box, allow the export to occur,
as scheduled.
The status and time of the last export action is displayed in the Database pane, “Status” and “Last Success”
columns, respectively. Also, each export descriptor appears under the rdbmsDatabase >
Histories node in the nav tree.
NiagaraAX-3.x
3–6
NiagaraAX-3.x RdbmsNetwork Driver Guide
Chapter 3 – Common RdbmsNetwork tasks Importing and exporting data using the RdbmsNetwork
October 1, 2008
• irregular
This option does not specify a particular frequency for imports.
• regular
This option allows you to set an import action frequency in terms of hours, minutes, and sec-
onds.
• Value Facets
This property allows you to set units for the “Value Column” in the imported table.
• Time Zone
Use this property to set the desired import-location time zone.
• Rdb Table Name
Type in the name or click on the search and replace icon to use the Batch Search and Re-
place dialog box to redefine the table name on import.
• Rdb Catalog Name
Type in the name or click on the search and replace icon to use the Batch Search and Re-
place dialog box to redefine the catalog name on import.
• Rdb Schema Name
Type in the name or click on the search and replace icon to use the Batch Search and Re-
place dialog box to redefine the schema name on import.
• Timestamp Column
Specify the Timestamp column for the imported data. If you did a Discover, then the table columns
are displayed in the option list for you to choose from. Otherwise, type in the column name in the
text field.
• Value Column
Specify the Value column for the imported data. If you did a Discover, then the table columns are
displayed in the option list for you to choose from. Otherwise, type in the column name in the text
field.
• Status Column
Select or clear the option box to specify if a status column is included in the imported data or not. If
the None box is cleared, then specify the status column for the imported data. If you did a Discover,
then the table columns are displayed in the option list for you to choose from. Otherwise, type in the
column name in the text field.
• Query Predicate
This field allows you to insert a query predicate to filter the records that are imported. For example,
you could type in “where Value > 100” to import only those records that have a “Value” that is
greater than 100. Or, you could type in “where Value between 1 and 100” to import those
records with Values between 1 and 100.
• Full Import On Execute
Select Enabled to import the full database (up to the specified limit) on each successive import ac-
tion. Select Disabled to import (and append) only the new data on each successive import action.
After clicking the OK button, the new history import descriptor(s) appears in the Database (lower) pane.
Step 7 Initiate an import action by doing one of the following:
• Select one or more history descriptors in the database pane and click the Archive button.
• Right-click on a single history descriptor in the database pane and select Actions > Execute.
• Using the Daily or Interval settings, as set in the New or Edit dialog box, allow the import to occur,
as scheduled.
The status and time of the last import action is displayed in the Database pane, “Status” and “Last
Success” columns, respectively. In addition, the imported histories appear in the nav tree under the
History node, organized by device .
NiagaraAX-3.x
3–7
NiagaraAX-3.x RdbmsNetwork Driver Guide
Importing and exporting data using the RdbmsNetwork Chapter 3 – Common RdbmsNetwork tasks
October 1, 2008
NiagaraAX-3.x
3–8
NiagaraAX-3.x RdbmsNetwork Driver Guide
CHAPTER 4
Component Guides
These Component Guides provide summary information about the Rdbms components.
NiagaraAX-3.x
4–1
NiagaraAX-3.x RdbmsNetwork Driver Guide
Components in rdbDb2 module Chapter 4 – Component Guides
October 1, 2008
NiagaraAX-3.x
4–2
NiagaraAX-3.x RdbmsNetwork Driver Guide
Chapter 4 – Component Guides Components in orion module
October 1, 2008
orion-DynamicTable
Available starting in NiagaraAX-3.4, this component provides a means for configuring, retrieving and
displaying data from relational database tables or from other application services. The Dynamic Table has
a configuration view (Dynamic Table Config) and a table view (Dynamic Table). It is available in the Orion
palette. “About Orion” on page 2-11.
orion-FoxOrionDatabase
Available starting in NiagaraAX-3.4, this component represents the Orion database. It appears in the
nav tree directly under the OrionRoot node; it contains the individual Orion Module Types. “About
Orion” on page 2-11.
orion-OrionModule
Available starting in NiagaraAX-3.4, the OrionModule represents a module with types registered in
an Orion database. See also, “About Orion” on page 2-11.
orion-OrionRoot
Available starting in NiagaraAX-3.4, this is the root component of an Orion component space. It
appears in the nav tree directly under the station when the Orion service is configured; it contains the
individual databases that are managed by the OrionService. See also, “About Orion” on page 2-11.
orion-OrionService
Available starting in NiagaraAX-3.4, this is the Niagara service that enables the Orion database in a
station. This service allows a station and its applications to use a local relational database running in a
controller (including embedded JACEs) to manage and display distributed-system (or distributed-appli-
cation) information. This managed and configurable information includes certain types of Niagara
component data that are well suited for the relational model. It is available in the Orion palette. Also see
“About Orion” on page 2-11.
orion-OrionType
Available starting in NiagaraAX-3.4, this component is a wrapper for Orion Types, which display in
the Orion Type Summary view and Orion Type Table view. “About Orion” on page 2-11.
NiagaraAX-3.x
4–3
NiagaraAX-3.x RdbmsNetwork Driver Guide
Components in orion module Chapter 4 – Component Guides
October 1, 2008
NiagaraAX-3.x
4–4
NiagaraAX-3.x RdbmsNetwork Driver Guide
CHAPTER 5
Plugin Guides
There are many ways to view plugins (views). One way is directly in the tree. In addition, you can right-
click on an item and select one of its views. Plugins provide views of components.
In Workbench, access the following summary descriptions on any plugin by selecting Help > On View
(F1) from the menu, or pressing F1 while the view is open.
NiagaraAX-3.x
5–1
NiagaraAX-3.x RdbmsNetwork Driver Guide
Plugins in rdb module Chapter 5 – Plugin Guides
October 1, 2008
NiagaraAX-3.x
5–2
NiagaraAX-3.x RdbmsNetwork Driver Guide
Chapter 5 – Plugin Guides Plugins in rdbDb2 module
October 1, 2008
rdb-RdbmsHistoryImportManager
The RdbmsHistoryImportManager allows you to import records from an Rdbms database as
Niagara histories. It is a view on the Histories extension of an Rdbms database, for example
Db2HistoryDeviceExt, OracleHistoryDeviceExt, and SqlServerHistoryDeviceExt.
rdb-Rdbms Point Device Ext Manager
The Rdbms Point Device Ext Manager View is the default view of the Rdbms Point Device Extension and
the only "manager" view for the Rdbms Points Device Extension. This view is used for all Rdbms Device
types. It has a single Database pane that displays any Rdbms Point Queries that are present.
Also see, “About the Rdbms Point Device Ext Manager View”.
rdb-RdbmsPointQueryManager
The Rdbms Point Query Manager is the default view for the Rdbms Point Query component under
the Rdbms Point Device Extension. It works in a way that is similar to the standard Point Manager
view and, like that view, it has a Discovered and Database pane as well as similar buttons at the bottom
of the view.
Also see “About the Rdbms Point Device Extension” on page 2-6.
rdb-RdbmsQueryView
This is a view on the Rdbms Point Query component. It is typically a view for working with queries as
you are developing them because query executes immediately and the lower pane displays the results as
soon as you click the Run button (or with some delay, depending on database size and network
connection speed). If there are errors in the query, an error dialog box displays an error message.
Also see “About the Rdbms Point Device Extension” on page 2-6.
rdb-RdbmsSessionView
The RdbmsSessionView provides a view for a session to a relational database.
NiagaraAX-3.x
5–3
NiagaraAX-3.x RdbmsNetwork Driver Guide
Plugins in rdbSqlServer module Chapter 5 – Plugin Guides
October 1, 2008
Also see, “Importing and exporting data using the RdbmsNetwork” on page 3-5.
NiagaraAX-3.x
5–4
NiagaraAX-3.x RdbmsNetwork Driver Guide