Showing posts with label monitor. Show all posts
Showing posts with label monitor. Show all posts

Sunday, March 25, 2012

Alerts to be emailed to our team

We have a few procedures we want to monitor for issues... and want to know
how to enable alerts to notify our team when there is an issue..
We have error logging enabled within the procedure.. which is writing the
errors to a table, but unless we go out and view that table we dont know if
the procedure failed...
So what can we use within the SQL2005 to send our team an email that the
procedure failed?
we have alerts working with our scheduled Jobs but want to use it to alert
of the errors as they are written to the table or within the procedure..
whatever is easier...
--
ASP, SQL2005, DW8 VBScriptDaniel,
Provided this is not high-velocity stuff, but is fairly rare, you could add
an ON INSERT trigger to your audit table. That trigger could then do
something such as:
1. Use sp_send_dbmail to email your group
2. Use sp_start_job to start a SQL Agent job that could do whatever you
want, including sending the email.
3. Use RAISERROR to raise an alert that is configured to email, page, etc,
whoever you want to have know about this.
And so on.
If the errors were frequent it would probably be better to skip the trigger,
but create a scheduled job that occasionally runs (every hour?) and reports
on recent activity.
RLF
"Daniel" <dan_c@.h.com> wrote in message
news:O0Zij28fIHA.4260@.TK2MSFTNGP05.phx.gbl...
> We have a few procedures we want to monitor for issues... and want to know
> how to enable alerts to notify our team when there is an issue..
> We have error logging enabled within the procedure.. which is writing the
> errors to a table, but unless we go out and view that table we dont know
> if the procedure failed...
> So what can we use within the SQL2005 to send our team an email that the
> procedure failed?
> we have alerts working with our scheduled Jobs but want to use it to alert
> of the errors as they are written to the table or within the procedure..
> whatever is easier...
> --
> ASP, SQL2005, DW8 VBScript
>

Alerts to be emailed to our team

We have a few procedures we want to monitor for issues... and want to know
how to enable alerts to notify our team when there is an issue..
We have error logging enabled within the procedure.. which is writing the
errors to a table, but unless we go out and view that table we dont know if
the procedure failed...
So what can we use within the SQL2005 to send our team an email that the
procedure failed?
we have alerts working with our scheduled Jobs but want to use it to alert
of the errors as they are written to the table or within the procedure..
whatever is easier...
ASP, SQL2005, DW8 VBScript
Daniel,
Provided this is not high-velocity stuff, but is fairly rare, you could add
an ON INSERT trigger to your audit table. That trigger could then do
something such as:
1. Use sp_send_dbmail to email your group
2. Use sp_start_job to start a SQL Agent job that could do whatever you
want, including sending the email.
3. Use RAISERROR to raise an alert that is configured to email, page, etc,
whoever you want to have know about this.
And so on.
If the errors were frequent it would probably be better to skip the trigger,
but create a scheduled job that occasionally runs (every hour?) and reports
on recent activity.
RLF
"Daniel" <dan_c@.h.com> wrote in message
news:O0Zij28fIHA.4260@.TK2MSFTNGP05.phx.gbl...
> We have a few procedures we want to monitor for issues... and want to know
> how to enable alerts to notify our team when there is an issue..
> We have error logging enabled within the procedure.. which is writing the
> errors to a table, but unless we go out and view that table we dont know
> if the procedure failed...
> So what can we use within the SQL2005 to send our team an email that the
> procedure failed?
> we have alerts working with our scheduled Jobs but want to use it to alert
> of the errors as they are written to the table or within the procedure..
> whatever is easier...
> --
> ASP, SQL2005, DW8 VBScript
>

Tuesday, March 20, 2012

Alert for DeadLock

I am trying to create an alert to monitor deadlocks with following
specification.
Name = "Deadlock(s) detected . . ."
Type = "SQL Server performance condition alert.
Object = "SQL Server:Locks"
Counter = "Number of Deadlocks/sec"
Instance = "Database"
Alert if counter = "becomes equal to"
Value = "1"
Once the alert is created, I execute the deadlock script. But found that the
counter in alert is not increasing.
Can someone put some light on this? Am I missing something?why dont you just use SQL servers Deadlock monitoring?
Check out trace flags 1204, 1205
Immy
"ravi lobo" <ravilobo@.discussions.microsoft.com> wrote in message
news:0849692C-24D2-4424-BA4D-A49F0BF22F6C@.microsoft.com...
>I am trying to create an alert to monitor deadlocks with following
> specification.
> Name = "Deadlock(s) detected . . ."
> Type = "SQL Server performance condition alert.
> Object = "SQL Server:Locks"
> Counter = "Number of Deadlocks/sec"
> Instance = "Database"
> Alert if counter = "becomes equal to"
> Value = "1"
> Once the alert is created, I execute the deadlock script. But found that
> the
> counter in alert is not increasing.
> Can someone put some light on this? Am I missing something?|||I want a NOTIFICATION when ever dead lock happens.|||I would still use the inbuilt function from MS!
If you want to continue with your own method, you'll need to post your DDL
and SQL statements so we can offer some advice.
Immy
"ravi lobo" <ravilobo@.discussions.microsoft.com> wrote in message
news:75F4E5FD-0B99-47E6-90A3-EA887A4FD9FB@.microsoft.com...
>I want a NOTIFICATION when ever dead lock happens.|||[vbcol=seagreen]
How this works?|||See my previous post re: trace flags! :-)
"ravi lobo" <ravilobo@.discussions.microsoft.com> wrote in message
news:C5CB693A-CB0E-4E43-B743-0C51115361D8@.microsoft.com...
>
> How this works?
>
>

Alert for DeadLock

I am trying to create an alert to monitor deadlocks with following
specification.
Name = "Deadlock(s) detected . . ."
Type = "SQL Server performance condition alert.
Object = "SQL Server:Locks"
Counter = "Number of Deadlocks/sec"
Instance = "Database"
Alert if counter = "becomes equal to"
Value = "1"
Once the alert is created, I execute the deadlock script. But found that the
counter in alert is not increasing.
Can someone put some light on this? Am I missing something?why dont you just use SQL servers Deadlock monitoring?
Check out trace flags 1204, 1205
Immy
"ravi lobo" <ravilobo@.discussions.microsoft.com> wrote in message
news:0849692C-24D2-4424-BA4D-A49F0BF22F6C@.microsoft.com...
>I am trying to create an alert to monitor deadlocks with following
> specification.
> Name = "Deadlock(s) detected . . ."
> Type = "SQL Server performance condition alert.
> Object = "SQL Server:Locks"
> Counter = "Number of Deadlocks/sec"
> Instance = "Database"
> Alert if counter = "becomes equal to"
> Value = "1"
> Once the alert is created, I execute the deadlock script. But found that
> the
> counter in alert is not increasing.
> Can someone put some light on this? Am I missing something?|||I want a NOTIFICATION when ever dead lock happens.|||I would still use the inbuilt function from MS!
If you want to continue with your own method, you'll need to post your DDL
and SQL statements so we can offer some advice.
Immy
"ravi lobo" <ravilobo@.discussions.microsoft.com> wrote in message
news:75F4E5FD-0B99-47E6-90A3-EA887A4FD9FB@.microsoft.com...
>I want a NOTIFICATION when ever dead lock happens.|||>> I would still use the inbuilt function from MS!
How this works?|||See my previous post re: trace flags! :-)
"ravi lobo" <ravilobo@.discussions.microsoft.com> wrote in message
news:C5CB693A-CB0E-4E43-B743-0C51115361D8@.microsoft.com...
>> I would still use the inbuilt function from MS!
> How this works?
>
>sql

Saturday, February 25, 2012

Agents not appearing in Replication Monitor (SQL 2000)

During an upgrade, we had problems with PK errors on sp_MSget_repl_commands. I recreated the SP with the varbinary characteristic as we have seen in many posts and it was sucessful in starting. However, the sp now appears as a 'user' sp, not a 'system' sp, however I an not sure that is a real issue.

The problem I am seeing is that none of the agents are appearing in replication monitor under their agent folders. Replication appears to be working fine and the publications are showing on the distributor in the Replication Monitor - Publication folder under the appropriate publisher. But all of the agent specific folders (i.e. Snapshot agent, distribution agent, etc) are empty.

Another interesting point, is that if replication fails, the failure 'X' shows up on the Agents folder as well as the publisher, but again, no sign of the agent in the folder.

Thoughts?

this could be an upgrade bug where the underlying replication tables weren't updated properly, let me figure out what procs replication monitor calls to see what tables have wrong values.