PC Review Forums Newsgroups Microsoft DotNet Microsoft ADO .NET run database jobs on button click

Reply

run database jobs on button click

 
Thread Tools Rate Thread
Old 23-06-2006, 03:38 AM   #1
=?Utf-8?B?YWRz?=
Guest
 
Posts: n/a
Default run database jobs on button click


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
  Reply With Quote
Old 23-06-2006, 04:15 AM   #2
Brendan Green
Guest
 
Posts: n/a
Default Re: run database jobs on button click

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" <ads@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



  Reply With Quote
Old 23-06-2006, 06:08 AM   #3
=?Utf-8?B?YWRz?=
Guest
 
Posts: n/a
Default Re: run database jobs on button click

So i can force execute it aside from it being scheduled. got the point?

Thanks anyway.

"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" <ads@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

>
>
>

  Reply With Quote
Reply



Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off