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
 SQL Server 2005 Forums
 SSIS and Import/Export (2005)
 Jobs with more than one step

Author  Topic 

ashish.johri
Starting Member

10 Posts

Posted - 2007-10-08 : 10:07:06
1. There are 2 steps in one job. Even if one is succeed then
EXECUTE @IRetval = msdb.dbo.sp_get_composite_job_info @schedule_id = 8
IF (@IRetval <> 0)
BEGIN
SET @BResult = 0 --Failure
END
ELSE
BEGIN
SET @BResult = 1 --Success
END
gives success.

Do I need to create two jobs if I need to address whether all the steps are successful?

2. If the job fails then to which table does error code and error description is populated?

Regards,
Ashish Johri

nr
SQLTeam MVY

12543 Posts

Posted - 2007-10-08 : 10:56:52
Have a look at sysjobhistory and sysjobstephistory

==========================================
Cursors are useful if you don't know sql.
DTS can be used in a similar way.
Beer is not cold and it isn't fizzy.
Go to Top of Page

rmiao
Master Smack Fu Yak Hacker

7266 Posts

Posted - 2007-10-08 : 21:59:05
Don't need separate jobs, you can check job step status.
Go to Top of Page

ashish.johri
Starting Member

10 Posts

Posted - 2007-10-09 : 11:14:34
Thanks a lot.

Regards,
Ashish Johri
Go to Top of Page
   

- Advertisement -