Get detailed output of SQL Agent job

Is there any way to extract the full text of these messages?

You can achieve it in 2 ways - Go in job step and select the Advanced tab:

a. Output to a file (<== My preferred method)

enter image description here

b. "Log to table" and "Include step output in history" (<== You need to trim msdb..sysjobhistory in long-run as the messages are stored as nvarchar(max) instead of nvarchar(1024))

enter image description here

In order to see the additional logged information you need to use this stored procedure sp_help_jobsteplog or you could query the msdb.dbo.sysjobstepslogs table directly.

More info here


You can get full text:

  1. Go to the job
  2. Right click select properties
  3. Go the job step
  4. Select step and click on edit button
  5. Select advanced. Here you can see the log path.

Now its simple follow the path.