Flow designer - jdbc step - exec stored procedure throws error

Faizan9
Giga Expert

Hi

Looking for a solution/ answer for this scenario.

I have a jdbc step on flow designer where i'm putting in a command to execute a stored procedure on SQL server database as below:

Exec dbo.stored_procedure_name @param1 = 'x', @param2 = 'y'

When i test the jdbc step i get this error message: Given SQL statement is not allowed to be executed at this time.

I have put 'exec' as an allowed value on the mid server property: mid.property.jdbc_operations value: exec,select,update,insert,delete,show,create,describe

I'm wondering if its not supported by ServiceNow.

There's a stored procedure call on jdbc activity in worklow however.

Any help on this is appreciated.

 

14 REPLIES 14

Malathi Vinoth
Tera Contributor

Hey all,

 

How to call stored procedure through JDBC custom activity or in script

Has anyone tried this? I am looking for something similar. I know gs.sql is no longer an option but what's the alternative? 

Hello,
If you are still wondering the issue is because you need to go to Mid Server > Properties and add the exec option there and not in sys_properties.

You need to restart the Mid Server for this to work.

That worked for me.

DK44
Tera Expert

Hello,
If you are still wondering the issue is because you need to go to Mid Server > Properties and add the exec option there and not in sys_properties.

You need to restart the Mid Server for this to work.

That worked for me.

maryc
Tera Contributor

Can you send me the screen shot as to how to set the properties?