79462190

Date: 2025-02-24 00:09:28
Score: 2
Natty:
Report link

I was having the same issue. The stored proc in itself executes but the job fails if the proc is part of job step. Finally, I managed to work around this issue by using PowerShell command in PowerShell job step:

Invoke-Sqlcmd -ServerInstance "SQLInstanceName,Port" -Database "DBName" -Query "EXEC dbo.usp_storedprocname " -AbortOnError -QueryTimeout 65535

Reasons:
  • No code block (0.5):
  • Unregistered user (0.5):
  • Low reputation (1):
Posted by: user29769580