Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Sent output

Author  Topic 

GRAYWOLF
Posting Yak Master

106 Posts

Posted - 2009-01-28 : 06:30:35
I have a procedure that runs restores, tests them and then deletes them. When I run the code from the Management Studio window it produces 2 sets of output (Results, Messages).

When I run it as a job the log only captures a small part of the output.

How can I put this output into an email from the scheduled job?

---------------------------

Working until "the morning sun sets the midnight sky on fire"!

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2009-01-28 : 06:52:57
make use of sp_send_dbmail or xp_sendmail procedures for sending email.
Go to Top of Page

GRAYWOLF
Posting Yak Master

106 Posts

Posted - 2009-01-28 : 07:01:32
How do I tell it what to send? I would like both sets of information.

It is producing errors while running as a scheduled job that aren't there as a manually ran script. The View History field is no where large enough to provide what I need to know.

---------------------------

Working until "the morning sun sets the midnight sky on fire"!
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2009-01-28 : 07:06:55
why do you want to send messages also?
Go to Top of Page

GRAYWOLF
Posting Yak Master

106 Posts

Posted - 2009-01-28 : 13:30:43
Sometimes the restore doesn't start, so it never makes it to results. I need to know so I can make the necessary adjustments to the code.

---------------------------

Working until "the morning sun sets the midnight sky on fire"!
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2009-01-29 : 03:12:23
then put messages onto a varchar output parameter and return through it.
Go to Top of Page
   

- Advertisement -