Friday, February 17, 2012

Dependency based scheduling

Hi,
I am scheduling a .bat at 9.00 am to load a text file in a table A in SQL Server 2000 database. If this load is successful, I want to trigger another .bat file to execute a store proc.

Can I do this dependency based scheduling in SQL Server Scheduler and if so, can you give me details (references, books) as to how it can be done?

Thanks in advance
ShekI'd create a job with a couple of job steps. SQL server Books Online has info on sp_add_job and sp_add_jobstep. You can use XP_CMDSHELL to execute the bat files within the job steps.|||The job scheduler supports multipule tasks within one job. You can specify what action should be taken based on the success or failure of a task.

I susspect you could work through this just by setting up a test job in the job scheduler. Books Online, SQL Server Help, has a good writeup on this.

Look up "jobs" in the index. Also within jobs scan down to the sub topic of steps.

No comments:

Post a Comment