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)
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)
)
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:
- Go to the job
- Right click
select properties
- Go the job step
- Select
step
and click onedit
button - Select
advanced
. Here you can see the log path.
Now its simple follow the path.