Home All Groups Group Topic Archive Search About
Author
30 Jul 2005 2:59 AM
Judy
Dear All,
I need some help on this problem.

I create a job on SQL Agent, the job had schedule as selected date and time,
but I want to have a optional choise to user to allow them start the job at
the web page, so I try to create a store procedure to start the job and
return the outcome for the job (Fail or success). And I use
msdb.dbo.sp_start_job to start the job, now I face the problem how can I know
the job are finished and after the job completed, I need to check the result
of the job. Can give me some idea, what should I do for this.

TQ

Author
30 Jul 2005 6:25 AM
Chandra
hi

probably you can have a log table. The jon logs the data into the table. and
you can read it from the web page of u can have ur sp return a value.


did this answer your question.


--
best Regards,
Chandra
http://chanduas.blogspot.com/
http://groups.msn.com/SQLResource/
---------------------------------------



Show quote
"Judy" wrote:

> Dear All,
> I need some help on this problem.
>
> I create a job on SQL Agent, the job had schedule as selected date and time,
> but I want to have a optional choise to user to allow them start the job at
> the web page, so I try to create a store procedure to start the job and
> return the outcome for the job (Fail or success). And I use
> msdb.dbo.sp_start_job to start the job, now I face the problem how can I know
> the job are finished and after the job completed, I need to check the result
> of the job. Can give me some idea, what should I do for this.
>
> TQ
>
Author
30 Jul 2005 7:06 PM
Andrew J. Kelly
sp_hlep_job will give you the status and such but you will have to poll for
it periodically.

--
Andrew J. Kelly  SQL MVP


Show quote
"Judy" <J***@discussions.microsoft.com> wrote in message
news:97716C52-85C6-41F0-8BE8-EFB61EF3E0FD@microsoft.com...
> Dear All,
> I need some help on this problem.
>
> I create a job on SQL Agent, the job had schedule as selected date and
> time,
> but I want to have a optional choise to user to allow them start the job
> at
> the web page, so I try to create a store procedure to start the job and
> return the outcome for the job (Fail or success). And I use
> msdb.dbo.sp_start_job to start the job, now I face the problem how can I
> know
> the job are finished and after the job completed, I need to check the
> result
> of the job. Can give me some idea, what should I do for this.
>
> TQ
>
Author
29 Nov 2005 7:39 AM
birger
....or check out this article about how to use xp_sqlagent_enum_jobs to be able to deal with the results since the results from sp_help_job cannot be inserted into a table.

[url]http://www.databasejournal.com/article.php/10888_3491201_2[/url]

/Magnus -- birger ------------------------------------------------------------------------ Posted via http://www.codecomments.com ------------------------------------------------------------------------

AddThis Social Bookmark Button