Logging Data to Relational Databases

LabVIEW 2017 Datalogging and Supervisory Control Module Help

Edition Date: March 2017

Part Number: 371618K-01

»View Product Info
Download Help (Windows Only)

You can log shared variable data, alarms, and events to the following supported relational databases: Microsoft Access, MySQL, Oracle, PostgreSQL, and SQL Server. Logging data to a supported relational database enables you to work with shared variables, alarms, and events in a database other than the Citadel database. You must be familiar working with the supported relational database before logging data to that database.

You can log to a supported relational database by using one of the following methods:

  • Log to the default relational database server. The default relational database server is the Microsoft SQL Server 2008 R2 Express, which installs with the LabVIEW Datalogging and Supervisory Control (DSC) Module. The Microsoft SQL Server 2008 R2 Express and the background services run automatically. You can monitor these services in the Services utility. The default relational database name is NIVariable_Default.
    Note  The default database is located in the C:\ProgramData\National Instruments\Tagger\nivariable_database directory.
  • Log to a preconfigured system data source name (DSN), which you first configure on your machine.
  • Log to a database by using a custom database connection string. You can enter the database connection string manually or build the database connection string by clicking the Build button on the Relational Database page.

Use the Relational Database page on the DSC Settings: Database page of the Project Library Properties dialog box to enable logging to a supported relational database.

Note  You also must enable logging for shared variables.

Use the Table Management dialog box to specify the table name for each data type that logs to the database. The DSC Module supports logging the following data types to a supported relational database: numeric, Boolean, and string. Each data type logs to a separate table. LabVIEW also logs alarms and events to a separate table. You can customize the table name for each data type that LabVIEW logs by process. For example, you can specify that data of the same data type from different processes logs to the same table or to different tables.


Not Helpful