View the Database Security Login topic on how to setup security logins and access writes to create, open, and read and write to the database.
Go to Configure-Options-History and Enable History Date Format.
How to setup alarm limits in real-time tag configuration.
How to setup alarm logging to SQL Server, Oracle, Access, and mySQL.
Use the OPC Systems component in your Visual Studio application to programmatically modify alarm logging groups. Refer to the FormConfigureAlarmLogging Form in the WinForm Example Code example for an example and how to add and modify alarm logging groups.
Refer to the Programmatic Access Alarm Logging Groups section in the Programmatic Interface – .NET Programmatic Configuration topic for all of the method syntax.
To open a new window for Alarm Logging modification, select Configure-Alarm Logging or Alt-C-A.
Select a Windows Service to modify, the node with the green arrow is the current Service being modified. Refer to Selecting Service for more information on selecting an OAS Service.
In order to log alarms to a database you must first define the Tag Alarm Limits as described in Configure Tags of this Quick Start section.
For a complete list of all Alarm Logging properties refer to the OAS Configuration – Alarm Logging section in this help file.
Start the Configure OAS application if it is not already running.
Select Configure-Alarm Logging.
Select the Local OAS Service by selecting the Select button or the Local node in the service tree to the left.
Note: The Configure application can be used to connect to remote systems using the network node name or IP address of the remote node the OAS Service is running on. Simply enter the IP Address or network node name of the remote OAS Service you wish to connect to and click on the Select key.
Enter the Logging Group Name of Simulation in the field in the upper right.
Check Logging Active in the Common Properties Tab.
Select the Database Tab.
Logging to SQL Server
Use the following configuration for SQL Server and SQL Server Express. The Database and Table will automatically be created for you.
The Server name may need to be adjusted from localhost to the proper Server name of the SQL Server engine you wish to log to. This Server name can be found when first bringing up the Connect dialog of the SQL Server Management Studio.
Also the login method can be with Windows Authentication or SQL Server mode. Contact your database administrator if you are unsure of what login type to use.
You can download a free version of SQL Server Express from www.microsoft.com.
Logging to Microsoft Azure
Use the SQL Server Provider and view the following guide to setup Microsoft Azure:
Logging to Oracle
If you are using Oracle you must first create the database. All other steps are the same as SQL Server except the provider should be set to Oracle. Oracle does not create the database.
If you do not have a TNSNAMES.ORA file or need to log to a remote database engine refer to the Frequently Asked Questions in this Data Logging topic.
Logging to mySQL
All steps are the same as using SQL Server except the provider should be set to mySQL.
Logging to Microsoft Access
Use the following configuration for Microsoft Access. The Database and Table will be automatically created for you.
Use the following configuration for CSV text logging:
Note: There is no historical replay to alarm windows with CSV logging.
Select the Add button to add the Alarm Logging group.
Select the Save button on the toolbar at the top.
Save the file DemoAlarmLogging.AlarmLog in the directory C:OPCSystemsDemo.
You can specify for this configuration to load automatically when the Service starts using Configure-Options which is described also in this Training Guide.
You can log alarms to SQL Server, Oracle, Access, mySQL, and CSV files based on event, continuously, time of day, or on data change.
By using the product OAS Alarm .NET this is easy to setup.
View the following for a quick tutorial on alarm logging: Videos – Alarm Logging