Appendix. SQL Sentry Quick Start, Sentry 2.0
SQL Sentry Quick Start is a guide that helps you quickly install and configure SQL Sentry software. It covers basic installation and setup steps, such as adding users and groups, monitoring connections, and customizing global settings. The guide helps you get started with SQL Sentry and manage events across your enterprise within 10 to 30 minutes. The guide focuses on initial setup and doesn't cover advanced topics like visual job calendars or performance monitoring. For more information, refer to the SQL Sentry User Guide.
Advertisement
Advertisement
SQL Sentry Quick Start 34
10 Appendix
The Appendix contains the following topics:
SQL Sentry Performance Advisor
Performance Advisor Security Requirements
Performance Advisor Required Ports
Performance Advisor Data Capacity Planning
Object Removal Script for Watched 2000 Servers
Object Removal Script for Watched 2005+ Servers
Standard Vs Enterprise Editions
10.1
SQL Sentry Performance Advisor
PERFORMANCE ADVISOR
This section contains the following topics:
Performance Advisor Security Requirements
Performance Advisor Required Ports
Performance Advisor Data Capacity Planning
For general information concerning SQL Sentry Performance Advisor, including an explanation of the
Performance Metrics displayed on the Dashboard, please see the Performance Advisor section of the
SQL Sentry User Guide.
10.1.1
Performance Advisor Security Requirements
Performance Advisor collects various performance and configuration data directly from Windows, and therefore requires a higher level of access to the operating system than does Event Manager. The easiest approach is to either make the SQL Sentry Monitoring Service account a Domain Administrator level account, or a member of the local Administrators group on any watched servers.
In some scenarios it may be possible to use a non-Administrator service account, although this is not an officially supported approach. This article identifies the steps required to do this:
1. Enable DCOM on the SQL Sentry Server machine, SQL Sentry Client machine, and the server to be watched. (See this link for instructions.)
2. Give the SQL Sentry Monitoring Service account proper permissions to the required WMI namespaces. You can do this by going to the properties for "WMI Control", found under
©2015 SQL Sentry. All Rights Reserved.
SQL Sentry Quick Start 35
"Services and Applications" in the Computer Management Client. On the Security tab, ensure that the SQL Sentry Monitoring Service account has at least "Enable Account" and "Remote
Enable" checked for the CIMV2 and WMI nodes.
NOTE: WMI providers and versions will vary from server to server, and whether or not non- administrative access will function properly for a particular WMI provider is directly dependent on whether or not the provider was designed to support this. Many providers simply are not, including many designed by Microsoft.
Please consider the following example:
SERVER-A is the exact same make and model as SERVER-B, and both servers are on the same domain.
The SQL Sentry Monitoring Service user account is a Domain User, but does not have Administrator privileges on either server. Performance Advisor can successfully watch SERVER-A, but is unable to watch SERVER-B. The two servers are configured identically, with one exception -- an additional network adapter from Acme Networking was installed in SERVER-B. Unfortunately, Acme Networking didn't design the associated WMI provider to support non-administrative access, therefore
Performance Advisor will not be able to successfully watch SERVER-B as a non-Administrator. In this scenario, the only options are to either replace the network adapter with one that is known to support non-administrative access, or to contact Acme Networking to see if they have an updated version of the provider that supports non-administrative access.
10.1.2
Performance Advisor Required Ports
In order for Performance Advisor to properly monitor a server on the network, the following ports on the monitored server must be accessible to the SQL Sentry Server machine(s):
For SQL Server access: tcp 1433 (or whatever port is used by SQL Server)
For Windows Performance Counter access: tcp 445 (SMB, RPC/NP)
For WMI access: tcp 135 (RPC)
-andone of these ranges: tcp 49152-65535 (RPC dynamic ports -- Vista and Win2008)
-ortcp 1024-65535 (RPC dynamic ports -- NT4, Win2000, Win2003)
-ora custom RPC dynamic port range (see below)
The only one that may be tricky for firewalls are the RPC dynamic ports. WMI (or any other process
©2015 SQL Sentry. All Rights Reserved.
SQL Sentry Quick Start 36
that uses DCOM) connects to a target server initially using port 135, and the target responds with a dynamic port number for WMI to use for the rest of the session. This port can be in one of the ranges above, which are quite large by default.
To address this, you can easily specify a custom range for RPC dynamic ports. You may have already done this in your environment in order to enable networked DCOM access for other applications. It is recommended that you start no lower than port 50000, and allocate no fewer than
255 dynamic ports.
For example, to do this on Server 2008, you can use this command: netsh int ipv4 set dynamicport tcp start=50000 num=255
You may need to reboot. More info: http://support.microsoft.com/default.aspx/kb/929851
On other Windows versions, you can use DCOM config in Component Services
( http://support.microsoft.com/kb/300083 ) or the registry ( http://support.microsoft.com/kb/154596 ).
You will need to reboot.
You will also need to have your network administrator open up the same port range on the firewall between the SQL Sentry Server machine and any servers monitored with PA.
How to configure RPC dynamic port allocation to work with firewalls http://support.microsoft.com/kb/154596
How To Restrict TCP/IP Ports on Windows 2000 and Windows XP http://support.microsoft.com/kb/300083
How to troubleshoot WMI-related issues in Windows XP SP2 http://support.microsoft.com/kb/875605
DCOM port range configuration problems http://support.microsoft.com/default.aspx/kb/217351
The default dynamic port range for TCP/IP has changed in Windows Vista and in Windows Server 2008 http://support.microsoft.com/default.aspx/kb/929851
Service overview and network port requirements for the Windows Server system http://support.microsoft.com/kb/300083
.
SEE ALSO
©2015 SQL Sentry. All Rights Reserved.
SQL Sentry Quick Start 37
10.1.3
Performance Advisor Data Capacity Planning
PERFORMANCE ADVISOR DATA CAPACITY PLANNING
Performance Advisor (PA) uses the SQLSentry database to store all of the performance data it collects, utilizing a high performance storage scheme. Event Manager (EM) only users should expect their
existing database to approximately double in size if all of the existing SQL Servers watched by EM, are watched by PA. This is a very rough estimate, however, since exactly how much space will be used by PA is directly dependent on:
The number of databases on the watched SQL Servers, since some of the performance counters collected by PA are database specific.
The number of physical disks on the watched servers, since related counters are disk specific.
The Minimum Duration specified for the Top SQL event source. The default global setting is five seconds, meaning that any batches or stored procedures that run for longer than five seconds will be collected. If this threshold is lowered, the amount of Top SQL data collected will increase. Note that a different Minimum Duration can be specified for each SQL Server.
Whether or not "Collect Statement Events" is set to True for the Top SQL event source. The default is False. If enabled, this may increase the amount of Top SQL data collected by a factor of two or more. This setting is also adjustable for each SQL Server.
The performance data retention settings. Different settings can be specified for detailed (or raw) performance data, rolled up performance data, and Top SQL/Blocking SQL/Deadlock data.
For detailed performance data, retention is specified in hours for each performance counter category in the HistoryDataRetentionHours column of the
PerformanceAnalysisCounterCategory table. The default may be either 48 or 72 hours, depending on the category. Raw data is shown by default on the Dashboard and Disk
Activity tabs whenever the current date range is <=30 minutes. Over 30 minutes, rolled up data is used.
If you have an unusually large number of databases on SQL Servers monitored by
PA, you may consider reducing the retention hours for the SQLSERVER:DATABASES and SQLPERF:VIRTUAL_FILESTATS categories. Data for these categories are stored in the PerformanceAnalysisDataDatabaseCounter and
PerformanceAnalysisDataDiskCounter tables respectively.
Likewise, if you have an unusually large number of physical disks per server monitored by PA, you may consider reducing the retention hours for the
PHYSICALDISK category. Data for this category is stored in the
PerformanceAnalysisDataDiskCounter table.
Data for all other categories is stored in the PerformanceAnalysisData table.
Generally, it is a good idea to keep the retention hours the same for categories that are stored in the same table, otherwise page splitting and fragmentation may result during the pruning process which may eventually affect performance.
For rolled up performance data, retention is specified in hours for each rollup level in the
HistoryDataRetentionHours column of the PerformanceAnalysisDataRollupLevel table.
Rollup data for each break level (specified by the LevelBreakMinutes column) is stored in a separate table, all named PerformanceAnalysisDataRollupXX, where XX represents the ID of the break level. In general, the only rollup table that may get large is the table for
©2015 SQL Sentry. All Rights Reserved.
SQL Sentry Quick Start 38
the two minute break level, or PerformanceAnalysisDataRollup2. The retention hours for this, or any other break level, can be adjusted as needed.
Retention for raw Top SQL, Blocking and Deadlock data is controlled by the Purge History
Older Than setting on the Performance Monitor tab under SQL Sentry Server->Settings in the Navigator pane. The default is 15 days.
If you are using EM with PA, which enables viewing PA data on the EM calendar, the raw
Top SQL, Blocking, and Deadlock data is also converted to the native EM storage format and stored in the EventSourceHistory table alongside data for other EM event sources like
SQL Agent Jobs and DTS. Retention for all EM sources is controlled by the Purge History
Older Than setting on the Event History Monitor tab under SQL Sentry Server->Settings in the Navigator pane.
Expired performance data is pruned by the SQL Sentry Monitoring Service every minute or so. The default settings are such that you should always have detailed performance data for the last two or three days. However, if you find that you are frequently navigating to date ranges using the
Dashboard or Disk Activity tabs where no data is shown, it may mean that you need to increase the retention hours for the detailed and/or rolled up performance data. You should of course balance any changes with the resulting impact it will have on database size.
When you start using PA, you will likely find that your SQLSentry database grows quickly at first. After a few days this will level off though, once the pruning of expired data begins and starts keeping pace with the incoming new data. You can get a quick idea of the mix of PA data in your environment by inspecting sizes for the related tables using the script below. Bear in mind that much of the data in
EventSourceHistory is likely related to EM sources.
Performance Advisor Data Script
SELECT
TableName = OBJECT_SCHEMA_NAME( [object_id] ) + '.' +
OBJECT_NAME ( [object_id] ),
[RowCount] = SUM ( CASE WHEN index_id IN ( 0 , 1 ) THEN row_count ELSE 0 END ),
UsedSpaceMB = SUM (used_page_count / 128 ),
ReservedSpaceMB = SUM (reserved_page_count / 128 )
FROM sys.dm_db_partition_stats
WHERE OBJECT_NAME ( [object_id] ) IN
(
'BlockChainDetail' ,
'EventSourceHistory' ,
'MetaHistorySqlServerBlockLog' ,
'MetaHistorySqlServerTraceLog' ,
'PerformanceAnalysisData' ,
'PerformanceAnalysisDataDatabaseCounter' ,
'PerformanceAnalysisDataDiskCounter' ,
'PerformanceAnalysisDataRollup11' ,
'PerformanceAnalysisDataRollup2' ,
'PerformanceAnalysisDataRollup4' ,
'PerformanceAnalysisDataRollup6' ,
©2015 SQL Sentry. All Rights Reserved.
SQL Sentry Quick Start 39
'PerformanceAnalysisDataRollup8' ,
'PerformanceAnalysisTraceData' ,
'PerformanceAnalysisPlan' ,
'PerformanceAnalysisPlanOpTotals' ,
'PerformanceAnalysisTraceCachedPlanItems' ,
'PerformanceAnalysisTraceDataToCachedPlans' ,
'PerformanceAnalysisTraceQueryStats' ,
'MetaHistorySharePointTimerJob' ,
'PerformanceAnalysisSsasUsageTotals' ,
'PerformanceAnalysisSsasCubeDimensionAttribute' ,
'PerformanceAnalysisSsasTraceDataDetail'
)
AND OBJECTPROPERTY ( [object_id] , 'IsUserTable' ) = 1
GROUP BY [object_id]
ORDER BY TableName;
10.2
SMTP Settings
Select the SQL Sentry Server -> Settings node in the SQL Sentry Client Navigator pane. The SMTP
Config tab will be displayed by default.
1. In the SMTP Server field enter the domain name or IP address of the SMTP server to be used for routing SQL Sentry email notifications. If using localhost, keep in mind this will be the local
SMTP server on the machine where the Monitoring Service is installed since it is responsible for sending all notifications. The SQL Sentry Client does not send any notifications.
NOTE: You may need to contact your network administrator first to ensure that the IP address of the Monitoring Service computer has been granted both Connect and Relay permissions for the specified SMTP server.
2. Next, enter the Email From Address. This is the address which will appear on the From line of all email notifications sent by SQL Sentry.
3. You can also specify a Username and Password if authentication is required by your SMTP server. Please note that this is usually not required in most environments.
4. Click the Test button and specify an email address, then click Send.
IMPORTANT: For the most accurate SMTP test, you should use the SQL Sentry Client installed on the Server computer to send the test message. If you use a SQL Sentry
Client on a different computer, such as your local workstation, the results may be different. For example, your SMTP server may allow relay from your workstation but not from the SQL Sentry Server computer, in which case the test from your workstation would succeed; but the SQL Sentry Server would be unable to deliver notifications.
5. Click Save on the toolbar when finished.
©2015 SQL Sentry. All Rights Reserved.
SQL Sentry Quick Start 40
10.3
Uninstalling SQL Sentry
SQL Sentry can be uninstalled through the Control Panel in Windows. When you uninstall the SQL
Sentry Client or Monitoring Service, the associated program files will be removed. User preferences stored in the registry, and the SQL Sentry Database will not be deleted.
Additionally, the .NET Framework files will not be removed when uninstalling SQL Sentry. This can be accomplished using Add/Remove Programs in the Control Panel.
REMOVING WATCHED SERVER OBJECTS
If you have stopped watching a SQL Server instance with SQL Sentry, and have no plans to watch it again in the near future, scripts are provided to automate the process of removing the
Sentry places on a watched server . Click the appropriate link below to view the script.
SQL Server 2005 and above instances
10.3.1
Object Removal Script for Watched 2000 Servers
Object Removal Script for Watched 2000 Servers
USE msdb if exists ( select * from dbo.sysobjects where id = object_id (N '[dbo].
[sp_sentry_mail]' ) and OBJECTPROPERTY (id, N 'IsProcedure' ) = 1 ) drop procedure [dbo] .
[sp_sentry_mail] if exists ( select * from dbo.sysobjects where id = object_id (N '[dbo].
[sp_sentry_mail_20]' ) and OBJECTPROPERTY (id, N 'IsProcedure' ) = 1 ) drop procedure [dbo] .
[sp_sentry_mail_20] if exists ( select * from dbo.sysobjects where id = object_id (N '[dbo].
[SQLSentryEmails_20]' ) and OBJECTPROPERTY (id, N 'IsUserTable' ) = 1 ) drop table [dbo] .
[SQLSentryEmails_20] if exists ( select * from dbo.sysobjects where id = object_id (N '[dbo].
[spGetBlockInfo_20]' ) and OBJECTPROPERTY (id, N 'IsProcedure' ) = 1 ) drop procedure [dbo] .
[spGetBlockInfo_20] if exists ( select * from dbo.sysobjects where id = object_id (N '[dbo].
[spGetBlockInfo_Pre8sp3]' ) and OBJECTPROPERTY (id, N 'IsProcedure' ) = 1 ) drop procedure [dbo] .
[spGetBlockInfo_Pre8sp3]
GO
BEGIN TRANSACTION
DECLARE @JobID BINARY ( 16 )
DECLARE @ReturnCode INT
SELECT @ReturnCode = 0
-- Delete the job with the same name (if it exists)
SELECT @JobID = job_id
FROM msdb.dbo.sysjobs
©2015 SQL Sentry. All Rights Reserved.
SQL Sentry Quick Start 41
WHERE (name = N 'SQL Sentry 2.0 Queue Monitor' )
IF ( @JobID IS NOT NULL )
BEGIN
-- Check if the job is a multi-server job
IF ( EXISTS ( SELECT *
FROM msdb.dbo.sysjobservers
WHERE (job_id = @JobID ) AND (server_id <> 0 )))
BEGIN
-- There is, so abort the script
RAISERROR (N 'Unable to import job ''SQL Sentry Queue Monitor'' since there is already a multi-server job with this name.' , 16 , 1 )
GOTO QuitWithRollback
END
ELSE
-- Delete the [local] job
EXECUTE msdb.dbo.sp_delete_job @job_name = N 'SQL Sentry 2.0 Queue Monitor'
SELECT @JobID = NULL
END
COMMIT TRANSACTION
GOTO EndSave
QuitWithRollback:
IF ( @@TRANCOUNT > 0 ) ROLLBACK TRANSACTION
EndSave:
GO if exists ( select * from dbo.sysobjects where id = object_id (N '[dbo].
[spGetJobInfo_20]' ) and OBJECTPROPERTY (id, N 'IsProcedure' ) = 1 ) drop procedure [dbo] .
[spGetJobInfo_20] if exists ( select * from dbo.sysobjects where id = object_id (N '[dbo].
[spGetDTSLog_20]' ) and OBJECTPROPERTY (id, N 'IsProcedure' ) = 1 ) drop procedure [dbo] .
[spGetDTSLog_20] if exists ( select * from dbo.sysobjects where id = object_id (N '[dbo].
[spQueueHeartbeat_20]' ) and OBJECTPROPERTY (id, N 'IsProcedure' ) = 1 ) drop procedure [dbo] .
[spQueueHeartbeat_20] if exists ( select * from dbo.sysobjects where id = object_id (N '[dbo].
[spQueueJob_Start_20]' ) and OBJECTPROPERTY (id, N 'IsProcedure' ) = 1 ) drop procedure [dbo] .
[spQueueJob_Start_20] if exists ( select * from dbo.sysobjects where id = object_id (N '[dbo].
[spQueueJob_End_20]' ) and OBJECTPROPERTY (id, N 'IsProcedure' ) = 1 ) drop procedure [dbo] .
[spQueueJob_End_20] if exists ( select * from dbo.sysobjects where id = object_id (N '[dbo].
[spQueueMonitor_20]' ) and OBJECTPROPERTY (id, N 'IsProcedure' ) = 1 ) drop procedure [dbo] .
[spQueueMonitor_20] if exists ( select * from dbo.sysobjects where id = object_id (N '[dbo].
[spReadLogFile_20]' ) and OBJECTPROPERTY (id, N 'IsProcedure' ) = 1 )
©2015 SQL Sentry. All Rights Reserved.
SQL Sentry Quick Start 42
drop procedure [dbo] .
[spReadLogFile_20] if exists ( select * from dbo.sysobjects where id = object_id (N '[dbo].
[SQLSentryQueueLog_20]' ) and OBJECTPROPERTY (id, N 'IsUserTable' ) = 1 ) drop table [dbo] .
[SQLSentryQueueLog_20] if exists ( select * from dbo.sysobjects where id = object_id (N '[dbo].
[SQLSentryLogCache_20]' ) and OBJECTPROPERTY (id, N 'IsUserTable' ) = 1 ) drop table [dbo] .
[SQLSentryLogCache_20] if exists ( select * from dbo.sysobjects where id = object_id (N '[dbo].
[SQLSentryLogCacheDTS_20]' ) and OBJECTPROPERTY (id, N 'IsUserTable' ) = 1 ) drop table [dbo] .
[SQLSentryLogCacheDTS_20]
GO
BEGIN TRANSACTION
DECLARE @JobID BINARY ( 16 )
DECLARE @ReturnCode INT
SELECT @ReturnCode = 0
-- Delete the job with the same name (if it exists)
SELECT @JobID = job_id
FROM msdb.dbo.sysjobs
WHERE (name = N 'SQL Sentry 2.0 Alert Trap' )
IF ( @JobID IS NOT NULL )
BEGIN
-- Check if the job is a multi-server job
IF ( EXISTS ( SELECT *
FROM msdb.dbo.sysjobservers
WHERE (job_id = @JobID ) AND (server_id <> 0 )))
BEGIN
-- There is, so abort the script
RAISERROR (N 'Unable to import job ''SQL Sentry Alert Trap'' since there is already a multi-server job with this name.' , 16 , 1 )
GOTO QuitWithRollback
END
ELSE
-- Delete the [local] job
EXECUTE msdb.dbo.sp_delete_job @job_name = N 'SQL Sentry 2.0 Alert Trap'
SELECT @JobID = NULL
END
COMMIT TRANSACTION
GOTO EndSave
QuitWithRollback:
IF ( @@TRANCOUNT > 0 ) ROLLBACK TRANSACTION
EndSave:
GO if exists ( select * from dbo.sysobjects where id = object_id (N '[dbo].
[spTrapAlert_20]' ) and OBJECTPROPERTY (id, N 'IsProcedure' ) = 1 )
©2015 SQL Sentry. All Rights Reserved.
SQL Sentry Quick Start 43
drop procedure [dbo] .
[spTrapAlert_20] if exists ( select * from dbo.sysobjects where id = object_id (N '[dbo].
[spSetupAlertsTrap_20]' ) and OBJECTPROPERTY (id, N 'IsProcedure' ) = 1 ) drop procedure [dbo] .
[spSetupAlertsTrap_20] if exists ( select * from dbo.sysobjects where id = object_id (N '[dbo].
[SQLSentryAlertLog_20]' ) and OBJECTPROPERTY (id, N 'IsUserTable' ) = 1 ) drop table [dbo] .
[SQLSentryAlertLog_20] if exists ( select * from dbo.sysobjects where id = object_id (N '[dbo].
[SQLSentryLogData_20]' ) and OBJECTPROPERTY (id, N 'IsUserTable' ) = 1 ) drop table [dbo] .
[SQLSentryLogData_20] if exists ( select * from dbo.sysobjects where id = object_id (N '[dbo].
[SQLSentryObjectVersion_20]' ) and OBJECTPROPERTY (id, N 'IsUserTable' ) = 1 ) drop table [dbo] .
[SQLSentryObjectVersion_20] if exists ( select * from dbo.sysobjects where id = object_id (N '[dbo].
[fnGetSQL_20]' ) and OBJECTPROPERTY (id, N 'IsScalarFunction' ) = 1 ) drop function [dbo] .
[fnGetSQL_20] if exists ( select * from dbo.sysobjects where id = object_id (N '[dbo].
[fnGetWaittypeDesc_20]' ) and OBJECTPROPERTY (id, N 'IsScalarFunction' ) = 1 ) drop function [dbo] .
[fnGetWaittypeDesc_20]
USE msdb if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].
[sp_sentry_mail]') and OBJECTPROPERTY(id, N'IsProcedure') = 1) drop procedure [dbo].[sp_sentry_mail] if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].
[sp_sentry_mail_20]') and OBJECTPROPERTY(id, N'IsProcedure') = 1) drop procedure [dbo].[sp_sentry_mail_20] if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].
[SQLSentryEmails_20]') and OBJECTPROPERTY(id, N'IsUserTable') = 1) drop table [dbo].[SQLSentryEmails_20] if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].
[spGetBlockInfo_20]') and OBJECTPROPERTY(id, N'IsProcedure') = 1) drop procedure [dbo].[spGetBlockInfo_20] if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].
[spGetBlockInfo_Pre8sp3]') and OBJECTPROPERTY(id, N'IsProcedure') = 1) drop procedure [dbo].[spGetBlockInfo_Pre8sp3]
GO
BEGIN TRANSACTION
DECLARE @JobID BINARY(16)
DECLARE @ReturnCode INT
©2015 SQL Sentry. All Rights Reserved.
SQL Sentry Quick Start 44
SELECT @ReturnCode = 0
-- Delete the job with the same name (if it exists)
SELECT @JobID = job_id
FROM msdb.dbo.sysjobs
WHERE (name = N'SQL Sentry 2.0 Queue Monitor')
IF (@JobID IS NOT NULL)
BEGIN
-- Check if the job is a multi-server job
IF (EXISTS (SELECT *
FROM msdb.dbo.sysjobservers
WHERE (job_id = @JobID) AND (server_id <> 0)))
BEGIN
-- There is, so abort the script
RAISERROR (N'Unable to import job ''SQL Sentry Queue Monitor'' since there is already a multi-server job with this name.', 16, 1)
GOTO QuitWithRollback
END
ELSE
-- Delete the [local] job
EXECUTE msdb.dbo.sp_delete_job @job_name = N'SQL Sentry 2.0 Queue Monitor'
SELECT @JobID = NULL
END
COMMIT TRANSACTION
GOTO EndSave
QuitWithRollback:
IF (@@TRANCOUNT > 0) ROLLBACK TRANSACTION
EndSave:
GO if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].
[spGetJobInfo_20]') and OBJECTPROPERTY(id, N'IsProcedure') = 1) drop procedure [dbo].[spGetJobInfo_20] if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].
[spGetDTSLog_20]') and OBJECTPROPERTY(id, N'IsProcedure') = 1) drop procedure [dbo].[spGetDTSLog_20] if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].
[spQueueHeartbeat_20]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
©2015 SQL Sentry. All Rights Reserved.
SQL Sentry Quick Start
drop procedure [dbo].[spQueueHeartbeat_20] if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].
[spQueueJob_Start_20]') and OBJECTPROPERTY(id, N'IsProcedure') = 1) drop procedure [dbo].[spQueueJob_Start_20] if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].
[spQueueJob_End_20]') and OBJECTPROPERTY(id, N'IsProcedure') = 1) drop procedure [dbo].[spQueueJob_End_20] if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].
[spQueueMonitor_20]') and OBJECTPROPERTY(id, N'IsProcedure') = 1) drop procedure [dbo].[spQueueMonitor_20] if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].
[spReadLogFile_20]') and OBJECTPROPERTY(id, N'IsProcedure') = 1) drop procedure [dbo].[spReadLogFile_20] if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].
[SQLSentryQueueLog_20]') and OBJECTPROPERTY(id, N'IsUserTable') = 1) drop table [dbo].[SQLSentryQueueLog_20] if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].
[SQLSentryLogCache_20]') and OBJECTPROPERTY(id, N'IsUserTable') = 1) drop table [dbo].[SQLSentryLogCache_20] if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].
[SQLSentryLogCacheDTS_20]') and OBJECTPROPERTY(id, N'IsUserTable') = 1) drop table [dbo].[SQLSentryLogCacheDTS_20]
GO
BEGIN TRANSACTION
DECLARE @JobID BINARY(16)
DECLARE @ReturnCode INT
SELECT @ReturnCode = 0
-- Delete the job with the same name (if it exists)
SELECT @JobID = job_id
FROM msdb.dbo.sysjobs
WHERE (name = N'SQL Sentry 2.0 Alert Trap')
IF (@JobID IS NOT NULL)
BEGIN
-- Check if the job is a multi-server job
IF (EXISTS (SELECT *
FROM msdb.dbo.sysjobservers
WHERE (job_id = @JobID) AND (server_id <> 0)))
BEGIN
45
©2015 SQL Sentry. All Rights Reserved.
SQL Sentry Quick Start 46
-- There is, so abort the script
RAISERROR (N'Unable to import job ''SQL Sentry Alert Trap'' since there is already a multi-server job with this name.', 16, 1)
GOTO QuitWithRollback
END
ELSE
-- Delete the [local] job
EXECUTE msdb.dbo.sp_delete_job @job_name = N'SQL Sentry 2.0 Alert Trap'
SELECT @JobID = NULL
END
COMMIT TRANSACTION
GOTO EndSave
QuitWithRollback:
IF (@@TRANCOUNT > 0) ROLLBACK TRANSACTION
EndSave:
GO if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].
[spTrapAlert_20]') and OBJECTPROPERTY(id, N'IsProcedure') = 1) drop procedure [dbo].[spTrapAlert_20] if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].
[spSetupAlertsTrap_20]') and OBJECTPROPERTY(id, N'IsProcedure') = 1) drop procedure [dbo].[spSetupAlertsTrap_20] if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].
[SQLSentryAlertLog_20]') and OBJECTPROPERTY(id, N'IsUserTable') = 1) drop table [dbo].[SQLSentryAlertLog_20] if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].
[SQLSentryLogData_20]') and OBJECTPROPERTY(id, N'IsUserTable') = 1) drop table [dbo].[SQLSentryLogData_20] if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].
[SQLSentryObjectVersion_20]') and OBJECTPROPERTY(id, N'IsUserTable') = 1) drop table [dbo].[SQLSentryObjectVersion_20] if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].
[fnGetSQL_20]') and OBJECTPROPERTY(id, N'IsScalarFunction') = 1) drop function [dbo].[fnGetSQL_20] if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].
[fnGetWaittypeDesc_20]') and OBJECTPROPERTY(id, N'IsScalarFunction') = 1) drop function [dbo].[fnGetWaittypeDesc_20]
©2015 SQL Sentry. All Rights Reserved.
SQL Sentry Quick Start 47
10.3.2
Object Removal Script for Watched 2005 and
Above Servers
Object Removal Script for Watched 2005 and above
USE msdb if exists ( select * from sys.objects where object_id = object_id (N '[dbo].
[sp_sentry_mail]' ) and OBJECTPROPERTY ( object_id , N 'IsProcedure' ) = 1 ) drop procedure [dbo] .
[sp_sentry_mail] if exists ( select * from sys.objects where object_id = object_id (N '[dbo].
[sp_sentry_mail_20]' ) and OBJECTPROPERTY ( object_id , N 'IsProcedure' ) = 1 ) drop procedure [dbo] .
[sp_sentry_mail_20] if exists ( select * from sys.objects where object_id = object_id (N '[dbo].
[sp_sentry_dbmail_20]' ) and OBJECTPROPERTY ( object_id , N 'IsProcedure' ) = 1 ) drop procedure [dbo] .
[sp_sentry_dbmail_20] if exists ( select * from sys.objects where object_id = object_id (N '[dbo].
[SQLSentryEmails_20]' ) and OBJECTPROPERTY ( object_id , N 'IsUserTable' ) = 1 ) drop table [dbo] .
[SQLSentryEmails_20] if exists ( select * from sys.objects where object_id = object_id (N '[dbo].
[SQLSentryDBEmails_Attachments_20]' ) and OBJECTPROPERTY ( object_id ,
N 'IsUserTable' ) = 1 ) drop table [dbo] .
[SQLSentryDBEmails_Attachments_20] if exists ( select * from sys.objects where object_id = object_id (N '[dbo].
[SQLSentryDBEmails_20]' ) and OBJECTPROPERTY ( object_id , N 'IsUserTable' ) =
1 ) drop table [dbo] .
[SQLSentryDBEmails_20] if exists ( select * from sys.objects where object_id = object_id (N '[dbo].
[spGetBlockInfo_20]' ) and OBJECTPROPERTY ( object_id , N 'IsProcedure' ) = 1 ) drop procedure [dbo] .
[spGetBlockInfo_20] if exists ( select * from sys.objects where object_id = object_id (N '[dbo].
[spGetBlockInfo_Pre8sp3]' ) and OBJECTPROPERTY ( object_id , N 'IsProcedure' ) =
1 ) drop procedure [dbo] .
[spGetBlockInfo_Pre8sp3] if exists ( select * from sys.objects where object_id = object_id (N '[dbo].
[spGetQueryStatsData]' ) and OBJECTPROPERTY ( object_id , N 'IsProcedure' ) = 1 ) drop procedure [dbo] .
[spGetQueryStatsData] if exists ( select * from sys.objects where object_id = object_id (N '[dbo].
[spGetProcedureStatsData]' ) and OBJECTPROPERTY ( object_id , N 'IsProcedure' )
= 1 ) drop procedure [dbo] .
[spGetProcedureStatsData]
GO
BEGIN TRANSACTION
DECLARE @JobID BINARY ( 16 )
©2015 SQL Sentry. All Rights Reserved.
SQL Sentry Quick Start 48
DECLARE @ReturnCode INT
SELECT @ReturnCode = 0
-- Delete the job with the same name (if it exists)
SELECT @JobID = job_id
FROM msdb.dbo.sysjobs
WHERE (name = N 'SQL Sentry 2.0 Queue Monitor' )
IF ( @JobID IS NOT NULL )
BEGIN
-- Check if the job is a multi-server job
IF ( EXISTS ( SELECT *
FROM msdb.dbo.sysjobservers
WHERE (job_id = @JobID ) AND (server_id <> 0 )))
BEGIN
-- There is, so abort the script
RAISERROR (N 'Unable to import job ''SQL Sentry Queue Monitor'' since there is already a multi-server job with this name.' , 16 , 1 )
GOTO QuitWithRollback
END
ELSE
-- Delete the [local] job
EXECUTE msdb.dbo.sp_delete_job @job_name = N 'SQL Sentry 2.0 Queue Monitor'
SELECT @JobID = NULL
END
COMMIT TRANSACTION
GOTO EndSave
QuitWithRollback:
IF ( @@TRANCOUNT > 0 ) ROLLBACK TRANSACTION
EndSave:
GO if exists ( select * from sys.objects where object_id = object_id (N '[dbo].
[spGetJobInfo_20]' ) and OBJECTPROPERTY ( object_id , N 'IsProcedure' ) = 1 ) drop procedure [dbo] .
[spGetJobInfo_20] if exists ( select * from sys.objects where object_id = object_id (N '[dbo].
[spGetDTSLog_20]' ) and OBJECTPROPERTY ( object_id , N 'IsProcedure' ) = 1 ) drop procedure [dbo] .
[spGetDTSLog_20] if exists ( select * from sys.objects where object_id = object_id (N '[dbo].
[spQueueHeartbeat_20]' ) and OBJECTPROPERTY ( object_id , N 'IsProcedure' ) = 1 ) drop procedure [dbo] .
[spQueueHeartbeat_20] if exists ( select * from sys.objects where object_id = object_id (N '[dbo].
[spQueueJob_Start_20]' ) and OBJECTPROPERTY ( object_id , N 'IsProcedure' ) = 1 ) drop procedure [dbo] .
[spQueueJob_Start_20] if exists ( select * from sys.objects where object_id = object_id (N '[dbo].
[spQueueJob_End_20]' ) and OBJECTPROPERTY ( object_id , N 'IsProcedure' ) = 1 ) drop procedure [dbo] .
[spQueueJob_End_20]
©2015 SQL Sentry. All Rights Reserved.
SQL Sentry Quick Start 49
if exists ( select * from sys.objects where object_id = object_id (N '[dbo].
[spQueueMonitor_20]' ) and OBJECTPROPERTY ( object_id , N 'IsProcedure' ) = 1 ) drop procedure [dbo] .
[spQueueMonitor_20] if exists ( select * from sys.objects where object_id = object_id (N '[dbo].
[spReadLogFile_20]' ) and OBJECTPROPERTY ( object_id , N 'IsProcedure' ) = 1 ) drop procedure [dbo] .
[spReadLogFile_20] if exists ( select * from sys.objects where object_id = object_id (N '[dbo].
[SQLSentryQueueLog_20]' ) and OBJECTPROPERTY ( object_id , N 'IsUserTable' ) =
1 ) drop table [dbo] .
[SQLSentryQueueLog_20] if exists ( select * from sys.objects where object_id = object_id (N '[dbo].
[SQLSentryLogCache_20]' ) and OBJECTPROPERTY ( object_id , N 'IsUserTable' ) =
1 ) drop table [dbo] .
[SQLSentryLogCache_20] if exists ( select * from sys.objects where object_id = object_id (N '[dbo].
[SQLSentryLogCacheDTS_20]' ) and OBJECTPROPERTY ( object_id , N 'IsUserTable' )
= 1 ) drop table [dbo] .
[SQLSentryLogCacheDTS_20]
GO
BEGIN TRANSACTION
DECLARE @JobID BINARY ( 16 )
DECLARE @ReturnCode INT
SELECT @ReturnCode = 0
-- Delete the job with the same name (if it exists)
SELECT @JobID = job_id
FROM msdb.dbo.sysjobs
WHERE (name = N 'SQL Sentry 2.0 Alert Trap' )
IF ( @JobID IS NOT NULL )
BEGIN
-- Check if the job is a multi-server job
IF ( EXISTS ( SELECT *
FROM msdb.dbo.sysjobservers
WHERE (job_id = @JobID ) AND (server_id <> 0 )))
BEGIN
-- There is, so abort the script
RAISERROR (N 'Unable to import job ''SQL Sentry Alert Trap'' since there is already a multi-server job with this name.' , 16 , 1 )
GOTO QuitWithRollback
END
ELSE
-- Delete the [local] job
EXECUTE msdb.dbo.sp_delete_job @job_name = N 'SQL Sentry 2.0 Alert Trap'
SELECT @JobID = NULL
END
©2015 SQL Sentry. All Rights Reserved.
SQL Sentry Quick Start 50
COMMIT TRANSACTION
GOTO EndSave
QuitWithRollback:
IF ( @@TRANCOUNT > 0 ) ROLLBACK TRANSACTION
EndSave:
GO if exists ( select * from sys.objects where object_id = object_id (N '[dbo].
[spTrapAlert_20]' ) and OBJECTPROPERTY ( object_id , N 'IsProcedure' ) = 1 ) drop procedure [dbo] .
[spTrapAlert_20] if exists ( select * from sys.objects where object_id = object_id (N '[dbo].
[spSetupAlertsTrap_20]' ) and OBJECTPROPERTY ( object_id , N 'IsProcedure' ) =
1 ) drop procedure [dbo] .
[spSetupAlertsTrap_20] if exists ( select * from sys.objects where object_id = object_id (N '[dbo].
[SQLSentryAlertLog_20]' ) and OBJECTPROPERTY ( object_id , N 'IsUserTable' ) =
1 ) drop table [dbo] .
[SQLSentryAlertLog_20] if exists ( select * from sys.objects where object_id = object_id (N '[dbo].
[SQLSentryLogData_20]' ) and OBJECTPROPERTY ( object_id , N 'IsUserTable' ) = 1 ) drop table [dbo] .
[SQLSentryLogData_20] if exists ( select * from sys.objects where object_id = object_id (N '[dbo].
[SQLSentryObjectVersion_20]' ) and OBJECTPROPERTY ( object_id ,
N 'IsUserTable' ) = 1 ) drop table [dbo] .
[SQLSentryObjectVersion_20] if exists ( select * from sys.objects where object_id = object_id (N '[dbo].
[fnGetSQL_20]' ) and OBJECTPROPERTY ( object_id , N 'IsScalarFunction' ) = 1 ) drop function [dbo] .
[fnGetSQL_20] if exists ( select * from sys.objects where object_id = object_id (N '[dbo].
[fnGetWaittypeDesc_20]' ) and OBJECTPROPERTY ( object_id ,
N 'IsScalarFunction' ) = 1 ) drop function [dbo] .
[fnGetWaittypeDesc_20]
10.4
Watched Server Objects
PERFORMANCE ADVISOR WATCHED SERVER OBJECTS
When a SQL Server instance is watched by SQL Sentry Performance Advisor, the below objects are placed on the target server. To remove these objects, see the
Uninstalling SQL Sentry topic .
TABLES (MSDB):
SQLSentryObjectVersion_20
©2015 SQL Sentry. All Rights Reserved.
SQL Sentry Quick Start 51
STORED PROCEDURES (MSDB): spGetBlockInfo_20
EVENT MANAGER WATCHED SERVER OBJECTS
When a SQL Server instance is watched by SQL Sentry Event Manager, the below objects are placed on the target server. To remove these objects, see the
Uninstalling SQL Sentry topic .
TABLES (MSDB):
SQLSentryAlertLog_20
SQLSentryDBEmails_20 (SQL Server 2005+)
SQLSentryDBEmail_Attachments_20 (SQL Server 2005+)
SQLSentryEmails_20
SQLSentryLogCache_20
SQLSentryLogData_20
SQLSentryObjectVersion_20
SQLSentryQueueLog_20
STORED PROCEDURES (MSDB): spGetBlockInfo_20 spGetJobInfo_20 spQueueHeartbeat_20 spQueueJob_End_20 spQueueJob_Start_20 spQueueMonitor_20 spReadLogFile_20 spSetupAlertsTrap_20 spTrapAlert_20 sp_sentry_mail sp_sentry_mail_20 sp_sentry_dbmail_20 (SQL Server 2005+)
SQL AGENT JOBS:
SQL Sentry 2.0 Alert Trap
SQL Sentry 2.0 Queue Monitor
©2015 SQL Sentry. All Rights Reserved.
SQL Sentry Quick Start
10.5
Standard Vs Enterprise Editions
Please see this link for a Standard Vs. Enterprise feature comparison.
52
©2015 SQL Sentry. All Rights Reserved.
Advertisement
Key features
- Quick installation
- Basic configuration
- Event management
- User and group management
- Connection monitoring
- Global settings
- Notification management
- Enterprise-wide management