why does view history on sql agent jobs sometimes show more than 1 line for a job step?

db042190 1,516 Reputation points
2022-05-12T13:11:28.183+00:00

Hi we run 2014 enterprise. I am wondering why view history on sql agent jobs in ssms sometimes shows 2 or 3 lines for the same job step.

201515-picturemultiplestepsinagenthistory.png

SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
12,696 questions
{count} votes

7 answers

Sort by: Most helpful
  1. Seeya Xi-MSFT 16,436 Reputation points
    2022-05-13T07:49:34.193+00:00

    Hi @db042190 ,

    Welcome to Microsoft Q&A!
    The default message that is saved in the job history is 1024 characters. In most cases this may be enough, but if you have a long running process you may need to store more than 1024 characters.

    Best regards,
    Seeya


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

  2. db042190 1,516 Reputation points
    2022-05-18T12:04:44.35+00:00

    thx seeya. why would the duration impact the size of the message?

    erland, i'm going back to look at these but as i recall there was nothing useful or out of the ordinary in the additional entries.

    0 comments No comments

  3. Tom Phillips 17,716 Reputation points
    2022-05-18T12:40:39.91+00:00

    Are you sure you are looking at the same job name?


  4. db042190 1,516 Reputation points
    2022-05-18T16:13:05.463+00:00

    hi all. the job step that has 3 entries has the following messages...and was a long running step relatively speaking at close to 2hrs...

    Executed as user: xxxx. The step succeeded.
    started...finished....elapsed...
    Microsoft (R) SQL Server Execute Package Utility Version 12.0.6433.1 for 64-bit Copyright (C) Microsoft Corporation. All rights reserved. Started: 6:14:49 AM DTExec: The package execution returned DTSER_SUCCESS (0).

    a step that has 2 entries from that day and ran close to 4 minutes had the following...

    Executed as user: xxxx. The step succeeded.
    Microsoft (R) SQL Server Execute Package Utility Version 12.0.6433.1 for 64-bit Copyright (C) Microsoft Corporation. All rights reserved. Started: 8:28:02 AM DTExec: The package execution returned DTSER_SUCCESS (0). Started: 8:28:02 AM Finished: 8:31:51 AM Elapsed: 229.094 seconds

    a step that has one entry and ran for 18 seconds looked like this

    Executed as user: xxxx. Microsoft (R) SQL Server Execute Package Utility Version 12.0.6433.1 for 64-bit Copyright (C) Microsoft Corporation. All rights reserved. Started: 8:31:53 AM DTExec: The package execution returned DTSER_SUCCESS (0). Started: 8:31:53 AM Finished: 8:32:08 AM Elapsed: 15.609 seconds. The package executed successfully. The step succeeded.


  5. Jingyang Li 5,891 Reputation points
    2022-05-18T16:58:11.403+00:00

    Can you run this query to see whether you can get more information about your job steps?
    select
    j.name ,
    s.step_id ,
    s.step_name ,
    message,
    * From msdb.dbo.sysjobs j
    INNER JOIN msdb.dbo.sysjobsteps s
    ON j.job_id = s.job_id
    INNER JOIN msdb.dbo.sysjobhistory h
    ON s.job_id = h.job_id
    AND s.step_id = h.step_id
    AND h.step_id <> 0
    --where j.name = 'yourjobname'

    0 comments No comments