Thursday, June 7, 2012

Database Mirror Monitoring and Automation with SQL Sentry

The Challenge

Since its introduction in SQL 2005 SP1, mirroring has become a common method to provide high availability for critical databases. With any HA strategy, proper monitoring is a must to ensure everything is working as planned with minimal data loss and disruption incurred in the event of a failover.

SQL Server provides several pertinent performance counters, as well as the Database Mirroring Monitor, to provide a base level of visibility into mirroring. Unfortunately there are known issues with alerting on mirroring thresholds as listed in Microsoft Connect here.

The issue is marked as ”Closed as Won’t Fix”, which leaves us with the need for a workaround.

The discovery of this led me to write this post. Not only will I provide scripts to configure a workaround, but I’ll show you how you can gain additional visibility and automation by combining this solution with SQL Sentry’s comprehensive monitoring and alerting capabilities.

While still available, mirroring will likely be used less in SQL Server 2012. The new Always On technology provides many enhancements over other HA options, and I’ll likely write a post about that in the future. See Aaron Bertrand’s (b|t) blog post on TechNet for an overview.

That said, I don’t suspect everyone will immediately upgrade to this new technology, so mirroring will be around for a while.

I first began my search through connect after reading the TechNet article on Alerting on Database Mirroring Events.

After some testing I quickly realized the solution wasn’t working as the alerts were database specific. Changing the "Database name:" field in the alert definition to <All Databases> in the alert properties fixed the issue. This may be sufficient if you only have one database mirrored on this server, but not if you have more than one since the alerts, and really the underlying error messages themselves, don’t provide for a database name.

I considered several options for a workaround. Ultimately, I wanted to make use of what native resources were reliable and practical as I didn’t want to reinvent the wheel. I know many people use a lot of the native functionality as covered in the MSDN article, Monitoring Mirroring Status, which discusses the dbmmonitor system stored procedures.

The Solution

So, my solution was to generate new error messages to replace the four native mirror performance errors. They are listed in the Technet article with Error numbers, 32040, 32042, 32043, and 32044. The below script creates new ones where I’ve replaced the leading 3 with a 5. The error messages are essentially the same as the original, except I’ve added a parameter for a database name. If you’ve already created your own custom error messages with those numbers, you’ll want to modify the script accordingly.

-- Create custom mirroring error messages to replace native ones so they can be database specific.
-- Error numbers are same as native, except leading 3 is replaced with a 5.
-- Severity level is 10, but error numbers and severity levels can be modified to suit your environment. 
-- Created by: Steven Wright, SQL Sentry
 
USE master
-- Check to see if there is already an error with this ID in sysmessages
IF EXISTS (SELECT 1 FROM sys.sysmessages WHERE error IN (52040, 52042, 52043, 52044))
    -- If there is, abort the script 
BEGIN 
    RAISERROR (N'At least one message with this error ID is in use.', 16, 1) 
END
ELSE
BEGIN
    EXEC sp_addmessage    @msgnum= 52040,
                        @severity= 10,
                        @msgtext= N'The oldest unsent transaction for %s is now %d.  The alert threshold is %d.',
                        @with_log= 'TRUE'
    EXEC sp_addmessage    @msgnum= 52042,
                        @severity= 10,
                        @msgtext= N'The Log Send Queue for %s is now %d KB.  The alert threshold is %d KB.',
                        @with_log= 'TRUE';
    EXEC sp_addmessage    @msgnum= 52043,
                        @severity= 10,
                        @msgtext= N'The Redo Queue for %s is now %d KB.  The alert threshold is %d KB.',
                        @with_log= 'TRUE';
    EXEC sp_addmessage    @msgnum= 52044,
                        @severity= 10,
                        @msgtext= N'The mirror commit overhead for %s is now %d ms.  The alert threshold is %d ms.',
                        @with_log= 'TRUE';
END

Download the script directly here: Create_Mirror_Error_Msgs.sql

Now that we’ve created these enhanced error messages, we need to ensure that they are the ones raised when your mirroring performance thresholds are exceeded. I’m referring to the standard warning thresholds you can set natively in SQL Server as described in MSDN.

Normally these errors are raised after a check by sp_dbmmonitorupdate. If you’ve used sp_dbmmonitoraddmonitoring to set things up, you should have a job on your server called ‘Database Mirroring Monitor Job’ that runs the update proc at scheduled intervals.

Below is a script to create a replacement proc called sp_Sentry_dbmmonitorupdate that is otherwise identical, but raises our newly created errors and passes a database name to give us more complete details. Simply replace the call to the native proc in the job’s step with a call to this new one in msdb. If you call it with a null parameter for database_name, it will cycle through each mirrored database, passing the appropriate name when raising the error.

USE [msdb]
GO
 
/****** This is a modified version of sys.dbmmonitorupdate which raises customized errors for mirroring to include the dbname. 
Written by Steven Wright, SQL Sentry ******/
 
SET ANSI_NULLS ON
GO
 
SET QUOTED_IDENTIFIER ON
GO
 
 
CREATE procedure [dbo].[sp_Sentry_dbmmonitorupdate] 
(
    @database_name        sysname = null    -- if null update all mirrored databases
)
as
begin
    set nocount on
    if (is_srvrolemember(N'sysadmin') <> 1 )
    begin
        raiserror(21089, 16, 1)
        return 1
    end
    if ( db_name() != N'msdb' )
    begin
        raiserror(32045, 16, 1, N'msdb..sp_Sentry_dbmmonitorupdate')
        return 1
    end
 
    declare        @retcode    int
 
    if object_id ( N'msdb.dbo.dbm_monitor_data', N'U' ) is null
    begin 
        create table msdb.dbo.dbm_monitor_data (        -- go through the code to see if there SHOULD be nulls.
            database_id                smallint,
            role                    bit null,
            status                    tinyint null,
            witness_status            tinyint null,
            log_flush_rate            bigint null,
            send_queue_size            bigint null,
            send_rate                bigint null,
            redo_queue_size            bigint null,
            redo_rate                bigint null,
            transaction_delay        bigint null,
            transactions_per_sec    bigint null,
            time                    datetime,
            end_of_log_lsn            numeric(25,0),
            failover_lsn            numeric(25,0),
            local_time                datetime
        )
 
        exec @retcode = msdb.dbo.sp_MS_marksystemobject dbm_monitor_data
        if ( @@error != 0 OR @retcode != 0 )
        begin
            raiserror( 32038, 16, 1 )
            return 1
        end
 
        create clustered index dbmmonitor1 
            on msdb.dbo.dbm_monitor_data (database_id asc, time asc )
    end
 
    -- TO DO: create some keys depending on enterences.
    -- TO DO: make sure that the rows are unique
    if object_id ( N'msdb.dbo.dbm_monitor_alerts', N'U' ) is null
    begin
        create table msdb.dbo.dbm_monitor_alerts (
            database_id                smallint,
            retention_period        int null,    --this defaults to 7 days.  checked during the table update
            time_behind                int null,
            enable_time_behind        bit null,
            send_queue                int null,
            enable_send_queue        bit null,
            redo_queue                int null,
            enable_redo_queue        bit null,
            average_delay            int null,
            enable_average_delay    bit null
        )
 
        exec @retcode = msdb.dbo.sp_MS_marksystemobject dbm_monitor_alerts
        if ( @@error != 0 OR @retcode != 0 )
        begin
            raiserror( 32038, 16, 2 )
            return 1
        end
    end
 
    if ( select name from sys.database_principals where name = N'dbm_monitor') is null 
    begin
        create role dbm_monitor
        grant select on object::msdb.dbo.dbm_monitor_data to dbm_monitor
    end
 
    if @database_name is not null
    begin
        --
        -- Check if the database specified exists 
        --
        if not exists (select * from master.sys.databases where name = @database_name)
        begin
            raiserror(15010, 16, 1, @database_name)
            return 1
        end
        -- 
        -- Check to see if it is mirrored
        --
        if (select mirroring_guid from master.sys.database_mirroring where database_id = db_id(@database_name)) is null 
        begin
            raiserror(32039, 16, 1, @database_name)
            return 1
        end
 
    declare
        @database_id            smallint,
        @role                    bit,
        @status                    tinyint,
        @witness_status            tinyint,
        @log_flush_rate            bigint ,
        @send_queue_size        bigint ,
        @send_rate                bigint ,
        @redo_queue_size        bigint ,
        @redo_rate                bigint ,
        @transaction_delay        bigint ,
        @transactions_per_sec    bigint ,
        @time                    datetime ,
        @end_of_log_lsn            numeric(25,0),
        @failover_lsn            numeric(25,0),
        @local_time                datetime
 
    declare
        @retention_period        int,
        @oldest_date            datetime
 
        set @database_id = DB_ID( @database_name )
 
-- To select the correct perf counter, we need the instance name.
        declare 
            @perf_instance1        nvarchar(256),
            @perf_instance2        nvarchar(256),
            @instance            nvarchar(128)
 
        select @instance = convert( nvarchar,  serverproperty(N'instancename'))
        if @instance is null
        begin
            set @instance = N'SQLServer'
        end
        else
        begin
            set @instance = N'MSSQL$' + @instance
        end
 
        set @perf_instance1 = left(@instance, len(@instance)) + N':Database Mirroring'
        set @perf_instance2 = left(@instance, len(@instance)) + N':Databases'
 
--
-- Insert a single row in the table for each database
--
-- 1. Pull out the perf counters
-- 2. Pull out the information from sys.database_mirroring
-- 3. Get the end of log lsn
 
        declare @perfcounters table(
            counter_name        nchar(128),
            cntr_value            bigint
        )
 
        insert into @perfcounters select counter_name, cntr_value from sys.dm_os_performance_counters where
            (object_name = @perf_instance1 or object_name = @perf_instance2 ) and 
            instance_name = @database_name and
            counter_name IN (N'Log Send Queue KB', N'Log Bytes Sent/sec', N'Redo Queue KB', N'Redo Bytes/sec', N'Transaction Delay', N'Log Bytes Flushed/sec', N'Transactions/sec')
        -- TO DO select all perfcounters for all databases so that you only need to access them once.
        select @role = (mirroring_role - 1),
            @status = mirroring_state, 
            @witness_status = mirroring_witness_state,
            @failover_lsn = mirroring_failover_lsn,
            @end_of_log_lsn = mirroring_end_of_log_lsn
                from sys.database_mirroring where database_id = @database_id
        -- TO DO: when doing the join, store the database id.
        select @log_flush_rate = cntr_value from @perfcounters where counter_name = N'Log Bytes Flushed/sec'
        select @send_queue_size = cntr_value from @perfcounters where counter_name = N'Log Send Queue KB'
        select @send_rate = cntr_value from @perfcounters where counter_name = N'Log Bytes Sent/sec'
        select @redo_queue_size = cntr_value from @perfcounters where counter_name = N'Redo Queue KB'
        select @redo_rate = cntr_value from @perfcounters where counter_name = N'Redo Bytes/sec'
        select @transaction_delay = cntr_value from @perfcounters where counter_name = N'Transaction Delay'
        select @transactions_per_sec = cntr_value from @perfcounters where counter_name = N'Transactions/sec'
        set @time = getutcdate()
        set @local_time = getdate()
 
-- 4. and insert it here
        insert into msdb.dbo.dbm_monitor_data (database_id, role, status, witness_status, failover_lsn, end_of_log_lsn, log_flush_rate,
                send_queue_size, send_rate, redo_queue_size, redo_rate, transaction_delay, transactions_per_sec, time, local_time)
        values( @database_id, @role, @status, @witness_status, @failover_lsn, @end_of_log_lsn, @log_flush_rate, @send_queue_size, @send_rate,
            @redo_queue_size, @redo_rate, @transaction_delay, @transactions_per_sec, @time, @local_time )
 
        -- 
        -- Raise the alerts (as errors)
        --
        --
        -- we need to call sys.sp_dbmmonitorresults to get the last row inserted and then we will compare those results with what is in the alerts table
        --
        declare    @alert        bit,
                @threshold    int,
                @command    char(256),
                @time_behind_alert_value    datetime,
                @send_queue_alert_value        int,
                @redo_queue_alert_value        int,
                @average_delay_alert_value    int,
                @temp_time                    int
 
        declare @results table(
            database_name            sysname,    -- Name of database
            role                    int,        -- 1 = Principal, 2 = Mirror
            mirroring_state            int,        -- 0 = Suspended, 1 = Disconnected, 2 = Synchronizing, 3 = Pending Failover, 4 = Synchronized
            witness_status            int,        -- 1 = Connected, 2 = Disconnected
            log_generation_rate        int NULL,    -- in kb / sec
            unsent_log                int,        -- in kb
            send_rate                int NULL,    -- in kb / sec
            unrestored_log            int,        -- in kb
            recovery_rate            int NULL,    -- in kb / sec
            transaction_delay        int NULL,    -- in ms
            transactions_per_sec    int NULL,    -- in trans / sec
            average_delay            int,        -- in ms
            time_recorded            datetime,
            time_behind                datetime,
            local_time                datetime        
        )
 
        set @command = N'sys.sp_dbmmonitorresults ''' + replace(@database_name, N'''',N'''''') + N''',0,0'
        -- get just the values we want to test
        insert into @results exec (@command)
        select @time_behind_alert_value = time_behind, @send_queue_alert_value = unsent_log,
                @redo_queue_alert_value = unrestored_log, @average_delay_alert_value = average_delay
        from @results where database_name = @database_name
 
        -- These next four code blocks are the same:
        --    If the alert is enabled AND the value is above the threshold, fire the event
        -- The four code blocks are time behind, send queue, redo queue and average delay.
 
        -- time behind
        set @alert = 0    -- from SteveLi.  This will make sure that if there are problems with the select, the alert
                        -- will not accidentally fire.
        select @threshold = time_behind, @alert = enable_time_behind
            from msdb.dbo.dbm_monitor_alerts where database_id = @database_id
        begin
            set @temp_time = datediff(minute, @time_behind_alert_value, getutcdate())
            if ( @alert = 1 and @threshold < @temp_time ) -- time_behind_alert_value is datetime
            begin
                raiserror( 52040, 10, 1, @database_name, @temp_time, @threshold ) with log
            end
        end
        -- send queue
        set @alert = 0
        select @threshold = send_queue, @alert = enable_send_queue
            from msdb.dbo.dbm_monitor_alerts where database_id = @database_id
        begin
            if ( @alert = 1 and @threshold < @send_queue_alert_value )
            begin
                raiserror( 52042, 10, 2, @database_name, @send_queue_alert_value, @threshold ) with log
            end
        end
        -- redo queue
        set @alert = 0
        select @threshold = redo_queue, @alert = enable_redo_queue
            from msdb.dbo.dbm_monitor_alerts where database_id = @database_id
        begin
            if ( @alert = 1 and @threshold < @redo_queue_alert_value )
            begin
                raiserror( 52043, 10, 3, @database_name,@redo_queue_alert_value, @threshold ) with log
            end
        end
        -- average delay
        set @alert = 0
        select @threshold = average_delay, @alert = enable_average_delay
            from msdb.dbo.dbm_monitor_alerts where database_id = @database_id
        begin
            if ( @alert = 1 and @threshold < @average_delay_alert_value )
            begin
                raiserror( 52044, 10, 4, @database_name,@average_delay_alert_value, @threshold ) with log
            end
        end
 
        -- Prune the Data Table.
        select @retention_period = retention_period from msdb.dbo.dbm_monitor_alerts where database_id = @database_id
        if @retention_period is null
            set @retention_period = 168 -- 168 hours is equivalent to 7 days
        set @oldest_date = getutcdate() - (@retention_period / 24.)
        delete from msdb.dbo.dbm_monitor_data where time < @oldest_date and database_id = @database_id
    end
    -- OK, this SP was called with no database specified.
    -- We are going to go through all the databases that are mirrored and update them.
    else
    begin
        declare dbmCursor cursor local scroll 
            for select 
                database_id 
            from sys.database_mirroring 
            where mirroring_guid is not null
 
        open dbmCursor
        fetch next from dbmCursor
            into @database_id
 
        while @@fetch_status=0
        begin
-- Better make sure msdb..sp_Sentry_dbmmonitorupdate with a null parameter.  Could cause real bad problems.
            set @database_name = db_name( @database_id )
            if @database_name is not null
            begin
                
                exec msdb..sp_Sentry_dbmmonitorupdate @database_name
                fetch next from dbmCursor
                    into @database_id
            end
        end
 
        close dbmCursor
        deallocate dbmCursor
    end
 
return 0
end
 
GO

Download the script directly here: Create_Sentry_dbmmupdate.sql

Finally we need to create our SQL Agent Alerts that are fired when these errors are raised. SQL Sentry Event Manager can monitor these alerts. This allows us to automate responses, such as sending an email, or take other more advanced actions that SQL Sentry provides. We can then create a custom view that allows us to see a chronological, Outlook-style calendar picture of this activity alongside any other events like high impact queries that may trigger our alerts.

In addition to the four performance thresholds covered by the errors we’ve created, I’ve added some additional alerts for monitoring status changes such as mirror failovers as well as monitoring for automatic page repair. Automatic page repair is a great feature that was introduced with SQL 2008 and provides for automatic repair of corrupt pages using the partner database since it is an exact copy.

Paul Randal (b|t) has more details about automatic page repair in his blog.

So here is the script to create the alerts. Note I tried to keep the format as similar to that used in the original TechNet article for consistency.

USE [msdb];
GO
 
DECLARE @ReturnCode INT;
SELECT @ReturnCode = 0;
 
-- ***************
-- Create a set of alerts based on performance warnings
-- ***************
IF NOT EXISTS (SELECT name FROM msdb.dbo.syscategories WHERE 
   name=N'Database Mirroring' AND category_class=2)
BEGIN
EXEC @ReturnCode = msdb.dbo.sp_add_category @class=N'ALERT', 
   @type=N'NONE', @name=N'Database Mirroring';
IF (@@ERROR <> 0 OR @ReturnCode <> 0) GOTO Quit_Alert;
 
END;
 
DECLARE @alertName NVARCHAR(200);
-- Create [DBM Perf: Unsent Log Threshold Exceeded]
SELECT @alertName = N'DBM Perf: Unsent Log Threshold Exceeded';
EXEC msdb.dbo.sp_add_alert 
   @name=@alertName, 
   @category_name=N'Database Mirroring',
   @message_id=52042, 
   @severity=0, 
   @delay_between_responses=60, 
   @include_event_description_in=0,
   @enabled=1;
 
-- Create [DBM Perf: Oldest Unsent Transaction Threshold Exceeded]
SELECT @alertName = N'DBM Perf: Oldest Unsent Transaction Threshold Exceeded';
EXEC msdb.dbo.sp_add_alert 
   @name=@alertName, 
   @category_name=N'Database Mirroring',
   @message_id=52040, 
   @severity=0, 
   @delay_between_responses=60, 
   @include_event_description_in=0,
   @enabled=1;
 
-- Create [DBM Perf: Unrestored Log Threshold Exceeded]
SELECT @alertName = N'DBM Perf: Unrestored Log Threshold Exceeded';
EXEC msdb.dbo.sp_add_alert 
   @name=@alertName, 
   @category_name=N'Database Mirroring',
   @message_id=52043, 
   @severity=0, 
   @delay_between_responses=60, 
   @include_event_description_in=0,
   @enabled=1;
 
-- Create [DBM Perf: Mirror Commit Overhead Threshold Exceeded]
SELECT @alertName = N'DBM Perf: Mirror Commit Overhead Threshold Exceeded';
EXEC msdb.dbo.sp_add_alert 
   @name=@alertName, 
   @category_name=N'Database Mirroring',
   @message_id=52044, 
   @severity=0, 
   @delay_between_responses=60, 
   @include_event_description_in=0,
   @enabled=1;
 
 
-- Create [DBM Status: Mirroring Role Change]
SELECT @alertName = N'DBM Status: Mirroring Role Change';
EXEC msdb.dbo.sp_add_alert 
   @name=@alertName, 
   @category_name=N'Database Mirroring',
   @message_id=1480, 
   @severity=0, 
   @delay_between_responses=60, 
   @include_event_description_in=0,
   @enabled=1;
 
-- Create [DBM Status: Mirroring Active as Principal]
SELECT @alertName = N'DBM Status: Mirroring Active as Principal';
EXEC msdb.dbo.sp_add_alert 
   @name=@alertName, 
   @category_name=N'Database Mirroring',
   @message_id=1440, 
   @severity=0, 
   @delay_between_responses=60, 
   @include_event_description_in=0,
   @enabled=1;
 
-- Create [DBM Status: Mirroring Active as Mirror]   
SELECT @alertName = N'DBM Status: Mirroring Active as Mirror';
EXEC msdb.dbo.sp_add_alert 
   @name=@alertName, 
   @category_name=N'Database Mirroring',
   @message_id=1441, 
   @severity=0, 
   @delay_between_responses=60, 
   @include_event_description_in=0,
   @enabled=1;   
   
-- Create [DBM Status: Mirror Inactive]
SELECT @alertName = N'DBM Status: Mirror Inactive';
EXEC msdb.dbo.sp_add_alert 
   @name=@alertName, 
   @category_name=N'Database Mirroring',
   @message_id=1442, 
   @severity=0, 
   @delay_between_responses=60, 
   @include_event_description_in=0,
   @enabled=1;   
   
-- Create [DBM Status: Mirror Terminated]
SELECT @alertName = N'DBM Status: Mirror Terminated';
EXEC msdb.dbo.sp_add_alert 
   @name=@alertName, 
   @category_name=N'Database Mirroring',
   @message_id=1443, 
   @severity=0, 
   @delay_between_responses=60, 
   @include_event_description_in=0,
   @enabled=1;
  
-- Create [DBM Automatic Page Repair: In Progress]
SELECT @alertName = N'DBM Automatic Page Repair: In Progress';
EXEC msdb.dbo.sp_add_alert 
   @name=@alertName, 
   @category_name=N'Database Mirroring',
   @message_id=1432, 
   @severity=0, 
   @delay_between_responses=60, 
   @include_event_description_in=0,
   @enabled=1;
   
-- Create [DBM Automatic Page Repair: Successful]
SELECT @alertName = N'DBM Automatic Page Repair: Successful';
EXEC msdb.dbo.sp_add_alert 
   @name=@alertName, 
   @category_name=N'Database Mirroring',
   @message_id=1461, 
   @severity=0, 
   @delay_between_responses=60, 
   @include_event_description_in=0,
   @enabled=1;
   
-- Create [DBM Automatic Page Repair: Failed]
SELECT @alertName = N'DBM Automatic Page Repair: Failed';
EXEC msdb.dbo.sp_add_alert 
   @name=@alertName, 
   @category_name=N'Database Mirroring',
   @message_id=1481, 
   @severity=0, 
   @delay_between_responses=60, 
   @include_event_description_in=0,
   @enabled=1;
Quit_Alert:

Download the script directly here: Mirror_Alerts.sql

We’ve now successfully created our workaround and should be getting properly detailed alerts based on those conditions. Remember to run these scripts on both your principal and mirror server for complete coverage.

Increased Visibility and Notification with SQL Sentry

Now that we’ve set up reliable detection of our mirroring thresholds, let’s take a look at the increased visibility and automation that can be provided with SQL Sentry Event Manager.

SQL Sentry Event Manager can monitor many SQL related events and show this activity in an Outlook-style calendar view. Among the events that can be monitored and shown are SQL Agent Alerts like the ones we just created.

In our Log Shipping and Replication whitepaper, we show you how to create Custom Event Views for providing visibility into log shipping and replication activity. The same functionality can be applied to mirroring and the mirroring alerts we created. In fact, if you are monitoring your mirrored servers with Event Manager and Performance Advisor, known as the SQL Sentry Power Suite, you can add any Top SQL statements to the view. This allows you to see historically, the exact times high impact queries were executing alongside any mirroring alerts that were likely generated due to the extra load as shown in the example screenshot.

mirperfalert

Notice we get our status alerts too. In the above test I ran queries to generate enough activity against the mirrored database to trigger some of our performance alerts. I can see and be notified of mirror failovers the same way as seen below.

mirfail

With both scenarios I get confirmation from both sides of the mirror because I’ve set up my alerts on both the principal instance and the mirror instance. The same visibility and notification applies to my automatic page repair alerts.

Automation

Monitoring your mirrors with Event Manager can allow you to add automation to your environment as well. The most common action would be to get emails or pages when these alerts are raised. That is basic functionality in Event Manager without the need for database mail. You can get a quick review on setting up notifications in the SQL Sentry User Guide.

Another example might involve an application that requires access to multiple mirrored databases on the same server. Should one failover, you want them all to failover together. SQL Sentry’s Execute SQL actions allow you to do just that. Simply enter the appropriate commands in the Execute SQL action for this alert, and SQL Sentry can automate the failover of the other mirror.

Director of Client Services, Jason Hall (b|t), has a blog post detailing the use of Execute Actions in SQL Sentry.

New in SQL Sentry Version 7

SQL Sentry version 7 has added even more visibility into mirroring. First you may have noticed a new node under your SQL Server instances in the Navigator pane labeled Databases. Double clicking on a database provides details including mirroring information.

mirinfo

Additionally, you may have noticed new metrics in the Performance Advisor dashboard. In the upper right, we have provided a chart for backup throughput. In version 7, should we detect at least one mirrored database on the instance, we’ll show Send and Redo Queue size as well. This provides both real time and historical views into the size of either queue.

queuehist

When you combine this with the calendar visibility for these events and alerting on all these mirroring thresholds and status events, you get comprehensive coverage and can rest assured you’ll know whenever your mirrored databases experience any issues.  If you haven’t already, download a free evaluation copy of the complete SQL Sentry Suite at http://www.sqlsentry.net/download-trial/trial.asp.  And if you have any questions, don’t hesitate to contact me or the rest of the team by emailing support at sqlsentry.net.

67 comments:

  1. Great post! I just started using mirroring on our production database and your alerts will be very important. Thanks again.

    ReplyDelete
  2. Nice Article Steve, i have one Question,if the databases are mirrored do we have to monitor both the instances in PA/EM, if so, does it require a license to monitor a mirrored instance ?

    ReplyDelete
  3. Thanks! Yes, if you want the complete picture you'll want to monitor both instances involved in the mirror. This would be especially important in the event of a failover to ensure you are always monitoring the primary. Regardless you want to ensure you monitor both the Send Queue on the primary as well as the Redo Queue on the mirror. SQL Sentry does require a license for each monitored instance.

    ReplyDelete
  4. There could be others who have the permission to update the data on the database too. It is the duty of the system administrator to frequently check that this privilege is not misused and vital information is tampered. Database Diagram Tool

    ReplyDelete
  5. Thanks for sharing the post.. parents are worlds best person in each lives of individual..they need or must succeed to sustain needs of the family. kit per cancello automatico

    ReplyDelete
  6. Our team at Phone Number For Quickbooks Payroll Support 1(800)674-9538 are responsible for addressing customer needs and ensures that they get the fastest solutions for their queries. for more visit: https://www.payrollsupportphonenumber.com/

    ReplyDelete
  7. QuickBooks Customer Service +1 800-674-9538 team provides solutions that are easy to implement. What further makes them the top-notch source for QuickBooks support is their round the clock availability. for more visit: https://www.payrollsupportphonenumber.com/quickbooks-customer-service/

    ReplyDelete
  8. I don’t know how I landed here. I have rarely seen such a creative and well drafted post. You have summarized the entire subject in an outstanding manner. I could get the entire context in a single tour of the post. Keep writing such posts more often.
    In case there is any technical issues concerning anyone, the team is available at
    QuickBooks Support Phone Number +1 833-222-6943 24/7. It ensures the resolution within the minimum time span. The users can get advice from the technically skilled and qualified professionals. Moreover, they provide specialized guidelines and instructions to their users.
    Visit: https://tinyurl.com/y6g3ng8h

    ReplyDelete
  9. Nice blog! I must appreciate your writing skills and efforts. Thanks for sharing this useful piece of information with us. I am really surprised that this type of good content still exists on internet. I am here with a very useful piece of information. Are you a businessman? Looking to automate your accounting tasks? No need to worry more. Yes, you can use QuickBooks accounting software to manage your business accounting related task. In case you ever stuck with technical issues in the software then feel free to access our support services by dialling QuickBooks Technical support Phone Number +1 800-311-5657
    for more visit: https://www.getsupportphonenumber.com/quickbooks-support-number/

    ReplyDelete
  10. Nice blog! I must appreciate your writing style and the way you tell your point of view. Thanks for sharing this blog. You know you can ease your business management process to a great extent? Yes, this is possible by adapting QuickBooks accounting software. This software consists of power packed tools and features to help you automate your entire
    accounting tasks. In case you ever stuck with technical problem in the software then you can get in touch with professional by dialling QuickBooks Helpline Number +1 800-311-5657. Here, they provide end-to-end technical support for QuickBooks at affordable market price.for more visit: https://www.getsupportphonenumber.com/quickbooks-support-number/

    ReplyDelete
  11. Hi, thanks for sharing this useful blog with us. I must appreciate your valuably and writing style. You have nicely described each point in your blog. I am here to help you in your QuickBooks accounting process. If you are facing any kind of issue while using the software then Phone Number for Quickbooks Payroll Support +1 800-311-5657 is your one-stop
    destination. Here, you can learn a number of tools and techniques for a productive usage of QuickBooks. Additionally, the provide technical support at comfort of your home on wallet-friendly price.for more visit: https://www.getsupportphonenumber.com/quickbooks-support-number/

    ReplyDelete
  12. Wow, what an amazing collection of ideas and an excellent manner of presenting them. I appreciate your efforts and the way of drafting this entire segment of information. It is equally understandable by the beginners as well as those in the learning stage. Now, I want more such kind of posts. I would like to add an important information regarding the technical assistance. The support team is available at Phone Number for QuickBooks Support +1 800-311-5657. They get instant solutions for their users within the nearest time instant. Their aid is quite amazing, concise and available 24/7 round the clock. for more visit: https://www.getsupportphonenumber.com/quickbooks-support-number/

    ReplyDelete
  13. I must say that this synchronization of creativity, presentation and representation is quite impressive. Excellent collection of highly relevant ideas. This post is enough for one to get deep into the topic. I congratulate you for this post. I hope I get such more posts in future. I have got an important update for you regarding the use of QuickBooks. When coming across technical hurdles, the concerned person can call the support team at QuickBooks Support Phone Number +1 833-228-2822. For any assistance required regarding the issues, the team provides an instant relief to the users stuck in troublesome situations.

    ReplyDelete
  14. QuickBooks is an accounting software package developed and marketed by Intuit. QuickBooks products are geared mainly toward small and medium-sized businesses and offer on-premises accounting applications as well as cloud-based versions that accept business payments, manage and pay bills, and payroll functions.Time to time, Intuit releases new updates for its all its QuickBooks editions be it QuickBooks Pro, QuickBooks Premier, QuickBooks Enterprise, QuickBooks Online or QuickBooks Accountant. These updates help with better management of the day to day transactions and remove any errors or bugs. You can more information about the latest updates by dialing the toll-free QuickBooks Support Phone Number. Also, it is very important for QB Users to have knowledge of all the tools and features that are available on QB and how to use them efficiently. If you do not have the right knowledge and are looking to get it then call on the QuickBooks Tech Support Number and learn from the QuickBooks Experts

    ReplyDelete
  15. It gives me an immense pleasure to go through your posts from time to time.
    Because of their unique content and presentation. I wish you a success and hope you
    keep writing more and more such posts.
    I would like to tell you that while working, if you come across technical issues and not
    able to tackle them. Establish a connection with the experts and see your all the
    faults disappearing. There is an assurance that the problem will be sorted out within
    a fixed deadline. You just need to dial theQuickBooks Support Phone Number1-844-235-3996 to get assistance.
    Vsit :- https://tinyurl.com/yynvmjf2

    ReplyDelete
  16. It gives me an immense pleasure to go through your posts from time to time.
    Because of their unique content and presentation. I wish you a success and hope you
    keep writing more and more such posts.
    I would like to tell you that while working, if you come across technical issues and not
    able to tackle them. Establish a connection with the experts and see your all the
    faults disappearing. There is an assurance that the problem will be sorted out within
    a fixed deadline. You just need to dial theQuickBooks Support Phone Number1-844-235-3996 to get assistance.
    Vsit :- https://tinyurl.com/yynvmjf2

    ReplyDelete
  17. It gives me an immense pleasure to go through your posts from time to time.
    Because of their unique content and presentation. I wish you a success and hope you
    keep writing more and more such posts.
    I would like to tell you that while working, if you come across technical issues and not
    able to tackle them. Establish a connection with the experts and see your all the
    faults disappearing. There is an assurance that the problem will be sorted out within
    a fixed deadline. You just need to dial theQuickBooks Support Phone Number1-844-235-3996 to get assistance.
    Vsit :- https://tinyurl.com/yynvmjf2

    ReplyDelete
  18. Nice Blog Thanks for sharing this useful link. It’s a really informative for all. QuickBooks is one of the best accounting software which helps in managing your company finances and accounting. Any technical issue obstructing your way ahead? Call us now on Quickbooks Support Phone Number 1-800-986-4607.

    ReplyDelete
  19. https://www.leansimulations.org/2011/02/lean-lego-game-4-rounds-to-successful.html?showComment=1564726272863#c2355939943514120111

    ReplyDelete
  20. Hey! What an outstanding post. I really like your work. I have been using QuickBooks from past 2 years. Overall QuickBooks is a wonderful accounting software for small and medium sized businesses. By installing QuickBooks, you can save your time and money. You can even get live help and support at QuickBooks Tech Support Phone Number 1-855-236-7529.
    Rea more: https://www.techiesupportnumber.com/quickbooks-contact-number/
    Website: https://tinyurl.com/y3kahnzm

    ReplyDelete
  21. Hey! What an outstanding post. I really like your work. I have been using QuickBooks from past 2 years. Overall QuickBooks is a wonderful accounting software for small and medium sized businesses. By installing QuickBooks, you can save your time and money. You can even get live help and support at QuickBooks Tech Support Phone Number 1-855-236-7529.
    Rea more: https://www.techiesupportnumber.com/quickbooks-contact-number/
    Website: https://tinyurl.com/y3kahnzm

    ReplyDelete
  22. Hey! What an outstanding post. I really like your work. I have been using QuickBooks from past 2 years. Overall QuickBooks is a wonderful accounting software for small and medium sized businesses. By installing QuickBooks, you can save your time and money. You can even get live help and support at QuickBooks Tech Support Phone Number 1-855-236-7529.
    Rea more: https://www.techiesupportnumber.com/quickbooks-contact-number/
    Website: https://tinyurl.com/y3kahnzm

    ReplyDelete
  23. Our team at QuickBooks Support Phone Number +1 800-417-3165 has been providing its matchless assistance for the errors in QuickBooks for quite a long time. Though this software is regarded as one of the top most accounting applications in the world, it is often accompanied by some errors. Before we jump onto its errors, let’s have a brief introduction of QuickBooks. Visit us- https://www.theqbsupportphonenumber.com/

    ReplyDelete
  24. QuickBooks error 6073
    It would be a delight for you to know that this team is available at your service for 24 hours. Therefore, in future, if you ever encounter QuickBooks error 6073 just call at QuickBooks Support Phone Number +1 800-417-3165 and all your issues will vanish. Read more- https://tinyurl.com/y4dd4brh & visit us- https://www.qbcustomersupportphonenumber.com/quickbooks-error-6073/
    QuickBooks error 6129
    So, next time if you face any issue in this software like QuickBooks error 6129 call at QuickBooks Support Phone Number +1 800-417-3165. Read more- https://tinyurl.com/y4jmbpdr & visit us-https://www.qbcustomersupportphonenumber.com/quickbooks-error-6129/

    ReplyDelete
  25. QuickBooks error 6147
    Apart from this, these guys are available 24*7 to fix issues like QuickBooks error 6147 for you. So, dial QuickBooks Support Phone Number +1 800-417-3165 and get away with the problems in this software. Read more- https://tinyurl.com/y2w6wh5r & visit us-https://www.qbcustomersupportphonenumber.com/quickbooks-error-6147/
    QuickBooks error 6150
    Apart from this, these guys are available round the clock at your service. So, in case you encounter QuickBooks error 6150 in future, do not hesitate to call the team at QuickBooks Support Phone Number +1 800-417-3165. Read more- https://tinyurl.com/y3fd9f6s & visit us-https://www.qbcustomersupportphonenumber.com/quickbooks-error-6150/

    ReplyDelete
  26. QuickBooks error 6210
    Also, these guys are quite friendly in nature and are always ready to help you even at the wee hours. So, call them at QuickBooks Support Phone Number +1 800-417-3165 without any doubt the next time you encounter QuickBooks error 6210. Read more- https://tinyurl.com/y5qqjzah & visit us- https://www.qbcustomersupportphonenumber.com/quickbooks-error-6210/
    QuickBooks error 61
    So, stop wasting your time in the search of a dependable support team, rather call at QuickBooks Support Phone Number +1 800-417-3165 and get QuickBooks error 61 fixed in no time. Read more- https://tinyurl.com/y25pyzw6 & visit us- https://www.qbcustomersupportphonenumber.com/quickbooks-error-61/

    ReplyDelete
  27. QuickBooks error OLSU 1013
    Also, this exceptional team is available 24/7 at your service. So, call the team at QuickBooks Support Phone Number+1 800-417-3165 to get done with the errors in QuickBooks error OLSU 1013. Read more- https://tinyurl.com/y3vrhfuu & visit us- https://www.qbcustomersupportphonenumber.com/quickbooks-error-olsu-1013/
    QuickBooks error 102
    And most of all, they are available at your service for 24 hours. So just dial their toll-free number +1 800-417-3165 and get away with the issues like QuickBooks error 102. Read more- https://tinyurl.com/y59pl7e8 7 visit us-https://www.qbcustomersupportphonenumber.com/quickbooks-error-102/

    ReplyDelete
  28. Being customer friendly with all their customers is another quality of this team. Hence, call them at their toll-free number +1 800-417-3165 and get fixed issues like QuickBooks installation error. Read more- https://tinyurl.com/y6znyj9d & visit us- https://www.qbcustomersupportphonenumber.com/quickbooks-installation-error/

    ReplyDelete
  29. QuickBooks error 324
    So, next time if you come across QuickBooks error 324 wave it a big good bye by calling at QuickBooks Support Phone Number +1 800-417-3165. Read more- https://tinyurl.com/yxzc4jkg & visit us- https://www.qbcustomersupportphonenumber.com/quickbooks-error-324/
    QuickBooks Install Error 1904
    So, in future if you ever come across QuickBooks Install Error 1904 just dial QuickBooks Support Phone Number +1 800-417-3165. Read more- https://tinyurl.com/y6sfzl3u & visit us- https://www.qbcustomersupportphonenumber.com/quickbooks-install-error-1904/

    ReplyDelete
  30. Hi, I was looking for content that can help me with my project. Thank you! All the points that are mentioned in your blog are relevant and simple to understand. You can even manage your work by downloading QuickBooks. For more help related to issues, contact us at QuickBooks Tech Support Phone Number +1 833-222-6943. The teams of professional technicians are available 24 hours 365 days.
    Visit more: https://www.qbtechservices.com/

    ReplyDelete
  31. Hey loved all that you shared. Undoubtedly, you have some of the best posts that I have come across. Keep going and all the best. Now, you can easily manage your time by downloading QuickBooks software. For any issues related to this software, you can contact us at QuickBooks Enterprise Support Phone Number +1 833-222-6943.
    You can even visit the website https://www.qbtechservices.com/ to know about the policies and services.

    ReplyDelete
  32. Nice Blog It’s a really informative for all. QuickBooks is a reliable accounting software. You can easily use and install QuickBooks. We are providing technical support in Quickbooks Support Phone Number 1800. Please call us our Toll-free Number + 1-800-986-4607.

    ReplyDelete
  33. Nice Blog Thanks for sharing this use full link. QuickBooks is a reliable accounting software. You can easily use and install QuickBooks. We are providing technical support in Quickbooks Payroll Support Phone Number . Our technical support team is 24*7 available so if you need any help. Please call us our Toll-free Number + 1-800-986-4607.

    ReplyDelete
  34. Nice Blog It’s a really informative QuickBooks is designed to meet your ever-increasing business accounting needs. Are QuickBooks errors troubling you ? Quickbooks for MAC support phone number it is Specifically designed for MAC operating system.We are providing 24*7 technical support so if you need any query.Please call us our Toll-free Number + 1-800-986-4607

    ReplyDelete
  35. I think I must mention your outstanding writing skills. Well, your skills are unique and reader-engaging. You must write more often to share knowledge and publicize your skills. I have used QuickBooks for many years and find myself happy with the support team. You can check out their star services in technically difficult situations at QuickBooks Pro Support Phone Number+1 833-222-6943
    Visit: https://www.qbtechservices.com

    ReplyDelete
  36. This comment has been removed by the author.

    ReplyDelete
  37. Like other software available in market, QuickBooks also have certain bugs and error which are resolved with stable updates. But few of them are still untouched and rolls out again with updated software. One of them is QuickBooks Error 5502. To get solution for error 5502, call us on our QuickBooks support phone number +1 800-417-3165. Read more- https://tinyurl.com/y3ykf8uo & visit us- https://www.qbcustomersupportphonenumber.com/

    ReplyDelete
  38. Hello Friend,
    I simply was waiting for your post as I love reading your beautiful and informative post. This
    post of yours is absolutely awe-inspiring and exciting. This post of yours is so tempting that I
    am reading again and again. Keep up the hard-work friend and post more and regularly.
    QuickBooks is one of the most sought after accounting software which is widely being used by
    businesses across the world. Apart from its relentless solution, this software is also bounded by
    several bugs and errors. In such a case you can call our QuickBooks Payroll Support Phone Number 1-844-235-3996. and evade all the errors and bugs instantly.

    ReplyDelete
  39. Enjoyed a lot going through your post, the beautiful composure of your post is rocking. Keep
    posting more, with the same spirit. QuickBooks POS is phenomenal software and a versatile
    point-of-solution that is used by the business for credit payment processing, inventory and sale
    management, bills management, etc. As this brilliant software has countless benefits it is also
    bounded by several bugs and errors. Thus, while using this software if you face any error, you
    can call our POS experts at our QuickBooks POS Support Phone Number 1-844-235-3996 and avail instant
    solutions for your problems.

    ReplyDelete
  40. You can call QuickBooks Payroll Support Phone Number 1-888-383-1303 anytime to activate your Payroll Subscription and avail the benefits of Payroll Services. If you are looking to activate Payroll in your QuickBooks then get in touch with the Payroll experts available at QuickBooks Payroll Support Number 1-888-383-1303.
    Quickbooks Payroll Support Phone Number

    ReplyDelete
  41. Nice Blog ! Quickbooks Payroll Support Phone Number is available to meet the needs of quickbooks customers. Users can avail a huge number of benefits on using services by the support team. Dial our toll-free number 1-800-986-4607 now to meet your accounting needs at one place.

    ReplyDelete
  42. Are you Looking Quickbooks For MAC Support Phone Number? Our MAC support team is ready to help you with our quickbooks support phone number. We deliver you the finest and the most optimal solutions.

    ReplyDelete
  43. Since its presentation in SQL Server 2005 SP1, reflecting has become a typical strategy to give high accessibility to basic databases. SQL Server gives a few appropriate exhibition counters, just as the Database Mirroring Monitor, to give a base degree of perceivability. https://www.ublauditing.com/Auditing

    ReplyDelete
  44. It would also motivate almost everyone to save this webpage for their favorite helper to help get the look published.
    Data Science Certification in Pune

    ReplyDelete
  45. I am glad to see this brilliant post. all the details are very helpful and good for us, keep up to good work.I found some useful information in your blog, it was awesome to read, thanks for sharing this great content to my vision, keep sharing.
    Data Science Course in Pune

    ReplyDelete
  46. Very useful post. I found so many interesting stuff in your blog. Truly, its great article. Will look forward to read more articles...

    Data Science Training in Hyderabad

    ReplyDelete
  47. Nice Information I read this hope you share another ane thanks.here, is Nora our organization are providing security software and build your website and promote your brand you can go and read this.
    crypto wallet|
    exodus wallet|
    metamask wallet|
    trezor wallet|
    phantom wallet|

    ReplyDelete
  48. Thanks for the great post you posted. I like the way you describe the unique content. The points you raise are valid and reasonable. I am a tech support expert telling you about.
    robinhood wallet
    Robinhood Crypto Wallet
    MetaMask Login

    ReplyDelete
  49. Casino Loyalty and VIP Bonuses – Loyalty Bonuses are where the Casino gives you extra in exchange for you being a Loyal Customer. Much like any good business should.http://E-Vegas.com

    ReplyDelete

  50. Go to Slope Wallet official website and select from Android or iOS for mobile application and select Chrome for desktop. You can also go directly to the Chrome Store, Google Play, or App Store. Then, search "Slope Wallet" and install.
    Atomic Wallet |

    ReplyDelete
  51. I'm delighted to notice some excellent articles on your website. I sincerely appreciate it; thank you for sharing.
    divorce laws New Jersey

    ReplyDelete
  52. I am happy to see a nice post. It is very excellent and insights are truly inspired. Thanks for sharing and good luck for future updates. Traffic Lawyer Prince William VA

    ReplyDelete
  53. Great informative post on SQL database. Really it is helpful for many tech people. Keep posting more informative tech blogs for us. Tax Fraud Lawyer

    ReplyDelete
  54. In the complex financial world of today, tax fraud charges are becoming an increasing concern. The intricate network of tax laws and regulations can ensnare both people and businesses. Hiring a trained expert is essential when handling these kinds of allegations. A "Lawyer for Tax Fraud" is a vital ally to effectively negotiate the treacherous waters of tax fraud claims. href="https://federalcriminallawyer.info/lawyer-for-tax-fraud/">Lawyer for Tax Fraud

    ReplyDelete
  55. Your blog approaches the delicate subject of divorce with compassion and grace. For folks in New York who are looking for advice, the materials and information you've gathered are priceless. I appreciate you creating such a welcoming environment for our discussion.
    ¿Cómo Puedo Divorcio en Nueva York?

    ReplyDelete
  56. traffic lawyer loudoun va
    For expert assistance with traffic violations in Loudoun, VA, search for skilled traffic lawyers nearby. Utilize online platforms or legal directories to find attorneys with experience in Loudoun County traffic cases. Consider reviews, ratings, and recommendations to gauge their effectiveness. Local bar associations and legal aid organizations can also provide valuable information. By seeking a qualified traffic lawyer in Loudoun, VA, you ensure competent representation to navigate the legal intricacies of your case and potentially mitigate the consequences associated with the traffic offense.






    ReplyDelete
  57. A heartfelt thanks for continually creating top-tier content on your blog. Your commitment to delivering valuable insights and engaging material is truly appreciated. Your blog has transformed into a dependable source for information and motivation. Keep up the fantastic work!Middlesex County Driving Without a License Attorney and Middlesex County Driving Without a License Lawyer

    ReplyDelete
  58. The review praises SQL Sentry's Database Mirror Monitoring and Automation for its efficiency in streamlining processes, ensuring seamless performance of database mirrors, and its monitoring capabilities, making it a valuable solution. Quick Divorce in New York State

    ReplyDelete
  59. This comment has been removed by the author.

    ReplyDelete
  60. Just needed to educate you that you have individuals like me who value your work. Unquestionably an extraordinary post. divorcio de mutuo acuerdo fredericksburg virginia

    ReplyDelete
  61. Mirror monitoring and automation involve the use of technology to track and manage mirrors in various applications. This includes but is not limited to security surveillance, industrial processes, and automotive systems. Through advanced sensors and software algorithms, mirror monitoring systems can detect anomalies, monitor performance, and trigger automated responses when necessary.
    How to Divorce in New York
    How to get a No Fault Divorce in New York

    ReplyDelete
  62. Reflect observing and mechanization include the utilization of innovation to follow, dissect, and advance different parts of business tasks or frameworks, offering ongoing bits of knowledge and computerized reactions to further develop effectiveness and execution. This approach frequently uses sensors, information investigation, and man-made reasoning to screen processes, recognize irregularities, and trigger robotized activities or alarms for convenient mediation or streamlining.
    new york domestic violence laws
    domestic violence new york

    ReplyDelete

  63. LEGOLAND® Dubai is the ultimate theme park for children 2-12 and their families in Dubai. Enjoy LEGO® themed adventures through interactive rides,LEGOLAND® Dubai is the ultimate world of year-round LEGO® theme park adventures for families with children aged 2-12. LEGOLAND Dubai | Dubai Frame | Dubai Mall

    ReplyDelete