July 21, 2014 at 8:03 am
Hi,
I know how to export a SQL Server job's history to a file by clicking on the Export button inside the log file history viewer.
But how can I automate this process.
So for example to export history data every 2 days into my file automatically when the job finishes running.
Thanks.
July 21, 2014 at 8:18 am
you can automate the process by using msdb system tables sysjobhistory and export the data from it according to your filter and requirement.
July 21, 2014 at 8:27 am
I can export into a table using SELECT INTO but how can I export into a file using TSQL?
July 21, 2014 at 8:50 am
You could export to a file with BCP, or create a SSIS package.
July 22, 2014 at 3:05 am
Ok thanks.
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply