title | description | author | ms.author | ms.reviewer | ms.date | ms.service | ms.subservice | ms.topic | f1_keywords | helpviewer_keywords | dev_langs | ||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
sp_add_log_shipping_alert_job (Transact-SQL) |
This stored procedure checks to see if an alert job has been created on this server. |
MashaMSFT |
mathoma |
randolphwest |
08/21/2024 |
sql |
system-objects |
reference |
|
|
|
[!INCLUDE SQL Server]
This stored procedure checks to see if an alert job has been created on this server. If an alert job doesn't exist, sp_add_log_shipping_alert_job
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.
:::image type="icon" source="../../includes/media/topic-link-icon.svg" border="false"::: Transact-SQL syntax conventions
sp_add_log_shipping_alert_job
[ , [ @alert_job_id = ] alert_job_id OUTPUT ]
[ ; ]
The [!INCLUDE ssNoVersion] Agent job ID of the log shipping alert job.
0
(success) or 1
(failure).
None.
sp_add_log_shipping_alert_job
must be run from the master
database on the monitor server.
Only members of the sysadmin fixed server role can run this procedure.
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;