The default message that is saved in the SQL Agent job history is 1024 characters.
Let’s take for example we are running DBCC CHECKDB commands for several databases.
This command provides a lot of output data unless you use the WITH NO_INFOMSGS option.
If you are not using the NO_INFOMSGS option the command output fills up the 1024 characters quite quickly and you can only see the part of the output in the job history message.
To allow additional data to be logged we need to enable both the “Log to table” and “Include step output in history” settings for each job step in the job.
After we make these changes and run this again if we look at the job history you will see the same short message.
In order to see the additional logged information we need to use this stored procedure sp_help_jobsteplog
or we could query the msdb.dbo.sysjobstepslog table directly.
EXEC dbo.sp_help_jobsteplog @job_name = N’TestJob’ ;