Skip to content

Latest commit

 

History

History
65 lines (50 loc) · 2.3 KB

File metadata and controls

65 lines (50 loc) · 2.3 KB
title sp_add_log_shipping_alert_job (Transact-SQL) | Microsoft Docs
ms.custom
ms.date 03/14/2017
ms.prod sql
ms.prod_service database-engine
ms.reviewer
ms.technology system-objects
ms.topic language-reference
f1_keywords
sp_add_log_shipping_alert_job_TSQL
sp_add_log_shipping_alert_job
dev_langs
TSQL
helpviewer_keywords
sp_add_log_shipping_alert_job
ms.assetid dd95d96e-8963-4aa9-bdcc-3e4b1bc002d3
author MashaMSFT
ms.author mathoma

sp_add_log_shipping_alert_job (Transact-SQL)

[!INCLUDEtsql-appliesto-ss2008-xxxx-xxxx-xxx-md]

This stored procedure checks to see if an alert job has been created on this server. If an alert job does not exist, this stored procedure creates the alert job and adds its job ID to the log_shipping_monitor_alert table. The alert job is enabled by default and runs on a schedule of once every two minutes.

Topic link icon Transact-SQL Syntax Conventions

Syntax

  
sp_add_log_shipping_alert_job  
[, [ @alert_job_id = ] alert_job_id OUTPUT ]  

Arguments

[ @alert_job_id = ] alert_job_id OUTPUT The [!INCLUDEmsCoName] [!INCLUDEssNoVersion] Agent job ID of the log shipping alert job.

Return Code Values

0 (success) or 1 (failure)

Result Sets

None

Remarks

sp_add_log_shipping_alert_job must be run from the master database on the monitor server.

Permissions

Only members of the sysadmin fixed server role can run this procedure.

Examples

This example shows the execution of sp_add_log_shipping_alert_job to create an alert job ID.

USE master  
GO  
EXEC sp_add_log_shipping_alert_job;  

See Also

About Log Shipping (SQL Server)
System Stored Procedures (Transact-SQL)