Schedule SSIS Package containing Execute SQL Task is failing

  • Hi,

    I have a package in local server which does only a simple update to a table using Execute SQL Task. This is package runs successfully when I run it manually. But when I run it from schedule jobs, it failing.

    "The job failed. "The Job was invoked by User sa. The last step to run was step 1 (SSISTEST)."

    Can you please help me in solving it?

  • Right click the relevant SQL Agent job and View History - you should be able to get a more detailed error message there. Please post it.

    The absence of evidence is not evidence of absence.
    Martin Rees

    You can lead a horse to water, but a pencil must be lead.
    Stan Laurel

  • Just to add to that comment by Phil, sometimes you won't be able to see the real error because the log file in a job execution limits the number of characters you can see.

    If that's the case, try changing the logging to only log the errors. Also, what you can do is to run the same command that SQL Server Agent runs, just through a normal window in SSMS, so that you can see the whole error. You can do that by executing a line similar to the following:

    DECLARE @DTExec VARCHAR(500)

    SET @DTExec = 'dtexec /FILE "[Full package path]" /DECRYPT [Password] /MAXCONCURRENT " -1 " /CHECKPOINTING OFF /REPORTING E'

    EXEC xp_cmdshell @DTExec

    Also note that if you don't have your package protection set to EncryptAllWithPassword or EncryptSensitiveWithPassword, it will most likely fail when you are executing it through SQL Server or SQL Server Agent.

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply