November 13, 2010 at 7:05 pm
The main goal of this process is to hop through different servers and databases and execute this query. I have attached my script, my script works when i run through management studio and gives me the list of servers/dbs where it failed..great..but when i run through the job in the job history and the log which i have set on the step doesn't give me the same information. My goal is to get entire out whatever i see when i run from management studio to be written in the output file. Would be great if someone can assist me.Thanks in advance.
November 14, 2010 at 3:07 am
It depends where you want to see the output of the job.
Here are some options (most probably there are several more...):
1) create a table to hold the error messages and the related job information (start time or the like)
2) collect the messages in a variable and send an email at the end of the job
3) use RAISERROR or xp_logevent to write the messages to SQL Server log file and in the Windows Event Viewer.
November 15, 2010 at 9:40 am
Thanks, but this only solves part of the problem, as i mentioned in the post if i ran the exact sql in attachment runs fine but when i run through a job stops wherever it fails doesn't go to the next server/db..also i want to capture the exact log what i see from management studio..
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply