﻿<?xml version='1.0' encoding='UTF-8'?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>SQLServerCentral / Administration / SQL Server 7,2000  / Log Shipping monitor scheduled job / Latest Posts</title><generator>InstantForum.NET v2.9.0</generator><description>SQLServerCentral</description><link>http://www.sqlservercentral.com/Forums/</link><webMaster>notifications@sqlservercentral.com</webMaster><lastBuildDate>Tue, 21 May 2013 03:54:39 GMT</lastBuildDate><ttl>20</ttl><item><title>Log Shipping monitor scheduled job</title><link>http://www.sqlservercentral.com/Forums/Topic1385078-5-1.aspx</link><description>HI all,We have a scheduled task that I believe is redundant (due to us having 3rd party monitoring software) and that, as a job in its own right, is causing alerts to fire when it fails.Can anyone confirm/refute what I believe the script does?  I believe one sproc basically checks whether log shipping is still in synch, and if not, fires another that generates an error in the SQL log.  As we are using the monitoring tool we therefore have double the number of alerts needed.The idea is to disable/delete this job if found redundant.Thanks,BLLCREATE PROCEDURE sp_log_shipping_monitor_backup ASBEGIN  DECLARE @primary_id                  sysname  DECLARE @primary_server_name         sysname   DECLARE @primary_database_name       sysname   DECLARE @maintenance_plan_id         UNIQUEIDENTIFIER  DECLARE @backup_threshold            INT  DECLARE @threshold_alert             INT   DECLARE @threshold_alert_enabled     BIT   DECLARE @last_backup_filename        sysname   DECLARE @last_updated                DATETIME  DECLARE @planned_outage_start_time   INT  DECLARE @planned_outage_end_time     INT   DECLARE @planned_outage_weekday_mask INT  DECLARE @sync_status                 INT  DECLARE @backup_delta                INT  DECLARE @delta_string                NVARCHAR (10)  DECLARE @dt                             DATETIME  SELECT @dt = GETDATE ()  SET NOCOUNT ON  DECLARE bmlsp_cur CURSOR FOR    SELECT primary_id,            primary_server_name,            primary_database_name,     	   maintenance_plan_id,            backup_threshold,            threshold_alert,            threshold_alert_enabled,            last_backup_filename,            last_updated,           planned_outage_start_time,            planned_outage_end_time,            planned_outage_weekday_mask     FROM msdb.dbo.log_shipping_primaries    FOR READ ONLY  OPEN bmlsp_curloop:  FETCH NEXT FROM bmlsp_cur   INTO @primary_id,        @primary_server_name, 	   @primary_database_name, 	   @maintenance_plan_id,       @backup_threshold, 	   @threshold_alert, 	   @threshold_alert_enabled, 	   @last_backup_filename, 	   @last_updated,   	   @planned_outage_start_time,       @planned_outage_end_time, 	   @planned_outage_weekday_mask  IF @@FETCH_STATUS &amp;lt;&amp;gt; 0 -- nothing more to fetch, finish the loop    GOTO _loop  EXECUTE @sync_status = sp_log_shipping_in_sync    @last_updated,    @dt,	  @backup_threshold,  	@planned_outage_start_time,  	@planned_outage_end_time,    @planned_outage_weekday_mask,  	@threshold_alert_enabled,  	@backup_delta OUTPUT   IF (@sync_status &amp;lt; 0)   BEGIN     SELECT @delta_string = CONVERT (NVARCHAR(10), @backup_delta)     RAISERROR (@threshold_alert, 16, 1, @primary_server_name, @primary_database_name, @delta_string)   END  GOTO loop_loop:  CLOSE bmlsp_cur  DEALLOCATE bmlsp_curENDGO</description><pubDate>Thu, 15 Nov 2012 04:14:44 GMT</pubDate><dc:creator>blacklabellover2003</dc:creator></item></channel></rss>