Home All Groups Group Topic Archive Search About

run database jobs on button click

Author
23 Jun 2006 2:38 AM
ads
hi,

does anyone have an idea how to access and run scheduled jobs in sqlserver
database using just a button click?can anyone point me to the right resources.

Thanks,

Ads

Author
23 Jun 2006 3:15 AM
Brendan Green
You don't want to access and run a _scheduled_ job - otherwise, what's the
point of it being scheduled!

What you can do, is execute sp_start_job instead.

Example straight from SQL Server Books OnLine:

EXEC sp_start_job @job_name = 'Nightly Backup'


Call that from a SqlCommand object.

Show quote
"ads" <a**@discussions.microsoft.com> wrote in message
news:E7FF4254-9538-463D-BB6F-29F83A83B2A4@microsoft.com...
> hi,
>
> does anyone have an idea how to access and run scheduled jobs in sqlserver
> database using just a button click?can anyone point me to the right
> resources.
>
> Thanks,
>
> Ads
Author
23 Jun 2006 5:08 AM
ads
So i can force execute it aside from it being scheduled. got the point?

Thanks anyway.

Show quote
"Brendan Green" wrote:

> You don't want to access and run a _scheduled_ job - otherwise, what's the
> point of it being scheduled!
>
> What you can do, is execute sp_start_job instead.
>
> Example straight from SQL Server Books OnLine:
>
> EXEC sp_start_job @job_name = 'Nightly Backup'
>
>
> Call that from a SqlCommand object.
>
> "ads" <a**@discussions.microsoft.com> wrote in message
> news:E7FF4254-9538-463D-BB6F-29F83A83B2A4@microsoft.com...
> > hi,
> >
> > does anyone have an idea how to access and run scheduled jobs in sqlserver
> > database using just a button click?can anyone point me to the right
> > resources.
> >
> > Thanks,
> >
> > Ads
>
>
>

AddThis Social Bookmark Button