October 23, 2003 at 10:49 am
I was wondering how I would go about exiting a piece of code in a job that will return a value that will fail the job? Is this possible?
October 23, 2003 at 12:52 pm
What type of step? I think a non-zero exit code will do it.
Steve Jones
http://www.sqlservercentral.com/columnists/sjones
The Best of SQL Server Central.com 2002 - http://www.sqlservercentral.com/bestof/
October 23, 2003 at 1:44 pm
What I am trying to do is map a drive using xp_cmdshell, for any reason if the drive does not get mapped it exits the step and does not continue on. This does not actually make the job fail. How can I actually make the job's run_status say failed?
October 24, 2003 at 6:15 am
in vbscript you can set main = DTSTaskExecResult_Success or DTSTaskExecResult_Failure
October 24, 2003 at 9:16 am
The best way I have found is to use RAISERROR
HTH
* Noel
October 24, 2003 at 9:27 am
Thanks Raiserror did what I needed.
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy