connect to sql job agent

S

Steve

Is there a way to connect to SQL server and read all of the jobs listed in the job agent and get the status of each job?
I want to create either a web page or a winForm, have a list of all SQL DB servers in a drop down, select the db name, then show a list of all the jobs in the job agent and show the status of each job, (failed, running, succeeded, etc) and the last time the job ran and by who.

is this possible to do and if so how can i get started with something like this?
 
N

Nicholas Paldino [.NET/C# MVP]

Steve,

What version of SQL Server are you using? If you are using SQL Server
2005, you can take a look at SQL Server Management objects:

http://technet.microsoft.com/en-us/library/ms162169.aspx

You should be able to get job information from these.

If you are using SQL Server 2000, then you can use SQL Distributed
Management Objects:

http://technet.microsoft.com/en-us/library/ms131540.aspx

SQL DMO objects are COM objects, so you will have to access them through
COM interop.

--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

Is there a way to connect to SQL server and read all of the jobs listed in
the job agent and get the status of each job?
I want to create either a web page or a winForm, have a list of all SQL DB
servers in a drop down, select the db name, then show a list of all the jobs
in the job agent and show the status of each job, (failed, running,
succeeded, etc) and the last time the job ran and by who.

is this possible to do and if so how can i get started with something like
this?
 

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

Top