Running SQL-code works but running the SQL Agent job fails.
Log:
</ImpersonationResultClass>
2018-06-29 10:00:00 Debug Impersonation result 2: True, suppress flow: True, current user: PILEN\bexec
2018-06-29 10:00:00 Debug SQL Task->Run->Task: SQL, DataProvider: DirectMSSQL
2018-06-29 10:00:00 Debug RunMSSQLJob->Retrieving Job id
2018-06-29 10:00:00 Debug GetJobId->Query for Job 'VPS Failed Account Openings'
2018-06-29 10:00:00 Debug GetJobId->Found Id '120990d0-0153-4779-adc9-613196b61e21' for Job 'VPS Failed Account Openings'
2018-06-29 10:00:00 Debug RunMSSQLJob->Job id retrieved: 120990d0-0153-4779-adc9-613196b61e21
2018-06-29 10:00:00 Debug RunMSSQLJob->Retrieving max instance
2018-06-29 10:00:00 Debug GetMaxJobInstanceId->Query: SELECT MAX(instance_id) FROM [msdb].[dbo].[sysjobhistory] WHERE job_id = 120990d0-0153-4779-adc9-613196b61e21 AND step_name IN ('(Job outcome)',('(Job Outcome)','(Auftragsergebnis)','(Sortie du travail)')
2018-06-29 10:00:00 Err GetMaxJobInstance->Failed with error: System.Data.SqlClient.SqlException (0x80131904): Incorrect syntax near ','.
at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
at System.Data.SqlClient.SqlDataReader.TryConsumeMetaData()
at System.Data.SqlClient.SqlDataReader.get_MetaData()
at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString, Boolean isInternal, Boolean forDescribeParameterEncryption)
at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, Boolean inRetry, SqlDataReader ds, Boolean describeParameterEncryptionRequest)
at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)
at System.Data.SqlClient.SqlCommand.ExecuteScalar()
at OBOKIIHBDBPMCFALPGECCIFHCDJPEDKODDGK.NFMCAMDOGBCBCKKAEOJICMPGMOLBJPKAAHOI.IOMCEHALENFPHACPMPCMCFCJGCKDCHLNFFIH(SqlConnection , String , Int32 ) in C:\sourcefiles\code\VisualCronService\Jobs\TaskProcesses\Database\SQL\apiSQL.vb:line 857
ClientConnectionId:5a20204d-c7e2-4e2d-984b-10d52cbbd75a
Error Number:102,State:1,Class:15
Edited by moderator
2018-07-03T12:20:44Z
|
Reason: Not specified