Hi do i Enable a Sqlserver job from asp.net web form?

L

Learner

Hi there,
We have a Sqlserver job defined in Sqlserver 2000 and also mentioned

the time when it should run. But we only enable it when we needed it to

run. So thats how we have it defined. As per our current business
scenario we don't want to automate the job at a scheduled intervals.
But we manually go change couple of date parameters every time we get
an email from our testing team.


So we are just thinking to it from a web form with two date
parameters and enable the job we want to run.


Hope this gives a little over view of what we are trying to accomplish.

Is there a way we can accomplish this? Please provide your valuble
inputs and suggestions. If you need to know lowlevel understand of the
job and its script i will post that. But to start with i think i the
above explanation helps you to understand.


we are using .NET framework 1.1.


Thanks
-L
 
B

Bruce Barker

create a job without a schedule. then call the sp_start_job storedproc when
you want to run it. if you need to pass parameters, then you shoudl create a
sepreate table to write them to, then start the job

-- bruce (sqlwork.com)
 
L

Learner

Hi Bruce,
Thanks for the reply. Ok i have created a job called 'Change
Inspection Date' and we have only one step in it and all it does is run
a stored proc with the two date parameters. like this EXEC
XXXX_XXX_XXXX '12/22/2005', '12/27/2005' . But do not how to proceed
from this point on wards. Like you said we haven't scheduled it yet.
just defined. Now we need to be able to schedule it from the .NET
webform.

Like, say if we got an email to day then we open up the webform and key
in the date parameters and shedule the time(say mid night around 11)
when the job should really kick off and we logoff or close the webform.
I mean we don't want the job run right away when we click on the
Schedule button the form.

To be more clearly we are trying to build an user interface to schedule
the SQL job instead of going to Enterprise Manager and then schedule
it. Hope this explains you what we are trying to accomlish. If possible
please help me with the scheduling part of the coding. I can handle the
database connection and the rest of the stuff i need to know how do we
go about once the database connection has been established.

Thanks
-L
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,007
Latest member
obedient dusk

Latest Threads

Top