Home Microsoft SQL Server DigiMailing iRN Contact



This is a procedure in the mssqlsystemresource database. It call's the internal sys.sp_MSprocesslogshippingmonitorsecondary as it is described in the procedure name.

create procedure sys.sp_processlogshippingmonitorsecondary
    @mode tinyint -- 1 = add, 2 = delete, 3 = update
    ,@secondary_server sysname
    ,@secondary_database sysname = NULL
    ,@secondary_id uniqueidentifier
    ,@primary_server sysname = NULL
    ,@monitor_server sysname
    ,@monitor_server_security_mode bit
    ,@primary_database sysname = NULL
    ,@restore_threshold int = NULL
    ,@threshold_alert int = NULL
    ,@threshold_alert_enabled bit = NULL
    ,@last_copied_file nvarchar(500) = NULL
    ,@last_copied_date datetime = NULL
    ,@last_copied_date_utc datetime = NULL
    ,@last_restored_file nvarchar(500) = NULL
    ,@last_restored_date datetime = NULL
    ,@last_restored_date_utc datetime = NULL
    ,@last_restored_latency int = NULL
    ,@history_retention_period int = NULL
    set nocount on
    declare @retcode int

    -- security check
    exec @retcode = sys.sp_MSlogshippingsysadmincheck
    if (@retcode != 0 or @@error != 0)
        return 1
    -- This should be called only on the remote monitor server
    if (@monitor_server is null or upper(@monitor_server) != upper(@@servername)
            or upper(@monitor_server) = upper(@secondary_server))
        return 0
    -- must be invoked from MSDB
    if (db_name() != N'msdb')
        raiserror (21482, 16, -1, N'sp_processlogshippingmonitorsecondary', N'msdb')
        return 1
    -- call the internal proc now
    exec @retcode = sys.sp_MSprocesslogshippingmonitorsecondary @mode = @mode
                ,@secondary_server = @secondary_server
                ,@secondary_database = @secondary_database
                ,@secondary_id = @secondary_id
                ,@primary_server = @primary_server
                ,@monitor_server = @monitor_server
                ,@monitor_server_security_mode = @monitor_server_security_mode
                ,@primary_database = @primary_database
                ,@restore_threshold = @restore_threshold
                ,@threshold_alert = @threshold_alert
                ,@threshold_alert_enabled = @threshold_alert_enabled
                ,@last_copied_file = @last_copied_file
                ,@last_copied_date = @last_copied_date
                ,@last_copied_date_utc = @last_copied_date_utc
                ,@last_restored_file = @last_restored_file
                ,@last_restored_date = @last_restored_date
                ,@last_restored_date_utc = @last_restored_date_utc
                ,@last_restored_latency = @last_restored_latency
                ,@history_retention_period = @history_retention_period
    if (@retcode != 0 or @@error != 0)
        return 1
    -- all done
    return 0

Last revision 2008RTM
See also

  sp_MSprocesslogshippingmonitorsecondary (Procedure)
sp_MSproxylogshippingmonitorrefresh (Procedure)
sp_MSproxylogshippingmonitorsecondary (Procedure)
sp_refresh_log_shipping_monitor (Procedure)


  Query a named instance
SQL 2008 R2
Deprecated procedures in SQL2008
Reporting Services item-level role definitions
Create all your missing indexes
Converting datetime field
Start MSSQL Server Profiler at time
Replicating MSSQL Server views
Exploring Microsoft Sharepoint
The OLE DB provider "SQLNCLI10" for linked server indicates.
Mobile solar charger
Oracle to SQL Server replication
Cannot insert the value NULL into column
Undocumented Microsoft SQL Server 2008
Zoekmachine optimalisatie
SQL Servers hidden objects
Flash in Ajax
De hype die AJAX heet
Barcode scannen
MySQL; Gratis, makkelijk en snel!
sIFR; de combinatie tussen HTML en Flash