Ask Learn
Preview
Please sign in to use this experience.
Sign inThis browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
1.Log Shipping status
View the Log Shipping Report (SQL Server Management Studio)
https://msdn.microsoft.com/en-us/library/ms181149.aspx
sp_help_log_shipping_monitor (Transact-SQL)
https://msdn.microsoft.com/en-us/library/ms187820.aspx
sp_help_log_shipping_monitor
Remarks
sp_help_log_shipping_monitor must be run from the master database on the monitor server.
Permissions
Requires membership in the sysadmin fixed server role.
找出Monitoring Server方法
SELECT monitor_server FROM msdb.dbo.log_shipping_primary_databases;
or
SELECT monitor_server FROM msdb.dbo.log_shipping_secondary;
2.Job History
View the Job History
https://msdn.microsoft.com/en-us/library/ms181046.aspx
or
-- lists all job information for the NightlyBackups job.
USE msdb ;
GO
EXEC dbo.sp_help_jobhistory
@job_name = N'LSRestore_ServerName_DBname' ;
GO
3.Backup and Restore History
Backup History and Header Information (SQL Server)
https://msdn.microsoft.com/en-us/library/ms188653.aspx
Query SQL Server backup history and restore history records
https://blogs.msdn.microsoft.com/bradchen/2014/03/12/query-sql-server-backup-history-and-restore-history-records/
4.ERRORLOG
View the SQL Server Error Log (SQL Server Management Studio)
https://msdn.microsoft.com/en-us/library/ms187109.aspx
5.Event log
Start Event Viewer
https://technet.microsoft.com/en-us/library/cc766401(v=ws.11).aspx
Reference:
Monitor Log Shipping (Transact-SQL)
https://msdn.microsoft.com/en-us/library/ms190224.aspx
Stored procedure | Description | Run this procedure on |
---|---|---|
sp_help_log_shipping_monitor_primary | Returns monitor records for the specified primary database from the log_shipping_monitor_primary table. | Monitor server or primary server |
sp_help_log_shipping_monitor_secondary | Returns monitor records for the specified secondary database from the log_shipping_monitor_secondary table. | Monitor server or secondary server |
sp_help_log_shipping_alert_job | Returns the job ID of the alert job. | Monitor server, or primary or secondary server if no monitor is defined |
sp_help_log_shipping_primary_database | Retrieves primary database settings and displays the values from the log_shipping_primary_databases and log_shipping_monitor_primary tables. | Primary server |
sp_help_log_shipping_primary_secondary | Retrieves secondary database names for a primary database. | Primary server |
sp_help_log_shipping_secondary_database | Retrieves secondary-database settings from the log_shipping_secondary, log_shipping_secondary_databases and log_shipping_monitor_secondary tables. | Secondary server |
sp_help_log_shipping_secondary_primary (Transact-SQL) | This stored procedure retrieves the settings for a given primary database on the secondary server. | Secondary server |
Bring Database back to norecovery mode from standby mode(Standby / Read-Only)
RESTORE DATABASE [AdventureWorks]
WITH NORECOVERY;
Adding a log shipping monitor
https://www.sqlservercentral.com/articles/Log+Shipping/77295/
Please sign in to use this experience.
Sign in