SQL Job Task not work but Exec Stored Procedure (manually) work correctly

  • Hi friends

    I have a dilema!!!

    In SQL 2008 R2, I have a job that execute a stored procedure. It works correctly without problems.

    But, when I try to run the same job in SQL 2017 Agent, it's not work!!! But, if I try to execute in the query windows it works!!!

    The error message that appears in the SQL Agent Job history is:

    The conversion of a varchar data type to a datetime data type resulted in an out-of-range value. [SQLSTATE 22007] (Error 242)

    What can I do?

    Thanks for your support!!!

  • Usually the error is due to issues with date formats. Compare the regional settings, DST settings on the servers and also check the default language for the agent account.

    Sue

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

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