Showing posts with label alert. Show all posts
Showing posts with label alert. Show all posts

Wednesday, March 21, 2012

Monitoring Transactional Replication (with pull subscribers) ! he

Have a look at the Replication Alerts for some of this -
specifically the Replication: agent failure alert.
To help troubleshoot errors, the replication history
tables (MSsnapshot_history, MSlogreader_history etc) are
used, either directly or through the GUI. Also, setting
the agents to log history to a text file can be extremely
useful and give a more granular type of error handling
capability (see http://support.microsoft.com/?id=312292).
To backup the log just do a normal backup. The log won't
be truncated of this work until the transaction has
finished and the log-reader has read the whole
transaction.
Rgds,
Paul Ibison SQL Server MVP, www.replicationanswers.com
(recommended sql server 2000 replication book:
http://www.nwsu.com/0974973602p.html)
also have a look at the msrepl_errors table in the distribution database.
Errors are logged here.
Hilary Cotter
Looking for a SQL Server replication book?
Now available for purchase at:
http://www.nwsu.com/0974973602.html
"Paul Ibison" <Paul.Ibison@.Pygmalion.Com> wrote in message
news:3ce301c4e287$c466a4a0$a301280a@.phx.gbl...
> Have a look at the Replication Alerts for some of this -
> specifically the Replication: agent failure alert.
> To help troubleshoot errors, the replication history
> tables (MSsnapshot_history, MSlogreader_history etc) are
> used, either directly or through the GUI. Also, setting
> the agents to log history to a text file can be extremely
> useful and give a more granular type of error handling
> capability (see http://support.microsoft.com/?id=312292).
> To backup the log just do a normal backup. The log won't
> be truncated of this work until the transaction has
> finished and the log-reader has read the whole
> transaction.
> Rgds,
> Paul Ibison SQL Server MVP, www.replicationanswers.com
> (recommended sql server 2000 replication book:
> http://www.nwsu.com/0974973602p.html)
>

Monday, March 19, 2012

Monitoring SQL Server with MOM

We have recently installed MOM and wish to customise the SQL Management Pack.
What are the top alerts (10-20) we should be looking to alert on?This very much depends on your requirements. We are monitoring the following
events:
1. severe SQL Server errors (severity 17 or higher)
2. a database becomes inaccessible (excluding the cases in which the
database is being restored or offline)
3. the SQL instance becomes inaccessible
4. any port binding failure
5. any backup failure
6. any SQL instance restarts
7. clustered SQL instance not running on the preferred node
8. clustered SQL instance failover
9. cluster node not up (mostly the one that doesn't have any SQL instance
running)
10. # of connections exceeding a threshold (had some rough apps not cleaning
up after itself)
11. Free space below a certain threshold
Linchi
"Court" wrote:
> We have recently installed MOM and wish to customise the SQL Management Pack.
> What are the top alerts (10-20) we should be looking to alert on?|||Many thanks for that.
"Linchi Shea" wrote:
> This very much depends on your requirements. We are monitoring the following
> events:
> 1. severe SQL Server errors (severity 17 or higher)
> 2. a database becomes inaccessible (excluding the cases in which the
> database is being restored or offline)
> 3. the SQL instance becomes inaccessible
> 4. any port binding failure
> 5. any backup failure
> 6. any SQL instance restarts
> 7. clustered SQL instance not running on the preferred node
> 8. clustered SQL instance failover
> 9. cluster node not up (mostly the one that doesn't have any SQL instance
> running)
> 10. # of connections exceeding a threshold (had some rough apps not cleaning
> up after itself)
> 11. Free space below a certain threshold
> Linchi
> "Court" wrote:
> > We have recently installed MOM and wish to customise the SQL Management Pack.
> > What are the top alerts (10-20) we should be looking to alert on?|||Hi, is it possible for you to provide example event id's?
"Linchi Shea" wrote:
> This very much depends on your requirements. We are monitoring the following
> events:
> 1. severe SQL Server errors (severity 17 or higher)
> 2. a database becomes inaccessible (excluding the cases in which the
> database is being restored or offline)
> 3. the SQL instance becomes inaccessible
> 4. any port binding failure
> 5. any backup failure
> 6. any SQL instance restarts
> 7. clustered SQL instance not running on the preferred node
> 8. clustered SQL instance failover
> 9. cluster node not up (mostly the one that doesn't have any SQL instance
> running)
> 10. # of connections exceeding a threshold (had some rough apps not cleaning
> up after itself)
> 11. Free space below a certain threshold
> Linchi
> "Court" wrote:
> > We have recently installed MOM and wish to customise the SQL Management Pack.
> > What are the top alerts (10-20) we should be looking to alert on?

Monitoring SQL Server with MOM

We have recently installed MOM and wish to customise the SQL Management Pack
.
What are the top alerts (10-20) we should be looking to alert on?This very much depends on your requirements. We are monitoring the following
events:
1. severe SQL Server errors (severity 17 or higher)
2. a database becomes inaccessible (excluding the cases in which the
database is being restored or offline)
3. the SQL instance becomes inaccessible
4. any port binding failure
5. any backup failure
6. any SQL instance restarts
7. clustered SQL instance not running on the preferred node
8. clustered SQL instance failover
9. cluster node not up (mostly the one that doesn't have any SQL instance
running)
10. # of connections exceeding a threshold (had some rough apps not cleaning
up after itself)
11. Free space below a certain threshold
Linchi
"Court" wrote:

> We have recently installed MOM and wish to customise the SQL Management Pa
ck.
> What are the top alerts (10-20) we should be looking to alert on?|||Many thanks for that.
"Linchi Shea" wrote:
[vbcol=seagreen]
> This very much depends on your requirements. We are monitoring the followi
ng
> events:
> 1. severe SQL Server errors (severity 17 or higher)
> 2. a database becomes inaccessible (excluding the cases in which the
> database is being restored or offline)
> 3. the SQL instance becomes inaccessible
> 4. any port binding failure
> 5. any backup failure
> 6. any SQL instance restarts
> 7. clustered SQL instance not running on the preferred node
> 8. clustered SQL instance failover
> 9. cluster node not up (mostly the one that doesn't have any SQL instance
> running)
> 10. # of connections exceeding a threshold (had some rough apps not cleani
ng
> up after itself)
> 11. Free space below a certain threshold
> Linchi
> "Court" wrote:
>|||Hi, is it possible for you to provide example event id's?
"Linchi Shea" wrote:
[vbcol=seagreen]
> This very much depends on your requirements. We are monitoring the followi
ng
> events:
> 1. severe SQL Server errors (severity 17 or higher)
> 2. a database becomes inaccessible (excluding the cases in which the
> database is being restored or offline)
> 3. the SQL instance becomes inaccessible
> 4. any port binding failure
> 5. any backup failure
> 6. any SQL instance restarts
> 7. clustered SQL instance not running on the preferred node
> 8. clustered SQL instance failover
> 9. cluster node not up (mostly the one that doesn't have any SQL instance
> running)
> 10. # of connections exceeding a threshold (had some rough apps not cleani
ng
> up after itself)
> 11. Free space below a certain threshold
> Linchi
> "Court" wrote:
>

monitoring sql error log for keywords

Hello,
We have Patrol monitoring running on our SQL Server 2000/2005 instances.
One of the alerts for Patrol is ErrorLogUpdates.
This sends out an alert when a particular keyword is found in the error log.
There are two parameters I can specify, INCLUDE keywords and EXCLUDE keywords.
I have been taking a look at quiet a few of our error logs and not making
any headway so far.
Does anyone have any suggestions as to what I can put in INCLUDE list and
EXCLUDE list of keywords to look for in SQL error log.
Thanks in advance.
Cheers.
Kunal.
Hi
Products like MOM come with preconfigured scripts, therefore I would expect
the software vendor to supply this.
John
"kunalap" wrote:

> Hello,
> We have Patrol monitoring running on our SQL Server 2000/2005 instances.
> One of the alerts for Patrol is ErrorLogUpdates.
> This sends out an alert when a particular keyword is found in the error log.
> There are two parameters I can specify, INCLUDE keywords and EXCLUDE keywords.
> I have been taking a look at quiet a few of our error logs and not making
> any headway so far.
> Does anyone have any suggestions as to what I can put in INCLUDE list and
> EXCLUDE list of keywords to look for in SQL error log.
> Thanks in advance.
> Cheers.
> Kunal.
|||First, you really have to determine what you want to be alerted on. For
instance, we monitor all the SQL errors with severity 17 or higher, backup
failure, port binding failure, restarts, and so on. Each of rthese error
types has a certain patterns that you can use. Unfortunately, MS has not been
very good at keeping the error messages consistent on many dimensions, making
life somewhat difficult.
Anyway, for port binding failure for instance, you can look for the
following text string; "SuperSocket Info: Bind failed on TCP port", and for
severe SQL errors, you may want to enumerate all the patterns like "Severity:
17", replacing 17 with 18, 19, 20, and so on. Patrol has a perl like language
and should be very easy to specific a regular expression pattern here.
Linchi
"kunalap" wrote:

> Hello,
> We have Patrol monitoring running on our SQL Server 2000/2005 instances.
> One of the alerts for Patrol is ErrorLogUpdates.
> This sends out an alert when a particular keyword is found in the error log.
> There are two parameters I can specify, INCLUDE keywords and EXCLUDE keywords.
> I have been taking a look at quiet a few of our error logs and not making
> any headway so far.
> Does anyone have any suggestions as to what I can put in INCLUDE list and
> EXCLUDE list of keywords to look for in SQL error log.
> Thanks in advance.
> Cheers.
> Kunal.

Monitoring Queue status

Hi,

I'm new to the service broker service. All I want to do is to monitor the queue status. If the queue is disabled, send me an email alert.

Can you let me know what's the best way to accomplish it?

Thanks,

Jia

if ((select is_receive_enabled from sys.service_queues where name = 'PublisherQueue ') = 0)

begin

execute msdb.dbo.sp_send_dbmail 'MyDBMail', 'me@.abc.com', @.subject = 'queue is down'

end

|||

You could use SQL Trace Events to do this for you. Here are the steps... you can lookup Books Online for exact syntax on what statements you need to use to achieve this:

1. Create a Service that will get notified whenever your queue gets disabled. Make sure that the service implements the PostEventNotificationContract (the actual name is a big URL I haven't memorized... look at sys.service_message_types).

2. Write a service program (as a stored proc) for the above service that accepts event notification messages from the service queue, parses the required information and sends e-mail via DBMail.

3. Create an event notification for QUEUE_DISABLED_EVENT for your user queue.

When your user queue gets disabled, the event service will receive an event message. Activation will launch your service program which will send you an e-mail.

|||Thanks Rushi!

Saturday, February 25, 2012

Monitor for 60% server utilization...

I want to monitor a SQL server to alert me when the
server is at 60% utilization. Ideally I want to know
which counters to look for, such as total memory, %
Processor Time, Available memory, anything you can think
of that is relevant. I know sql performance jumps but
maybe over a 15 or 30 second interval, average the
counters and if they average over 60% to send out an
alert.
Question one: Which Perfmon counters would you watch for
to determine what percentage utilized the server is
running at.
Question two: Can you think of an easier way to find
server utilization. Where I can say, "Check this, if its
at this level your server is at 60% utilized."
Question three: Can you tell perfmon to monitor counters
and average them over 30 second intervals and send alerts
when any consecutive 30 seconds maintains 60% utilized.
Are you looking to identify a problem? 60% of what? Disk? Memory? CPU? ?
"Tim" <anonymous@.discussions.microsoft.com> wrote in message
news:326e01c47e89$58f00200$a401280a@.phx.gbl...
>I want to monitor a SQL server to alert me when the
> server is at 60% utilization. Ideally I want to know
> which counters to look for, such as total memory, %
> Processor Time, Available memory, anything you can think
> of that is relevant. I know sql performance jumps but
> maybe over a 15 or 30 second interval, average the
> counters and if they average over 60% to send out an
> alert.
> Question one: Which Perfmon counters would you watch for
> to determine what percentage utilized the server is
> running at.
> Question two: Can you think of an easier way to find
> server utilization. Where I can say, "Check this, if its
> at this level your server is at 60% utilized."
> Question three: Can you tell perfmon to monitor counters
> and average them over 30 second intervals and send alerts
> when any consecutive 30 seconds maintains 60% utilized.
|||Memory and CPU. Just trying to figure out when the
server is going to needs some help, Either more memory or
another SQL Server.
>--Original Message--
>Are you looking to identify a problem? 60% of what?
Disk? Memory? CPU? ?
>
>"Tim" <anonymous@.discussions.microsoft.com> wrote in
message[vbcol=seagreen]
>news:326e01c47e89$58f00200$a401280a@.phx.gbl...
think[vbcol=seagreen]
for[vbcol=seagreen]
its[vbcol=seagreen]
counters[vbcol=seagreen]
alerts[vbcol=seagreen]
utilized.
>
>.
>
|||anonymous@.discussions.microsoft.com wrote:
> Memory and CPU. Just trying to figure out when the
> server is going to needs some help, Either more memory or
> another SQL Server.
Or more tuning...
David G.
|||Hi,
1] I often use the following counters to get an initial overview of CPU
and memory :
For CPU :
Processor.%ProcessorTime, and Process.%ProcessorTime[SQLServr]. This
tells me how busy the server is, and whether it is being used by SQL Server.
System.ProcessorQueueLength. Should not be more than 2 per processor.
For Memory :
Memory.PageFaults/s. This should be low, otherwise your system is
constantly going to disk for memory
SQLServer:BufferManager.BufferCacheHitRatio. This should be high,
meaning SQL is finding all its data in memory.
Total Memory and Available memory are not that meaningfull, as SQL
doesnt release memory until another application needs it.
2] There are some really good tools out there that monitor these
counters, and raise alerts when thresholds are reached. I've used Quest
Spotlight, and BMC's DBXray.
3] Some of the perfmon counters are averaged over your sample interval,
others are a 'snapshot' at the time the sample is taken. I dont think
this is configurable.
If you want to be alerted when a threshold value is exceeded, you can
configure perfmon "alerts" to alert you.
thanks
Ian
iank@.iworks.co.za
Tim wrote:
> I want to monitor a SQL server to alert me when the
> server is at 60% utilization. Ideally I want to know
> which counters to look for, such as total memory, %
> Processor Time, Available memory, anything you can think
> of that is relevant. I know sql performance jumps but
> maybe over a 15 or 30 second interval, average the
> counters and if they average over 60% to send out an
> alert.
> Question one: Which Perfmon counters would you watch for
> to determine what percentage utilized the server is
> running at.
> Question two: Can you think of an easier way to find
> server utilization. Where I can say, "Check this, if its
> at this level your server is at 60% utilized."
> Question three: Can you tell perfmon to monitor counters
> and average them over 30 second intervals and send alerts
> when any consecutive 30 seconds maintains 60% utilized.

Monday, February 20, 2012

MOM Alert when tempdb size grows > 40GB

I am trying to setup a MOM Alert for when a tempdb grows in size above 40GB.
How can this be setup? thanks for any helpI have no idea what MOM is, but here is a code snipit that will get you the
raw data.
-- cut --
use tempdb
if object_id('#FileStats') is not null and
objectproperty(object_id('#FileStats'), 'IsTable') = 1
drop table #FileStats
DECLARE @.DB SYSNAME
DECLARE @.SQL NVARCHAR(4000)
CREATE TABLE #FileStats(
[FileId] INT,
[FileGroup] INT,
[TotalExtents] INT,
[UsedExtents] INT,
[Name] sysname,
[Filename] varchar(255)
)
SET @.DB = 'tempdb'
DELETE FROM #FileStats
SET @.SQL = 'USE ' + @.DB + '; INSERT INTO #FileStats EXEC (''DBCC
SHOWFILESTATS WITH NO_INFOMSGS '')'
EXEC (@.SQL)
SELECT 'Size of tempdb is',
TotalExtents * 64/1024.,
'MB'
FROM #FileStats
-- cut --
"alastairn" <alastairn@.discussions.microsoft.com> wrote in message
news:D0242787-B639-4C5B-9426-437E1234F9DF@.microsoft.com...
>I am trying to setup a MOM Alert for when a tempdb grows in size above
>40GB.
> How can this be setup? thanks for any help
>|||MOM is Microsoft Operations Manager - an application for monitoring windows
OS and various server applications (such as exchange, sql server, etc).
I would investigate what is available from the SQL Server management pack
for MOM.
--
Kevin G. Boles
TheSQLGuru
Indicium Resources, Inc.
"Jay" <spam@.nospam.org> wrote in message
news:e2BWVfMEIHA.4684@.TK2MSFTNGP06.phx.gbl...
>I have no idea what MOM is, but here is a code snipit that will get you the
>raw data.
> -- cut --
> use tempdb
> if object_id('#FileStats') is not null and
> objectproperty(object_id('#FileStats'), 'IsTable') = 1
> drop table #FileStats
> DECLARE @.DB SYSNAME
> DECLARE @.SQL NVARCHAR(4000)
> CREATE TABLE #FileStats(
> [FileId] INT,
> [FileGroup] INT,
> [TotalExtents] INT,
> [UsedExtents] INT,
> [Name] sysname,
> [Filename] varchar(255)
> )
> SET @.DB = 'tempdb'
> DELETE FROM #FileStats
> SET @.SQL = 'USE ' + @.DB + '; INSERT INTO #FileStats EXEC (''DBCC
> SHOWFILESTATS WITH NO_INFOMSGS '')'
> EXEC (@.SQL)
> SELECT 'Size of tempdb is',
> TotalExtents * 64/1024.,
> 'MB'
> FROM #FileStats
> -- cut --
> "alastairn" <alastairn@.discussions.microsoft.com> wrote in message
> news:D0242787-B639-4C5B-9426-437E1234F9DF@.microsoft.com...
>>I am trying to setup a MOM Alert for when a tempdb grows in size above
>>40GB.
>> How can this be setup? thanks for any help
>>
>

MOM Alert when login failed for user 'sa'

I am trying to setup a MOM Alert when the SA account fails to login to SQL,
How can this be setup so SQL reports this into the windows event viewer and
not its own log?
Many thanks for any help,
AlastairIt does get logged in the application event log whenever login failure
happens for any account. (Standard install)
However, you can create a rule in MOM to capture error id:18456 with error
desc like "Login failed for user 'sa'".
--
Thank you,
Saleem Hakani
HTTP://WWW.SQLCOMMUNITY.COM (SQL Server Community)
SQLTips, SQL Forums, SQL Blogs, SQL RADIO, SQL Events, SQL Scripts, SQL
Articles, SQL Clinic and a lot of SQL fun.
"alastairn" wrote:
> I am trying to setup a MOM Alert when the SA account fails to login to SQL,
> How can this be setup so SQL reports this into the windows event viewer and
> not its own log?
> Many thanks for any help,
> Alastair
>|||Thanks for the fast response and help :)
"Saleem Hakani" wrote:
> It does get logged in the application event log whenever login failure
> happens for any account. (Standard install)
> However, you can create a rule in MOM to capture error id:18456 with error
> desc like "Login failed for user 'sa'".
> --
> Thank you,
> Saleem Hakani
> HTTP://WWW.SQLCOMMUNITY.COM (SQL Server Community)
> SQLTips, SQL Forums, SQL Blogs, SQL RADIO, SQL Events, SQL Scripts, SQL
> Articles, SQL Clinic and a lot of SQL fun.
>
> "alastairn" wrote:
> > I am trying to setup a MOM Alert when the SA account fails to login to SQL,
> > How can this be setup so SQL reports this into the windows event viewer and
> > not its own log?
> >
> > Many thanks for any help,
> > Alastair
> >