log_shipping_monitor_error_detail (Transact-SQL)


Updated: June 10, 2016

THIS TOPIC APPLIES TO:yesSQL Server (starting with 2008)noAzure SQL DatabasenoAzure SQL Data Warehouse noParallel Data Warehouse

Stores error detail for log shipping jobs. This table is stored in the msdb database.

The tables related to history and monitoring are also used at the primary server and the secondary servers.

Column nameData typeDescription
agent_iduniqueidentifierThe primary ID for backup or the secondary ID for copy or restore.
agent_typetinyintThe type of log shipping job.

0 = Backup.

1 = Copy.

2 = Restore.
session_idintThe session ID for the backup/copy/restore/ job.
database_namesysnameThe name of the database associated with this error record. Primary database for backup, secondary database for restore, or empty for copy.
sequence_numberintAn incremental number indicating the correct order of information for errors that span multiple records.
log_timedatetimeThe date and time at which the record was created.
log_time_utcdatetimeThe date and time at which the record was created, expressed in Coordinated Universal Time.
messagenvarcharMessage text.
sourcenvarcharThe source of the error message or event.
help_urlnvarcharThe URL, if available, where more information about the error can be found.

This table contains error detail for the log shipping agents. Each error is logged as a sequence of exceptions. There can be multiple errors (sequences) for each agent session.

In addition to being stored on the remote monitor server, the information related to the primary server is stored on the primary server in its log_shipping_monitor_error_detail table, and information related to a secondary server is also stored on the secondary server in its log_shipping_monitor_error_detail table.

To identify an agent session, use columns agent_id, agent_type, and session_id. Sort by log_time to see the errors in the order in which they were logged.

About Log Shipping (SQL Server)
log_shipping_monitor_history_detail (Transact-SQL)
sp_cleanup_log_shipping_history (Transact-SQL)
sp_delete_log_shipping_primary_database (Transact-SQL)
sp_delete_log_shipping_secondary_database (Transact-SQL)
sp_refresh_log_shipping_monitor (Transact-SQL)
System Tables (Transact-SQL)

Community Additions