Showing posts with label jobs. Show all posts
Showing posts with label jobs. Show all posts

Thursday, March 29, 2012

Enumerating jobs on a SQL server using SMO - in C#

Hi all, I'm trying to connect to SQL and enumerate all Agent jobs to find a
particular and call job.envoke on it.
Looked every where but can't find a code snippet on it or a sample.
Anyone can assist? CheersYou can use this to list all the jobs.
USE msdb
EXEC sp_help_job
-Omnibuzz (The SQL GC)
http://omnibuzz-sql.blogspot.com/|||Oops... Just read the subject line about SMO.. My fault..
You can try this link..
http://msdn2.microsoft.com/en-us/li...nt.
aspx
-Omnibuzz (The SQL GC)
http://omnibuzz-sql.blogspot.com/|||Thanks omnibuzz, I've tried that uri but since I'm new to SQL prog I haven't
figured out how to use for instance jobbasecollection classes to find out if
the job I'm interested in exist on the server.
Any help there with the code\implementation? Thanks.
"Omnibuzz" wrote:

> Oops... Just read the subject line about SMO.. My fault..
> You can try this link..
> http://msdn2.microsoft.com/en-us/li...n
t.aspx
> --
> -Omnibuzz (The SQL GC)
> http://omnibuzz-sql.blogspot.com/
>
>

Wednesday, March 21, 2012

Enterprise Manager Tape Backup issue

I have multiple failed backups jobs through the enterprise manager. I have an
event id 9 "\device\scis\aic78u21 did not respond within the timeout period"
and event id 15 "\device\tape0 is not ready for access yet." The aic78u21 is
the scsi controller and only appeared once. Since then, I have had multiple
event id 15. However I did boot up into the scsi utility and teh dlt tape
device is listed in the utility with scsi id 3, and the controler listed as
scsi id 7. I then ran a ntbackup job on a new media set and it ran fine.
However the scheduled jobs within enterprise manager still will not run. Our
SQL admin is no longer with us, and myself and another have been tasked with
the SQL admin, so we are both leery of making any changes that might have bad
reprecussions later. I thought about deleting and adding the tape device back
into the enterprise manager, but I'm wondering if it is a media set issue.
What do you think?
I forgot to mention that the device does show up in device manager with the
questions marks in the other devices category. Is this due to the device
running off of the scsi controller drivers?
"sigm" wrote:

> I have multiple failed backups jobs through the enterprise manager. I have an
> event id 9 "\device\scis\aic78u21 did not respond within the timeout period"
> and event id 15 "\device\tape0 is not ready for access yet." The aic78u21 is
> the scsi controller and only appeared once. Since then, I have had multiple
> event id 15. However I did boot up into the scsi utility and teh dlt tape
> device is listed in the utility with scsi id 3, and the controler listed as
> scsi id 7. I then ran a ntbackup job on a new media set and it ran fine.
> However the scheduled jobs within enterprise manager still will not run. Our
> SQL admin is no longer with us, and myself and another have been tasked with
> the SQL admin, so we are both leery of making any changes that might have bad
> reprecussions later. I thought about deleting and adding the tape device back
> into the enterprise manager, but I'm wondering if it is a media set issue.
> What do you think?
sql

Enterprise Manager Tape Backup issue

I have multiple failed backups jobs through the enterprise manager. I have a
n
event id 9 "\device\scis\aic78u21 did not respond within the timeout period"
and event id 15 "\device\tape0 is not ready for access yet." The aic78u21 is
the scsi controller and only appeared once. Since then, I have had multiple
event id 15. However I did boot up into the scsi utility and teh dlt tape
device is listed in the utility with scsi id 3, and the controler listed as
scsi id 7. I then ran a ntbackup job on a new media set and it ran fine.
However the scheduled jobs within enterprise manager still will not run. Our
SQL admin is no longer with us, and myself and another have been tasked with
the SQL admin, so we are both leery of making any changes that might have ba
d
reprecussions later. I thought about deleting and adding the tape device bac
k
into the enterprise manager, but I'm wondering if it is a media set issue.
What do you think?I forgot to mention that the device does show up in device manager with the
questions marks in the other devices category. Is this due to the device
running off of the scsi controller drivers?
"sigm" wrote:

> I have multiple failed backups jobs through the enterprise manager. I have
an
> event id 9 "\device\scis\aic78u21 did not respond within the timeout perio
d"
> and event id 15 "\device\tape0 is not ready for access yet." The aic78u21
is
> the scsi controller and only appeared once. Since then, I have had multipl
e
> event id 15. However I did boot up into the scsi utility and teh dlt tape
> device is listed in the utility with scsi id 3, and the controler listed a
s
> scsi id 7. I then ran a ntbackup job on a new media set and it ran fine.
> However the scheduled jobs within enterprise manager still will not run. O
ur
> SQL admin is no longer with us, and myself and another have been tasked wi
th
> the SQL admin, so we are both leery of making any changes that might have
bad
> reprecussions later. I thought about deleting and adding the tape device b
ack
> into the enterprise manager, but I'm wondering if it is a media set issue.
> What do you think?

Enterprise Manager Tape Backup issue

I have multiple failed backups jobs through the enterprise manager. I have an
event id 9 "\device\scis\aic78u21 did not respond within the timeout period"
and event id 15 "\device\tape0 is not ready for access yet." The aic78u21 is
the scsi controller and only appeared once. Since then, I have had multiple
event id 15. However I did boot up into the scsi utility and teh dlt tape
device is listed in the utility with scsi id 3, and the controler listed as
scsi id 7. I then ran a ntbackup job on a new media set and it ran fine.
However the scheduled jobs within enterprise manager still will not run. Our
SQL admin is no longer with us, and myself and another have been tasked with
the SQL admin, so we are both leery of making any changes that might have bad
reprecussions later. I thought about deleting and adding the tape device back
into the enterprise manager, but I'm wondering if it is a media set issue.
What do you think?I forgot to mention that the device does show up in device manager with the
questions marks in the other devices category. Is this due to the device
running off of the scsi controller drivers?
"sigm" wrote:
> I have multiple failed backups jobs through the enterprise manager. I have an
> event id 9 "\device\scis\aic78u21 did not respond within the timeout period"
> and event id 15 "\device\tape0 is not ready for access yet." The aic78u21 is
> the scsi controller and only appeared once. Since then, I have had multiple
> event id 15. However I did boot up into the scsi utility and teh dlt tape
> device is listed in the utility with scsi id 3, and the controler listed as
> scsi id 7. I then ran a ntbackup job on a new media set and it ran fine.
> However the scheduled jobs within enterprise manager still will not run. Our
> SQL admin is no longer with us, and myself and another have been tasked with
> the SQL admin, so we are both leery of making any changes that might have bad
> reprecussions later. I thought about deleting and adding the tape device back
> into the enterprise manager, but I'm wondering if it is a media set issue.
> What do you think?

Monday, March 19, 2012

Enterprise Manager problem : jobs and alerts flash, while Agent properties lock-up

I am having a problem with Enterprise Manager. The server is SQL
Server 2000, SP 2, with the hotfix (the server is used for an ePiphany
application, which does not support sp3).
Anyway, when you try to "double-click" a job, it flashes up once, then
disappears. The same can be said for the alerts, and it does not list
any operators (if you query sysoperators, you see all the operators).
In addition, if you try to display the SQL Agent properties,
Enterprise Manager locks up.
This problem has been narrowed down to only inflict the items under
Management>SQL Server Agent. It does not affect viewing current
activity, maint plans, backup devices, or the SQL Error log.
Their is a KB article about the same type of problem with maintenance
plans, and the fix is to alter the path for the log file of SQL Agent.
This is not possible with this problem because you cannot get to the
properties to alter the log file location for the agent.
Anybody seen this problem?
HGHumphreyYou can change the location of sql agent log file in the
registry, go to
SOFTWARE\Microsoft\MSSQLServer\SQLServerAgent
under My Computer\HKEY_LOCAL_MACHINE
and change the file path in ErrorLogFile
Alternatively if you have another pc with Enterprise
Manager you can use it to manage your server.
hth.
>--Original Message--
>I am having a problem with Enterprise Manager. The
server is SQL
>Server 2000, SP 2, with the hotfix (the server is used
for an ePiphany
>application, which does not support sp3).
>Anyway, when you try to "double-click" a job, it flashes
up once, then
>disappears. The same can be said for the alerts, and it
does not list
>any operators (if you query sysoperators, you see all the
operators).
>In addition, if you try to display the SQL Agent
properties,
>Enterprise Manager locks up.
>This problem has been narrowed down to only inflict the
items under
>Management>SQL Server Agent. It does not affect viewing
current
>activity, maint plans, backup devices, or the SQL Error
log.
>Their is a KB article about the same type of problem with
maintenance
>plans, and the fix is to alter the path for the log file
of SQL Agent.
> This is not possible with this problem because you
cannot get to the
>properties to alter the log file location for the agent.
>Anybody seen this problem?
>HGHumphrey
>.
>|||That does not work either. Any other clues?
HGHumphrey
<anonymous@.discussions.microsoft.com> wrote in message news:<ebd201c3f0b2$60ca6e30$a601280a@.phx.gbl>...
> You can change the location of sql agent log file in the
> registry, go to
> SOFTWARE\Microsoft\MSSQLServer\SQLServerAgent
> under My Computer\HKEY_LOCAL_MACHINE
> and change the file path in ErrorLogFile
> Alternatively if you have another pc with Enterprise
> Manager you can use it to manage your server.
> hth.
>
> >--Original Message--
> >I am having a problem with Enterprise Manager. The
> server is SQL
> >Server 2000, SP 2, with the hotfix (the server is used
> for an ePiphany
> >application, which does not support sp3).
> >
> >Anyway, when you try to "double-click" a job, it flashes
> up once, then
> >disappears. The same can be said for the alerts, and it
> does not list
> >any operators (if you query sysoperators, you see all the
> operators).
> >In addition, if you try to display the SQL Agent
> properties,
> >Enterprise Manager locks up.
> >
> >This problem has been narrowed down to only inflict the
> items under
> >Management>SQL Server Agent. It does not affect viewing
> current
> >activity, maint plans, backup devices, or the SQL Error
> log.
> >
> >Their is a KB article about the same type of problem with
> maintenance
> >plans, and the fix is to alter the path for the log file
> of SQL Agent.
> > This is not possible with this problem because you
> cannot get to the
> >properties to alter the log file location for the agent.
> >
> >Anybody seen this problem?
> >
> >HGHumphrey
> >.
> >|||This has been fixed. It was because we had an entry in the
Sysoperators table that was blank. Once this was deleted, and the
services were restarted, it was fine.
Thanks,
HGHumphrey
hhumphrey@.hrblock.com (HGHumphrey) wrote in message news:<188b70ac.0402101354.6b1ffbcb@.posting.google.com>...
> I am having a problem with Enterprise Manager. The server is SQL
> Server 2000, SP 2, with the hotfix (the server is used for an ePiphany
> application, which does not support sp3).
> Anyway, when you try to "double-click" a job, it flashes up once, then
> disappears. The same can be said for the alerts, and it does not list
> any operators (if you query sysoperators, you see all the operators).
> In addition, if you try to display the SQL Agent properties,
> Enterprise Manager locks up.
> This problem has been narrowed down to only inflict the items under
> Management>SQL Server Agent. It does not affect viewing current
> activity, maint plans, backup devices, or the SQL Error log.
> Their is a KB article about the same type of problem with maintenance
> plans, and the fix is to alter the path for the log file of SQL Agent.
> This is not possible with this problem because you cannot get to the
> properties to alter the log file location for the agent.
> Anybody seen this problem?
> HGHumphrey

Sunday, March 11, 2012

Enterprise Manager problem : jobs and alerts flash, while Agent properties lock-up

I am having a problem with Enterprise Manager. The server is SQL
Server 2000, SP 2, with the hotfix (the server is used for an ePiphany
application, which does not support sp3).
Anyway, when you try to "double-click" a job, it flashes up once, then
disappears. The same can be said for the alerts, and it does not list
any operators (if you query sysoperators, you see all the operators).
In addition, if you try to display the SQL Agent properties,
Enterprise Manager locks up.
This problem has been narrowed down to only inflict the items under
Management>SQL Server Agent. It does not affect viewing current
activity, maint plans, backup devices, or the SQL Error log.
Their is a KB article about the same type of problem with maintenance
plans, and the fix is to alter the path for the log file of SQL Agent.
This is not possible with this problem because you cannot get to the
properties to alter the log file location for the agent.
Anybody seen this problem?
HGHumphreyThis has been fixed. It was because we had an entry in the
Sysoperators table that was blank. Once this was deleted, and the
services were restarted, it was fine.
Thanks,
HGHumphrey
hhumphrey@.hrblock.com (HGHumphrey) wrote in message news:<188b70ac.0402101354.6b1ffbcb@.p
osting.google.com>...
> I am having a problem with Enterprise Manager. The server is SQL
> Server 2000, SP 2, with the hotfix (the server is used for an ePiphany
> application, which does not support sp3).
> Anyway, when you try to "double-click" a job, it flashes up once, then
> disappears. The same can be said for the alerts, and it does not list
> any operators (if you query sysoperators, you see all the operators).
> In addition, if you try to display the SQL Agent properties,
> Enterprise Manager locks up.
> This problem has been narrowed down to only inflict the items under
> Management>SQL Server Agent. It does not affect viewing current
> activity, maint plans, backup devices, or the SQL Error log.
> Their is a KB article about the same type of problem with maintenance
> plans, and the fix is to alter the path for the log file of SQL Agent.
> This is not possible with this problem because you cannot get to the
> properties to alter the log file location for the agent.
> Anybody seen this problem?
> HGHumphrey