SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 SQL Server 2000 Forums
 SQL Server Administration (2000)
 Disable a job step?
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

ratinakage
Starting Member

16 Posts

Posted - 10/19/2007 :  07:21:39  Show Profile  Reply with Quote
Hey guys,

I posted this question in the t-sql section and then realized its probably more relevant to SQL Server 2000. Anyways...

I know you can disable a SQL job. What I want to know is, if anyone can think of a clever way to disable a job step?

Basically, I want to create a big SQL job with all the steps disabled. Then as the users of my app turn certain things on, the job steps should become activated (or enabled).

My first thought was to do something like this.

1. dummy step. Next step = 3
2. real step a Next step = 3
3. dummy step Next step = 5
4. real step b Next step = 5
5. dummy step Next step = 7
6. real step c Next step = 7
....

Where you basically have a job so that none of the steps are enabled and they are all skipped over. Then as things need to be enabled, you just change the next step to next step - 1 (or something like that)

Its a bit messy. Can you think of anything else?

Thanks,

AndrewMurphy
Flowing Fount of Yak Knowledge

Ireland
2915 Posts

Posted - 10/19/2007 :  07:33:16  Show Profile  Reply with Quote
Is this a timed job executed from SQL Agent, or an on-request job? what should happen if 2 or more wish to run the job at the same time?...with different options?

What are you trying to offer the end users in business terms?
Go to Top of Page

Kristen
Test

United Kingdom
22191 Posts

Posted - 10/19/2007 :  08:31:21  Show Profile  Reply with Quote
"I posted this question in the t-sql section and then realized its probably more relevant to SQL Server 2000."

And now people have started answering it in both places without realising there are already answers in the other thread, and will feel that you are wasting their time.

Please do not post in multiple forums on this site.

Thank you.

Kristen
Go to Top of Page

rmiao
Flowing Fount of Yak Knowledge

USA
7266 Posts

Posted - 10/20/2007 :  01:04:26  Show Profile  Reply with Quote
You can create job without schedule, then run it from your app.
Go to Top of Page

ratinakage
Starting Member

16 Posts

Posted - 10/22/2007 :  02:00:49  Show Profile  Reply with Quote
Hey guys,

Thanks for the replies...

I want to configure it in SQL server agent.

@rmiao, The job should be scheduled to run once a day. Furthermore, any of the steps can be run on demand from within the app. The reason for this is that each step runs a report. So, at the end of the day, all reports are run but they can also be run on demand throughout the day.

Any ideas?
Go to Top of Page

AndrewMurphy
Flowing Fount of Yak Knowledge

Ireland
2915 Posts

Posted - 10/22/2007 :  12:30:43  Show Profile  Reply with Quote
how about ...create a table called reportrequests or whatever catches your fancy.

id, date asked, owner (etc), rundate, reportid, status (date, time, output?, etc)

when running the report via a SP, select from the "reportrequests" table for the required rundate and the required reportid/name....if no record, no run. if a record continue. when report finished....mark corresponding record complete.
Go to Top of Page

rmiao
Flowing Fount of Yak Knowledge

USA
7266 Posts

Posted - 10/22/2007 :  22:54:17  Show Profile  Reply with Quote
Can you just call whatever code in job step directly in your app?
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.16 seconds. Powered By: Snitz Forums 2000