Skip to main content
Nintex Community Menu Bar

Execute Stored Procedure with SQL Task Action Failing (exec msdb.dbo.sp_start_job)

  • June 25, 2019
  • 5 replies
  • 37 views

Forum|alt.badge.img+1

I am attempting this query with an Execute SQL action:

exec msdb.dbo.sp_start_job @job_name=test

And I get this error:

The execution returned an unexpected error.
The specified @job_name ('test') does not exist.

 

The same statement works when I run it using SSMS:

exec msdb.dbo.sp_start_job @job_name=test

result: Job 'test' started successfully.

 

I copied and pasted between SSMS and Nintex to be certain that I am using the exact same job name.

 

Any ideas would be appreciated. Thank you!

 

5 replies

Forum|alt.badge.img+1
  • Author
  • June 27, 2019

bump... still working on this one, any ideas?


Simon Muntz
Nintex Partner
Forum|alt.badge.img+23
  • Nintex Partner
  • June 28, 2019
Hi,
What Build of Nintex Worklfow are you using?
I have been testing passing a parameter to a stored procedure in my 2013 environment and it works as expected.
It wouldnt be the encoding of the Single Quotes that is causing the issue would it?

Forum|alt.badge.img+1
  • Author
  • July 23, 2019

I am using Nintex for SharePoint 2016 On Premesis. Still having this issue.

 

I tried without quotes at all and it still fails. The exact same string runs in SSMS with or without a single quote around the job name.

 

I'd appreciate any other thoughts you might have. Thank you!


ms7
Forum|alt.badge.img+4
  • July 26, 2019

Have you tried a basic SQL script, like:

SELECT * FROM [table];

To make sure Nintex is connecting successfully with your SQL server.


Forum|alt.badge.img+10
  • April 29, 2020
Did you fix this issue, I am getting permission issue, but works on ssms