Jobs scheduling

greenspun.com : LUSENET : SQL Server Database Administration : One Thread

Dear Eric, I have a question about job scheduling in SQL Server 7. I need to schedule a job(or 2 separate jobs?) to run every 2 min that would execute 2 Stored Procedures(they are simple delete statements). How can I tell to SQL Server Agent not to start executing another SP before 1st finish (or vice versa: not to start 1st before 2nd finish) I appreciate any ideas. Thanks.

--Albert

-- Anonymous, November 30, 1999

Answers

Albert,

You could create a job that called the two stored procedures and schedule that job. To do this, in SQL Enterprise Manager, select Job Scheduling... from the Tools menu.

Or you could use Data Transformation Services. To do this, in SQL Enterprise Manager, click the + to open up your server, click on the + in front of Data Transformation Services, right click Local Packages and select New Package. I can't detail all the steps here, but basically you create a data connection and your two SQL tasks, then make one task dependent on the other by selecting the first, and holding down the control key while selecting the second. Then from the Workflow menu, select On Success. This will make the second task dependent on the successful completion of the first. After you have saved the package, go back to SQL Enterprise Manager, click on Local Packages, and then right click on your package in the right hand window and select Schedule Package...

Hope this helps,

Eric

-- Anonymous, December 01, 1999


Moderation questions? read the FAQ