Showing posts with label monito. Show all posts
Showing posts with label monito. Show all posts

Friday, March 9, 2012

Monitoring connections

I have been ask to monito the connections on an MSSQL2000 box. If the
connections are greater than 50, this gentlemen would like an email. Any
suggestions on how I can accomplish this? Can I use an Alert? If so, could
you point me in the direction of how to implement it?
Thanks,
Jeff
Jeff wrote:
> I have been ask to monito the connections on an MSSQL2000 box. If the
> connections are greater than 50, this gentlemen would like an email.
> Any suggestions on how I can accomplish this? Can I use an Alert?
> If so, could you point me in the direction of how to implement it?
> Thanks,
> Jeff
You can easily define the alert from SQL EM (SQL Server Agent needs to
be running). Here's the SQL to do it manually. THe easiest way to do
this is from SQL EM and then script out the T-SQL and modify
accordingly.
IF (EXISTS (SELECT name FROM msdb.dbo.sysalerts WHERE name = N'Over50'))
-- Delete the alert with the same name.
EXECUTE msdb.dbo.sp_delete_alert @.name = N'Over50'
BEGIN
EXECUTE msdb.dbo.sp_add_alert @.name = N'Over50', @.message_id = 0,
@.severity = 0, @.enabled = 1, @.delay_between_responses = 1800,
@.notification_message = N'SQL Server now has over 50 connections',
@.performance_condition = N'SQLServer:General Statistics|User
Connections||>|50', @.include_event_description_in = 5, @.category_name =
N'[Uncategorized]'
EXECUTE msdb.dbo.sp_add_notification @.alert_name = N'Over50',
@.operator_name = N'Operator Name', @.notification_method = 1
END
David Gugick
Imceda Software
www.imceda.com
|||First, thanks for the help. I do have another question that I just can't
seem to figure out. I get this error message when executing the code:
Server: Msg 14262, Level 16, State 1, Procedure
sp_verify_performance_condition, Line 46
The specified object_name ('SQLServer:General Statistics') does not exist.
Server: Msg 14262, Level 16, State 1, Procedure sp_verify_notification, Line
26
The specified @.alert_name ('Over50') does not exist.
Any idea what is wrong?
Thanks,
Jeff
"David Gugick" <davidg-nospam@.imceda.com> wrote in message
news:ONEhUiDFFHA.2452@.TK2MSFTNGP09.phx.gbl...
> Jeff wrote:
> You can easily define the alert from SQL EM (SQL Server Agent needs to
> be running). Here's the SQL to do it manually. THe easiest way to do
> this is from SQL EM and then script out the T-SQL and modify
> accordingly.
> IF (EXISTS (SELECT name FROM msdb.dbo.sysalerts WHERE name = N'Over50'))
> -- Delete the alert with the same name.
> EXECUTE msdb.dbo.sp_delete_alert @.name = N'Over50'
> BEGIN
> EXECUTE msdb.dbo.sp_add_alert @.name = N'Over50', @.message_id = 0,
> @.severity = 0, @.enabled = 1, @.delay_between_responses = 1800,
> @.notification_message = N'SQL Server now has over 50 connections',
> @.performance_condition = N'SQLServer:General Statistics|User
> Connections||>|50', @.include_event_description_in = 5, @.category_name =
> N'[Uncategorized]'
> EXECUTE msdb.dbo.sp_add_notification @.alert_name = N'Over50',
> @.operator_name = N'Operator Name', @.notification_method = 1
> END
>
> --
> David Gugick
> Imceda Software
> www.imceda.com
>
|||Jeff wrote:[vbcol=seagreen]
> First, thanks for the help. I do have another question that I just
> can't seem to figure out. I get this error message when executing
> the code:
> Server: Msg 14262, Level 16, State 1, Procedure
> sp_verify_performance_condition, Line 46
> The specified object_name ('SQLServer:General Statistics') does not
> exist. Server: Msg 14262, Level 16, State 1, Procedure
> sp_verify_notification, Line 26
> The specified @.alert_name ('Over50') does not exist.
> Any idea what is wrong?
> Thanks,
> Jeff
>
> "David Gugick" <davidg-nospam@.imceda.com> wrote in message
> news:ONEhUiDFFHA.2452@.TK2MSFTNGP09.phx.gbl...
Create the alert in SQL EM yourself and then script it out. The code I
sent may be somehow linked to my setup. Make sure the SQL Server Agent
is running. If your performance counters are missing, you'll probably
see this from SQL EM.
David Gugick
Imceda Software
www.imceda.com

Monitoring connections

I have been ask to monito the connections on an MSSQL2000 box. If the
connections are greater than 50, this gentlemen would like an email. Any
suggestions on how I can accomplish this? Can I use an Alert? If so, could
you point me in the direction of how to implement it?
Thanks,
JeffJeff wrote:
> I have been ask to monito the connections on an MSSQL2000 box. If the
> connections are greater than 50, this gentlemen would like an email.
> Any suggestions on how I can accomplish this? Can I use an Alert?
> If so, could you point me in the direction of how to implement it?
> Thanks,
> Jeff
You can easily define the alert from SQL EM (SQL Server Agent needs to
be running). Here's the SQL to do it manually. THe easiest way to do
this is from SQL EM and then script out the T-SQL and modify
accordingly.
IF (EXISTS (SELECT name FROM msdb.dbo.sysalerts WHERE name = N'Over50'))
-- Delete the alert with the same name.
EXECUTE msdb.dbo.sp_delete_alert @.name = N'Over50'
BEGIN
EXECUTE msdb.dbo.sp_add_alert @.name = N'Over50', @.message_id = 0,
@.severity = 0, @.enabled = 1, @.delay_between_responses = 1800,
@.notification_message = N'SQL Server now has over 50 connections',
@.performance_condition = N'SQLServer:General Statistics|User
Connections||>|50', @.include_event_description_in = 5, @.category_name =
N'[Uncategorized]'
EXECUTE msdb.dbo.sp_add_notification @.alert_name = N'Over50',
@.operator_name = N'Operator Name', @.notification_method = 1
END
David Gugick
Imceda Software
www.imceda.com|||First, thanks for the help. I do have another question that I just can't
seem to figure out. I get this error message when executing the code:
Server: Msg 14262, Level 16, State 1, Procedure
sp_verify_performance_condition, Line 46
The specified object_name ('SQLServer:General Statistics') does not exist.
Server: Msg 14262, Level 16, State 1, Procedure sp_verify_notification, Line
26
The specified @.alert_name ('Over50') does not exist.
Any idea what is wrong?
Thanks,
Jeff
"David Gugick" <davidg-nospam@.imceda.com> wrote in message
news:ONEhUiDFFHA.2452@.TK2MSFTNGP09.phx.gbl...
> Jeff wrote:
> You can easily define the alert from SQL EM (SQL Server Agent needs to
> be running). Here's the SQL to do it manually. THe easiest way to do
> this is from SQL EM and then script out the T-SQL and modify
> accordingly.
> IF (EXISTS (SELECT name FROM msdb.dbo.sysalerts WHERE name = N'Over50'))
> -- Delete the alert with the same name.
> EXECUTE msdb.dbo.sp_delete_alert @.name = N'Over50'
> BEGIN
> EXECUTE msdb.dbo.sp_add_alert @.name = N'Over50', @.message_id = 0,
> @.severity = 0, @.enabled = 1, @.delay_between_responses = 1800,
> @.notification_message = N'SQL Server now has over 50 connections',
> @.performance_condition = N'SQLServer:General Statistics|User
> Connections||>|50', @.include_event_description_in = 5, @.category_name =
> N'[Uncategorized]'
> EXECUTE msdb.dbo.sp_add_notification @.alert_name = N'Over50',
> @.operator_name = N'Operator Name', @.notification_method = 1
> END
>
> --
> David Gugick
> Imceda Software
> www.imceda.com
>|||Jeff wrote:[vbcol=seagreen]
> First, thanks for the help. I do have another question that I just
> can't seem to figure out. I get this error message when executing
> the code:
> Server: Msg 14262, Level 16, State 1, Procedure
> sp_verify_performance_condition, Line 46
> The specified object_name ('SQLServer:General Statistics') does not
> exist. Server: Msg 14262, Level 16, State 1, Procedure
> sp_verify_notification, Line 26
> The specified @.alert_name ('Over50') does not exist.
> Any idea what is wrong?
> Thanks,
> Jeff
>
> "David Gugick" <davidg-nospam@.imceda.com> wrote in message
> news:ONEhUiDFFHA.2452@.TK2MSFTNGP09.phx.gbl...
Create the alert in SQL EM yourself and then script it out. The code I
sent may be somehow linked to my setup. Make sure the SQL Server Agent
is running. If your performance counters are missing, you'll probably
see this from SQL EM.
David Gugick
Imceda Software
www.imceda.com

Monitoring connections

I have been ask to monito the connections on an MSSQL2000 box. If the
connections are greater than 50, this gentlemen would like an email. Any
suggestions on how I can accomplish this? Can I use an Alert? If so, could
you point me in the direction of how to implement it?
Thanks,
JeffJeff wrote:
> I have been ask to monito the connections on an MSSQL2000 box. If the
> connections are greater than 50, this gentlemen would like an email.
> Any suggestions on how I can accomplish this? Can I use an Alert?
> If so, could you point me in the direction of how to implement it?
> Thanks,
> Jeff
You can easily define the alert from SQL EM (SQL Server Agent needs to
be running). Here's the SQL to do it manually. THe easiest way to do
this is from SQL EM and then script out the T-SQL and modify
accordingly.
IF (EXISTS (SELECT name FROM msdb.dbo.sysalerts WHERE name = N'Over50'))
-- Delete the alert with the same name.
EXECUTE msdb.dbo.sp_delete_alert @.name = N'Over50'
BEGIN
EXECUTE msdb.dbo.sp_add_alert @.name = N'Over50', @.message_id = 0,
@.severity = 0, @.enabled = 1, @.delay_between_responses = 1800,
@.notification_message = N'SQL Server now has over 50 connections',
@.performance_condition = N'SQLServer:General Statistics|User
Connections||>|50', @.include_event_description_in = 5, @.category_name =N'[Uncategorized]'
EXECUTE msdb.dbo.sp_add_notification @.alert_name = N'Over50',
@.operator_name = N'Operator Name', @.notification_method = 1
END
David Gugick
Imceda Software
www.imceda.com|||First, thanks for the help. I do have another question that I just can't
seem to figure out. I get this error message when executing the code:
Server: Msg 14262, Level 16, State 1, Procedure
sp_verify_performance_condition, Line 46
The specified object_name ('SQLServer:General Statistics') does not exist.
Server: Msg 14262, Level 16, State 1, Procedure sp_verify_notification, Line
26
The specified @.alert_name ('Over50') does not exist.
Any idea what is wrong?
Thanks,
Jeff
"David Gugick" <davidg-nospam@.imceda.com> wrote in message
news:ONEhUiDFFHA.2452@.TK2MSFTNGP09.phx.gbl...
> Jeff wrote:
> > I have been ask to monito the connections on an MSSQL2000 box. If the
> > connections are greater than 50, this gentlemen would like an email.
> > Any suggestions on how I can accomplish this? Can I use an Alert?
> > If so, could you point me in the direction of how to implement it?
> >
> > Thanks,
> > Jeff
> You can easily define the alert from SQL EM (SQL Server Agent needs to
> be running). Here's the SQL to do it manually. THe easiest way to do
> this is from SQL EM and then script out the T-SQL and modify
> accordingly.
> IF (EXISTS (SELECT name FROM msdb.dbo.sysalerts WHERE name = N'Over50'))
> -- Delete the alert with the same name.
> EXECUTE msdb.dbo.sp_delete_alert @.name = N'Over50'
> BEGIN
> EXECUTE msdb.dbo.sp_add_alert @.name = N'Over50', @.message_id = 0,
> @.severity = 0, @.enabled = 1, @.delay_between_responses = 1800,
> @.notification_message = N'SQL Server now has over 50 connections',
> @.performance_condition = N'SQLServer:General Statistics|User
> Connections||>|50', @.include_event_description_in = 5, @.category_name => N'[Uncategorized]'
> EXECUTE msdb.dbo.sp_add_notification @.alert_name = N'Over50',
> @.operator_name = N'Operator Name', @.notification_method = 1
> END
>
> --
> David Gugick
> Imceda Software
> www.imceda.com
>|||Jeff wrote:
> First, thanks for the help. I do have another question that I just
> can't seem to figure out. I get this error message when executing
> the code:
> Server: Msg 14262, Level 16, State 1, Procedure
> sp_verify_performance_condition, Line 46
> The specified object_name ('SQLServer:General Statistics') does not
> exist. Server: Msg 14262, Level 16, State 1, Procedure
> sp_verify_notification, Line 26
> The specified @.alert_name ('Over50') does not exist.
> Any idea what is wrong?
> Thanks,
> Jeff
>
> "David Gugick" <davidg-nospam@.imceda.com> wrote in message
> news:ONEhUiDFFHA.2452@.TK2MSFTNGP09.phx.gbl...
>> Jeff wrote:
>> I have been ask to monito the connections on an MSSQL2000 box. If
>> the connections are greater than 50, this gentlemen would like an
>> email. Any suggestions on how I can accomplish this? Can I use an
>> Alert?
>> If so, could you point me in the direction of how to implement it?
>> Thanks,
>> Jeff
>> You can easily define the alert from SQL EM (SQL Server Agent needs
>> to be running). Here's the SQL to do it manually. THe easiest way to
>> do this is from SQL EM and then script out the T-SQL and modify
>> accordingly.
>> IF (EXISTS (SELECT name FROM msdb.dbo.sysalerts WHERE name =>> N'Over50')) -- Delete the alert with the same name.
>> EXECUTE msdb.dbo.sp_delete_alert @.name = N'Over50'
>> BEGIN
>> EXECUTE msdb.dbo.sp_add_alert @.name = N'Over50', @.message_id = 0,
>> @.severity = 0, @.enabled = 1, @.delay_between_responses = 1800,
>> @.notification_message = N'SQL Server now has over 50 connections',
>> @.performance_condition = N'SQLServer:General Statistics|User
>> Connections||>|50', @.include_event_description_in = 5,
>> @.category_name = N'[Uncategorized]'
>> EXECUTE msdb.dbo.sp_add_notification @.alert_name = N'Over50',
>> @.operator_name = N'Operator Name', @.notification_method = 1
>> END
>>
>> --
>> David Gugick
>> Imceda Software
>> www.imceda.com
Create the alert in SQL EM yourself and then script it out. The code I
sent may be somehow linked to my setup. Make sure the SQL Server Agent
is running. If your performance counters are missing, you'll probably
see this from SQL EM.
--
David Gugick
Imceda Software
www.imceda.com

Saturday, February 25, 2012

Monitor Database up or down and email to DBA

HI,

I like to know what different tools and scripts different people are using to monitor their SQL 2005 Databases.

We need to monito two services they are up and running all the time.

MSSQLServer & SQLAgent

Currently we have 3 different sql 2005 server and each one have 4 databases, we like to monitor.

Thanks in advance

I hear good things about Quest's Spotlight and Idera's Diagnostic Manager, but haven't worked with either enough to be able to recommend them myself.

Ask in the tools group (http://groups.google.com/group/microsoft.public.sqlserver.tools) or the Tools forum (http://forums.microsoft.com/MSDN/ShowForum.aspx?ForumID=84&SiteID=1)

HTH...

Joe