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

 

Sure,
There you go.
Dont forget that you need to restart your Mid Server for this to work.
Screenshot 2023-01-04 224652.png

 

maryc
Tera Contributor

Thanks ...how do I pass the params to the proc?

The syntax in oracle is

Exe TAB.SPL('<param>')

 

What is the equivalent in SNOW JDBC step?

 

 

Hello,

Since Im using MSSQL I typed this in the SQL Statement:
EXEC dbo.procedureName @email = 'email@something.com';

I'm assuming that the syntax will probably be the Oracle one.

Cheers.

MattCampana
Kilo Contributor

I reset my password just to tell you, you are an incredible human being. Thank you for this!

 

To all wondering. this worked. You need to add this in your parameters in the window called 'Mid Server Properties'. You do NOT need to edit the properties XML on the box. Keep this in mind. Then, you will need to restart the box from your midserver setup screen and you'll be all set. 

KonradW
Giga Contributor

Do you have any update here? It is super frustrating that it does not work still ... it is such a basic functionality like calling the stored procedure....