![]()
|
Importing Sql databases
You can use the Rdbms History Import component to import SQL data in order to create a NiagaraAX history based on remote SQL data. This history file import descriptor resides under the Sql Server History Device Extension of a SqlServerDatabase “device” on a RdbmsNetwork. You use the Rdbms History Import Manager view to Discover and Add import descriptors.
This import descriptor has properties “common” among all history import descriptors, such as Name, History Id, and so on. See “History Import properties” on page 141. See “Properties of history file import descriptors” in the NiagaraAX User Guide for other configuration properties.
Import Sql data
You must have administrative access to the SQL database (username and password) and the hosting server before you can complete the following procedure.
- In the NiagaraAX Workbench nav tree, under your station database (Config node), click on the Drivers node to display the network devices (if any).
- In NiagaraAX Workbench palette side bar, open the rdbSqlServer palette and copy and paste the RdbmsNetwork component under the Drivers node in the nav tree, as shown in Figure 5-6.
Figure 5-6 Adding the Rdbms Network driver![]()
- In NiagaraAX Workbench nav bar, double-click on the RdbmsNetwork node.
- In the Device Manager view, click the New button at the bottom of the view.
Figure 5-7 Adding the Sql Server device![]()
- In the New dialog box, from the Type to Add drop-down list, choose Sql Server Database. and click the Ok button.
- In the New Sql dialog box, edit the following properties and click the Ok button when complete.
Figure 5-8 SqlServerDatabase in the nav tree![]()
- In the NiagaraAX Workbench nav tree, under the RdbmsNetwork node, double-click on the SqlServerDatabase device node.
Figure 5-9 SqlServerDatabase property sheet view![]()
- In the SqlServerDatabase property sheet view, set all the fields according to the host server and database that you are targeting and click the Save button.
- In the nav tree, right-click on the Sql Server History Device Ext and select Views > Rdbms History Import Manager from the popup menu.
- In the Rdbms History Import Manager view, click the Discover button.
Figure 5-10 Discovered points![]()
- In the Rdbms History Import Manager view, select the desired database table to import and click the Add button at the bottom of the view.
Note: You can add multiple tables by selecting more than one entry in the Discovered (top) pane and then clicking the Add button.
- The Add dialog box displays, as shown in Figure 5-11, with fields of data that need to be reviewed and edited as necessary. The following fields are of particular importance:
- Name
The text in this field displays as the name of the import descriptor in the nav tree as well as in the descriptor’s property sheet.
- History ID
The text in this field defines the name and location of the history file that you create when importing the file.
- Execution Time
This field allows you to specify when imports are performed.
- Value Facets
Use this field to set the value facets (units) before importing the data. This defines the units that
shortBrandName will use to analyze the data.- Time Zone
- Timestamp Column, Value Column, and Index Column
IMPORTANT! These columns allow you to map the database tables columns to the corresponding history columns. These drop-down lists are automatically populated if you use the Discover process to create the import descriptor.
Figure 5-11 Rdbms Add dialog box![]()
|
|
|
|