Operator Actions in SQL Database

Hello,

I am trying to store operator actions in SQL database by assigning LOG Device in devices as SQL.

I am succeeded to log it in TEXT file as log device.
My query is.

1.How to configure SQL for this.I have created SQL Database 

2.What is the scripting part for logging in SQL ?

Or is any other way to do this..

Thanks.

  • Im not 100%, but I'm pretty sure the sql devices are really only for DBF's as there is nowhere to configure the connection string to connect to an external sql server. Using the inbuilt log functionalily is pretty limited, especially for capturing setpoint changes.

    If you want to log to an sql table, you'll need to write functions to do It for you. Ie using the functions: sqlconnect, sqlexec (or sqlset and  sqlappend, then sqlexec) and sqldisconnect

  • It is very well possible to configure a device in Citect for basic logging to SQL. Please refer to the Citect help on topics "Configuring SQL Devices" and "Object Properties - Input (Keyboard Commands".
    Here, the configuration of the device for logging is explained as well as how to use the device in cicode scripts additionally.
    Make sure you include the following fields in your device format as well as in your SQL table (as varchar columns):
    {MsgLog,32} and {FullName,15}