Skip to main content
10-Marble
June 26, 2024
Solved

using SQL stored procedures in KEPServer datalogger

  • June 26, 2024
  • 1 reply
  • 1584 views

Hello community,
I started playing around with KEPServerEX recently (latest release: 6.16).

Datalogger is super simple to configure for basic purposes. Now, I am trying to do some advanced escenarios where data needs to be saved using a stored procedure. Is this possible to accomplish?

Before stored procedures, I tried using a dummy SQL view (MSSSQL) with a "INSTEAD OF INSERT" trigger in order to mock the idea to write to a single table but that SQL trigger view is not being fired through Datalogger...

 

The purpose of all this is to have a single Log Group that writes to different tables based on a condition that I define. A simple example that passes information to a SP would be:

@action=10, @p1="Hello" -> would write to table "Table1".

@action=15, @p1="World" -> would write to table "Table2".

 

Cheers,

Best answer by cmorehead

@jp_01_11259393 

 

Unfortunately, the functionality you have described cannot be achieved through the use of DataLogger.  Here is a link to the page in the manual that covers all the possible logging conditions:

 

https://ptc-p-001.sitecorecontenthub.cloud/api/public/content/6dc53e6102c64f80aa2ab18e648ea56f#page=12

 

As it stands, you can only log to a new table when log group is enabled. This functionality is not configurable to a condition that you define. You would need to disable and re-enable the log group to obtain the new table.

 

I recommend opening a support ticket with the Kepware Presales Team to see if they can come up with an alternative solution for you. Here is a link to mykepware login page where a ticket can be submitted:

 

Log In | My Kepware

 

Thanks,

*Chris

1 reply

cmorehead13-AquamarineAnswer
13-Aquamarine
June 27, 2024

@jp_01_11259393 

 

Unfortunately, the functionality you have described cannot be achieved through the use of DataLogger.  Here is a link to the page in the manual that covers all the possible logging conditions:

 

https://ptc-p-001.sitecorecontenthub.cloud/api/public/content/6dc53e6102c64f80aa2ab18e648ea56f#page=12

 

As it stands, you can only log to a new table when log group is enabled. This functionality is not configurable to a condition that you define. You would need to disable and re-enable the log group to obtain the new table.

 

I recommend opening a support ticket with the Kepware Presales Team to see if they can come up with an alternative solution for you. Here is a link to mykepware login page where a ticket can be submitted:

 

Log In | My Kepware

 

Thanks,

*Chris