Partilhar via


log_shipping_monitor_history_detail (Transact-SQL)

Stores history details 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 name Data type Description

agent_id

uniqueidentifier

The primary ID for backup or the secondary ID for copy or restore.

agent_type

tinyint

The type of log shipping job.

0 = Backup.

1 = Copy.

2 = Restore.

session_id

int

The session ID for the backup/copy/restore/ job.

database_name

sysname

The name of the database associated with this record. Primary database for backup, secondary database for restore, or empty for copy.

session_status

tinyint

The status of the session.

0 = Starting.

1 = Running.

2 = Success.

3 = Error.

4 = Warning.

log_time

datetime

The date and time at which the record was created.

log_time_utc

datetime

The date and time at which the record was created, expressed in Coordinated Universal Time.

message

nvarchar(max)

Message text.

Remarks

This table contains history details for the log shipping agents. To identify an agent session, use columns agent_id, agent_type, and session_id. To see the history detail for the agent session, sort by log_time.

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_history_detail table, and information related to a secondary server is also stored on the secondary server in its log_shipping_monitor_history_detail table.

See Also

Reference

sp_delete_log_shipping_primary_database (Transact-SQL)
sp_cleanup_log_shipping_history (Transact-SQL)
sp_refresh_log_shipping_monitor (Transact-SQL)
sp_delete_log_shipping_secondary_database (Transact-SQL)
System Tables (Transact-SQL)
log_shipping_monitor_error_detail (Transact-SQL)

Other Resources

Log Shipping
Log Shipping Tables and Stored Procedures

Help and Information

Getting SQL Server 2005 Assistance