Is there a way to send an email alert if a dts job runs
for more than a specific time. For example, I want to
send an alert if a job runs for more than 2 minutes.As the first step of your DTS job you could start another job that simply
waits 2 minutes (waitfor delay '00:02:00') and then checks the execution
status of the DTS job (you could use sp_help_job). It could then alert if
the job was still running (assuming the DTS job wouldn't start again before
the monitor finished). I'm sure there's a slicker way but that would be
relatively simple and robust
--
HTH
Jasper Smith (SQL Server MVP)
I support PASS - the definitive, global
community for SQL Server professionals -
http://www.sqlpass.org
"Tim Savery" <Tim.Savery@.mbna.com> wrote in message
news:05a701c3a2df$b7115900$a001280a@.phx.gbl...
Is there a way to send an email alert if a dts job runs
for more than a specific time. For example, I want to
send an alert if a job runs for more than 2 minutes.|||To be sure whether the job is still in the current execution, you can
execute msdb..sp_help_job before the wait, and then check execute
sp_help_job and check last_run_date and last_run_time. If the job has been
restarted, these two values would have been changed.
--
Linchi Shea
linchi_shea@.NOSPAMml.com
"Jasper Smith" <jasper_smith9@.hotmail.com> wrote in message
news:eiBPqZxoDHA.360@.TK2MSFTNGP12.phx.gbl...
> As the first step of your DTS job you could start another job that simply
> waits 2 minutes (waitfor delay '00:02:00') and then checks the execution
> status of the DTS job (you could use sp_help_job). It could then alert if
> the job was still running (assuming the DTS job wouldn't start again
before
> the monitor finished). I'm sure there's a slicker way but that would be
> relatively simple and robust
> --
> HTH
> Jasper Smith (SQL Server MVP)
> I support PASS - the definitive, global
> community for SQL Server professionals -
> http://www.sqlpass.org
> "Tim Savery" <Tim.Savery@.mbna.com> wrote in message
> news:05a701c3a2df$b7115900$a001280a@.phx.gbl...
> Is there a way to send an email alert if a dts job runs
> for more than a specific time. For example, I want to
> send an alert if a job runs for more than 2 minutes.
>
Showing posts with label notifications. Show all posts
Showing posts with label notifications. Show all posts
Friday, March 23, 2012
Wednesday, March 21, 2012
Job notification
Morning all!
My SQL server email job notifications have stopped working, but mails sent through the xp_sendmail command still work.
The only thing that has changed recently is the SQL server agent account passwords have been changed, these accounts are normal win2000 domain accounts.
Any ideas cos I am fully stumped?Have you tried testing the SQLMail Profile?
Support Services/SQLMail.
Are SQLMail and SQLAgentMail using the same mail profile?|||Already tested the SQL mail profile and that works ok,
How do I check which profile the sqlagentmail is using?|||Originally posted by SQLSlammer
Already tested the SQL mail profile and that works ok,
How do I check which profile the sqlagentmail is using?
Right click on SQL Agent/Properties and check that it is using the same mail profile.
My SQL server email job notifications have stopped working, but mails sent through the xp_sendmail command still work.
The only thing that has changed recently is the SQL server agent account passwords have been changed, these accounts are normal win2000 domain accounts.
Any ideas cos I am fully stumped?Have you tried testing the SQLMail Profile?
Support Services/SQLMail.
Are SQLMail and SQLAgentMail using the same mail profile?|||Already tested the SQL mail profile and that works ok,
How do I check which profile the sqlagentmail is using?|||Originally posted by SQLSlammer
Already tested the SQL mail profile and that works ok,
How do I check which profile the sqlagentmail is using?
Right click on SQL Agent/Properties and check that it is using the same mail profile.
Labels:
allmy,
command,
database,
email,
job,
mails,
microsoft,
mysql,
notification,
notifications,
oracle,
server,
sql,
working,
xp_sendmail
Monday, March 19, 2012
Job failure notifications for non-administrative users
Some of my power users create their own SQL Agent jobs. All well and
good. However, I don't wish to give them System Administrator
privileges, and when they create their jobs, the check box to "e-mail
operator" in the job notifications tab is greyed out. Is this a
feature? I'm having difficulty finding documentation on it, or even any
mention, where a distinction is made between administrators and
standard users.
Other than setting up the notifications myself after the jobs are
created, is there any way around this issue? This is on SQL 2000 EE,
service pack 3a, running on Windows 2K Advanced Server.
Thanks,
Steve
Hi Steve,
A distinction is made between administrators and standard users?
This depends of as configured the Services SQL Server Agent, the account is
"Local System" or is a administrator account o User Email Account?.
If is "Local System", this can you problem.
Hermilson Tinoco
"Steve" wrote:
> Some of my power users create their own SQL Agent jobs. All well and
> good. However, I don't wish to give them System Administrator
> privileges, and when they create their jobs, the check box to "e-mail
> operator" in the job notifications tab is greyed out. Is this a
> feature? I'm having difficulty finding documentation on it, or even any
> mention, where a distinction is made between administrators and
> standard users.
> Other than setting up the notifications myself after the jobs are
> created, is there any way around this issue? This is on SQL 2000 EE,
> service pack 3a, running on Windows 2K Advanced Server.
> Thanks,
> Steve
>
|||SQL Server Agent is running under the same account as the SQL Server, a
domain account set up to be a local administrator.
Note that as an administrator I can add notifications to both my own
jobs and my users' jobs; it's just the users that can't add
notifications to their own jobs.
Steve
good. However, I don't wish to give them System Administrator
privileges, and when they create their jobs, the check box to "e-mail
operator" in the job notifications tab is greyed out. Is this a
feature? I'm having difficulty finding documentation on it, or even any
mention, where a distinction is made between administrators and
standard users.
Other than setting up the notifications myself after the jobs are
created, is there any way around this issue? This is on SQL 2000 EE,
service pack 3a, running on Windows 2K Advanced Server.
Thanks,
Steve
Hi Steve,
A distinction is made between administrators and standard users?
This depends of as configured the Services SQL Server Agent, the account is
"Local System" or is a administrator account o User Email Account?.
If is "Local System", this can you problem.
Hermilson Tinoco
"Steve" wrote:
> Some of my power users create their own SQL Agent jobs. All well and
> good. However, I don't wish to give them System Administrator
> privileges, and when they create their jobs, the check box to "e-mail
> operator" in the job notifications tab is greyed out. Is this a
> feature? I'm having difficulty finding documentation on it, or even any
> mention, where a distinction is made between administrators and
> standard users.
> Other than setting up the notifications myself after the jobs are
> created, is there any way around this issue? This is on SQL 2000 EE,
> service pack 3a, running on Windows 2K Advanced Server.
> Thanks,
> Steve
>
|||SQL Server Agent is running under the same account as the SQL Server, a
domain account set up to be a local administrator.
Note that as an administrator I can add notifications to both my own
jobs and my users' jobs; it's just the users that can't add
notifications to their own jobs.
Steve
Job failure notifications for non-administrative users
Some of my power users create their own SQL Agent jobs. All well and
good. However, I don't wish to give them System Administrator
privileges, and when they create their jobs, the check box to "e-mail
operator" in the job notifications tab is greyed out. Is this a
feature? I'm having difficulty finding documentation on it, or even any
mention, where a distinction is made between administrators and
standard users.
Other than setting up the notifications myself after the jobs are
created, is there any way around this issue? This is on SQL 2000 EE,
service pack 3a, running on Windows 2K Advanced Server.
Thanks,
SteveHi Steve,
A distinction is made between administrators and standard users'
This depends of as configured the Services SQL Server Agent, the account is
"Local System" or is a administrator account o User Email Account?.
If is "Local System", this can you problem.
Hermilson Tinoco
"Steve" wrote:
> Some of my power users create their own SQL Agent jobs. All well and
> good. However, I don't wish to give them System Administrator
> privileges, and when they create their jobs, the check box to "e-mail
> operator" in the job notifications tab is greyed out. Is this a
> feature? I'm having difficulty finding documentation on it, or even any
> mention, where a distinction is made between administrators and
> standard users.
> Other than setting up the notifications myself after the jobs are
> created, is there any way around this issue? This is on SQL 2000 EE,
> service pack 3a, running on Windows 2K Advanced Server.
> Thanks,
> Steve
>|||SQL Server Agent is running under the same account as the SQL Server, a
domain account set up to be a local administrator.
Note that as an administrator I can add notifications to both my own
jobs and my users' jobs; it's just the users that can't add
notifications to their own jobs.
Steve
good. However, I don't wish to give them System Administrator
privileges, and when they create their jobs, the check box to "e-mail
operator" in the job notifications tab is greyed out. Is this a
feature? I'm having difficulty finding documentation on it, or even any
mention, where a distinction is made between administrators and
standard users.
Other than setting up the notifications myself after the jobs are
created, is there any way around this issue? This is on SQL 2000 EE,
service pack 3a, running on Windows 2K Advanced Server.
Thanks,
SteveHi Steve,
A distinction is made between administrators and standard users'
This depends of as configured the Services SQL Server Agent, the account is
"Local System" or is a administrator account o User Email Account?.
If is "Local System", this can you problem.
Hermilson Tinoco
"Steve" wrote:
> Some of my power users create their own SQL Agent jobs. All well and
> good. However, I don't wish to give them System Administrator
> privileges, and when they create their jobs, the check box to "e-mail
> operator" in the job notifications tab is greyed out. Is this a
> feature? I'm having difficulty finding documentation on it, or even any
> mention, where a distinction is made between administrators and
> standard users.
> Other than setting up the notifications myself after the jobs are
> created, is there any way around this issue? This is on SQL 2000 EE,
> service pack 3a, running on Windows 2K Advanced Server.
> Thanks,
> Steve
>|||SQL Server Agent is running under the same account as the SQL Server, a
domain account set up to be a local administrator.
Note that as an administrator I can add notifications to both my own
jobs and my users' jobs; it's just the users that can't add
notifications to their own jobs.
Steve
Labels:
administrator,
agent,
create,
database,
failure,
job,
jobs,
microsoft,
mysql,
non-administrative,
notifications,
oracle,
own,
power,
privileges,
server,
sql,
system,
users
Subscribe to:
Posts (Atom)