Showing posts with label response. Show all posts
Showing posts with label response. Show all posts

Thursday, March 22, 2012

Alert Response Execute Job

I would like to have an alert execute a job as a response, but I also need to
have the error text passed into the job.
Is this possible or is there another way?Thom
>I would like to have an alert execute a job as a response,
Can you elaborate a little bit?
> have the error text passed into the job.
Yes , you have an option to define an output file to get out info.
(Step-Advanced--Output file)
"Thom" <Thom@.discussions.microsoft.com> wrote in message
news:1E82BB52-6536-4D37-965D-3896A3CC5C45@.microsoft.com...
>I would like to have an alert execute a job as a response, but I also need
>to
> have the error text passed into the job.
> Is this possible or is there another way?
>

Alert Response Execute Job

I would like to have an alert execute a job as a response, but I also need to
have the error text passed into the job.
Is this possible or is there another way?
Thom
>I would like to have an alert execute a job as a response,
Can you elaborate a little bit?

> have the error text passed into the job.
Yes , you have an option to define an output file to get out info.
(Step-Advanced--Output file)
"Thom" <Thom@.discussions.microsoft.com> wrote in message
news:1E82BB52-6536-4D37-965D-3896A3CC5C45@.microsoft.com...
>I would like to have an alert execute a job as a response, but I also need
>to
> have the error text passed into the job.
> Is this possible or is there another way?
>

Alert Response Execute Job

I would like to have an alert execute a job as a response, but I also need t
o
have the error text passed into the job.
Is this possible or is there another way?Thom
>I would like to have an alert execute a job as a response,
Can you elaborate a little bit?

> have the error text passed into the job.
Yes , you have an option to define an output file to get out info.
(Step-Advanced--Output file)
"Thom" <Thom@.discussions.microsoft.com> wrote in message
news:1E82BB52-6536-4D37-965D-3896A3CC5C45@.microsoft.com...
>I would like to have an alert execute a job as a response, but I also need
>to
> have the error text passed into the job.
> Is this possible or is there another way?
>

Alert is not Firing

I have configured the alert of
Type SQL Server event alert
for the severity 016-Miscellaneous user Error
DB is all Database
In response tab, I have confiured the job.
I have created one procedure in pubs dB like
create proc test
as
begin
raiserror('going to configure ',16,1)
end
After that I have executed this Stored Procedure.
exec test.
My understanding is that now the alert should be fired and then it
should execute a job. But it is not at all happening. I.e The alert is
not at all firing.
Kindly give some solution.
Microsoft SQL Server 2000 - 8.00.2039 (Intel X86) May 3 2005
23:18:38 Copyright (c) 1988-2003 Microsoft Corporation Developer
Edition on Windows NT 5.1 (Build 2600: Service Pack 2)
Thanks and regards
Praveen.AAlert firing is based on the eventlog. Make sure you write to eventlog. Use either WITH LOG for
RAISERROR or (preferably) design your own messages (sp_addmessage) and specify there to always write
to eventlog.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"Praveen" <apveen@.gmail.com> wrote in message
news:1127218958.512008.318710@.g14g2000cwa.googlegroups.com...
>I have configured the alert of
> Type SQL Server event alert
> for the severity 016-Miscellaneous user Error
> DB is all Database
> In response tab, I have confiured the job.
> I have created one procedure in pubs dB like
> create proc test
> as
> begin
> raiserror('going to configure ',16,1)
> end
> After that I have executed this Stored Procedure.
> exec test.
> My understanding is that now the alert should be fired and then it
> should execute a job. But it is not at all happening. I.e The alert is
> not at all firing.
> Kindly give some solution.
> Microsoft SQL Server 2000 - 8.00.2039 (Intel X86) May 3 2005
> 23:18:38 Copyright (c) 1988-2003 Microsoft Corporation Developer
> Edition on Windows NT 5.1 (Build 2600: Service Pack 2)
>
> Thanks and regards
> Praveen.A
>|||Thanks a lot Tibor.
I got a solution. Alert is firing now.

Alert is not Firing

I have configured the alert of
Type SQL Server event alert
for the severity 016-Miscellaneous user Error
DB is all Database
In response tab, I have confiured the job.
I have created one procedure in pubs dB like
create proc test
as
begin
raiserror('going to configure ',16,1)
end
After that I have executed this Stored Procedure.
exec test.
My understanding is that now the alert should be fired and then it
should execute a job. But it is not at all happening. I.e The alert is
not at all firing.
Kindly give some solution.
Microsoft SQL Server 2000 - 8.00.2039 (Intel X86) May 3 2005
23:18:38 Copyright (c) 1988-2003 Microsoft Corporation Developer
Edition on Windows NT 5.1 (Build 2600: Service Pack 2)
Thanks and regards
Praveen.A
Alert firing is based on the eventlog. Make sure you write to eventlog. Use either WITH LOG for
RAISERROR or (preferably) design your own messages (sp_addmessage) and specify there to always write
to eventlog.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"Praveen" <apveen@.gmail.com> wrote in message
news:1127218958.512008.318710@.g14g2000cwa.googlegr oups.com...
>I have configured the alert of
> Type SQL Server event alert
> for the severity 016-Miscellaneous user Error
> DB is all Database
> In response tab, I have confiured the job.
> I have created one procedure in pubs dB like
> create proc test
> as
> begin
> raiserror('going to configure ',16,1)
> end
> After that I have executed this Stored Procedure.
> exec test.
> My understanding is that now the alert should be fired and then it
> should execute a job. But it is not at all happening. I.e The alert is
> not at all firing.
> Kindly give some solution.
> Microsoft SQL Server 2000 - 8.00.2039 (Intel X86) May 3 2005
> 23:18:38 Copyright (c) 1988-2003 Microsoft Corporation Developer
> Edition on Windows NT 5.1 (Build 2600: Service Pack 2)
>
> Thanks and regards
> Praveen.A
>
|||Thanks a lot Tibor.
I got a solution. Alert is firing now.
sql

Alert is not Firing

I have configured the alert of
Type SQL Server event alert
for the severity 016-Miscellaneous user Error
DB is all Database
In response tab, I have confiured the job.
I have created one procedure in pubs dB like
create proc test
as
begin
raiserror('going to configure ',16,1)
end
After that I have executed this Stored Procedure.
exec test.
My understanding is that now the alert should be fired and then it
should execute a job. But it is not at all happening. I.e The alert is
not at all firing.
Kindly give some solution.
Microsoft SQL Server 2000 - 8.00.2039 (Intel X86) May 3 2005
23:18:38 Copyright (c) 1988-2003 Microsoft Corporation Developer
Edition on Windows NT 5.1 (Build 2600: Service Pack 2)
Thanks and regards
Praveen.AAlert firing is based on the eventlog. Make sure you write to eventlog. Use
either WITH LOG for
RAISERROR or (preferably) design your own messages (sp_addmessage) and speci
fy there to always write
to eventlog.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"Praveen" <apveen@.gmail.com> wrote in message
news:1127218958.512008.318710@.g14g2000cwa.googlegroups.com...
>I have configured the alert of
> Type SQL Server event alert
> for the severity 016-Miscellaneous user Error
> DB is all Database
> In response tab, I have confiured the job.
> I have created one procedure in pubs dB like
> create proc test
> as
> begin
> raiserror('going to configure ',16,1)
> end
> After that I have executed this Stored Procedure.
> exec test.
> My understanding is that now the alert should be fired and then it
> should execute a job. But it is not at all happening. I.e The alert is
> not at all firing.
> Kindly give some solution.
> Microsoft SQL Server 2000 - 8.00.2039 (Intel X86) May 3 2005
> 23:18:38 Copyright (c) 1988-2003 Microsoft Corporation Developer
> Edition on Windows NT 5.1 (Build 2600: Service Pack 2)
>
> Thanks and regards
> Praveen.A
>|||Thanks a lot Tibor.
I got a solution. Alert is firing now.

Alert gets executed, but not its job. Am I doing something wrong?

I have an Alert that I verify gets activated (looked at its history under the General Tab) but it never executes the Execute Job under the Response tab.

Here is what I did:

1) Checked the Execute Job box
2) Created a job
a) Gave it a name
b) Gave it an owner
c) Left the category as Uncategorized
d) Under the Steps tab added a new step
i) Gave the step a name
ii) Selected Operating System Command (CmdExec) as the type
iii) In the Command box typed the following

cd C:\Blat
blat StandardMessage.txt -to Test.Test@.MyURL.com -s "TEST"
cd C:\

When I copy and paste that EXACT message (cd...blat...cd...) on the command line it works perfectly so it looks like the job isn't getting executed at all.

I also tried to set up an output file (under the Advanted Tab...Operating System Command. That file never gets created either! That makes me REALLY sure the job isn't getting executed.

So, if my Alert gets executed as verified by the history, why isn't my job being kicked off?

THANKS!what account the service is running under? probably system account. you need to have a domain account with minimal rights.|||Originally posted by ms_sql_dba
what account the service is running under? probably system account. you need to have a domain account with minimal rights.

You have lost me here.

My Alert executes just fine. I don't see any way to specify any "account" for the job that gets kicked off to run under.

Where should I look to specify the "account the service is running under"?

Thanks.|||Originally posted by darrinps
You have lost me here.

My Alert executes just fine. I don't see any way to specify any "account" for the job that gets kicked off to run under.

Where should I look to specify the "account the service is running under"?

Thanks.

I THINK what is happening is that the command I want to execute is local to my PC and the exec is attempting ro tun against the local server box.

What I need to do is either install the software there, or better yet (for testing) somehow redirect it to my box.|||try copying all the command line steps in a .bat file and then run that bat file from your scheduler.

Tuesday, March 20, 2012

Alert error text

Hi,
I looking for a property or global variable that would give me the alret
error text (like the one it sends in email response to an alert) . I need it
in my job which runs as a response to an alert.
thanks
I think Gert Drapers has exactly what you need - using Alert Tokens... Few
people know about these, but they are so cool...
http://www.sqldev.net/sqlagent/SQLAg...0TSQL%20st ep
Wayne Snyder, MCDBA, SQL Server MVP
Mariner, Charlotte, NC
www.mariner-usa.com
(Please respond only to the newsgroups.)
I support the Professional Association of SQL Server (PASS) and it's
community of SQL Server professionals.
www.sqlpass.org
"sonny" <sonny@.discussions.microsoft.com> wrote in message
news:28277FC8-95C2-4648-BED2-B34D1C78D7D0@.microsoft.com...
> Hi,
> I looking for a property or global variable that would give me the alret
> error text (like the one it sends in email response to an alert) . I need
> it
> in my job which runs as a response to an alert.
>
> thanks

Alert error text

Hi,
I looking for a property or global variable that would give me the alret
error text (like the one it sends in email response to an alert) . I need it
in my job which runs as a response to an alert.
thanksI think Gert Drapers has exactly what you need - using Alert Tokens... Few
people know about these, but they are so cool...
http://www.sqldev.net/sqlagent/SQLAgentStepTokens.htm#Example%20using%20TSQL%20step
Wayne Snyder, MCDBA, SQL Server MVP
Mariner, Charlotte, NC
www.mariner-usa.com
(Please respond only to the newsgroups.)
I support the Professional Association of SQL Server (PASS) and it's
community of SQL Server professionals.
www.sqlpass.org
"sonny" <sonny@.discussions.microsoft.com> wrote in message
news:28277FC8-95C2-4648-BED2-B34D1C78D7D0@.microsoft.com...
> Hi,
> I looking for a property or global variable that would give me the alret
> error text (like the one it sends in email response to an alert) . I need
> it
> in my job which runs as a response to an alert.
>
> thanks

Alert error text

Hi,
I looking for a property or global variable that would give me the alret
error text (like the one it sends in email response to an alert) . I need it
in my job which runs as a response to an alert.
thanksI think Gert Drapers has exactly what you need - using Alert Tokens... Few
people know about these, but they are so cool...
p" target="_blank">http://www.sqldev.net/sqlagent/SQLA...%20ste
p
Wayne Snyder, MCDBA, SQL Server MVP
Mariner, Charlotte, NC
www.mariner-usa.com
(Please respond only to the newsgroups.)
I support the Professional Association of SQL Server (PASS) and it's
community of SQL Server professionals.
www.sqlpass.org
"sonny" <sonny@.discussions.microsoft.com> wrote in message
news:28277FC8-95C2-4648-BED2-B34D1C78D7D0@.microsoft.com...
> Hi,
> I looking for a property or global variable that would give me the alret
> error text (like the one it sends in email response to an alert) . I need
> it
> in my job which runs as a response to an alert.
>
> thanks