Connecting Tech Pros Worldwide Forums | Help | Site Map

connect to sql job agent

Steve
Guest
 
Posts: n/a
#1: Aug 6 '07
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?

Nicholas Paldino [.NET/C# MVP]
Guest
 
Posts: n/a
#2: Aug 6 '07

re: connect to sql job agent


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/l.../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/l.../ms131540.aspx

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

--
- Nicholas Paldino [.NET/C# MVP]
- mvp@spam.guard.caspershouse.com

"Steve" <Steve@community.nospam.comwrote in message
news:OJdQ5NG2HHA.1484@TK2MSFTNGP06.phx.gbl...
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?


Steve
Guest
 
Posts: n/a
#3: Aug 7 '07

re: connect to sql job agent


I'm using SQL 05, I'll take a look, thanks
"Nicholas Paldino [.NET/C# MVP]" <mvp@spam.guard.caspershouse.comwrote in
message news:%23hnGdTG2HHA.4004@TK2MSFTNGP05.phx.gbl...
Quote:
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/l.../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/l.../ms131540.aspx
>
SQL DMO objects are COM objects, so you will have to access them
through COM interop.
>
--
- Nicholas Paldino [.NET/C# MVP]
- mvp@spam.guard.caspershouse.com
>
"Steve" <Steve@community.nospam.comwrote in message
news:OJdQ5NG2HHA.1484@TK2MSFTNGP06.phx.gbl...
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?
>

Closed Thread