3.14 LogShipping

Use this Knowledge Script to monitor log shipping status. Log shipping is a process in which transaction logs from a primary Microsoft SQL Server are applied sequentially on a scheduled basis to another Microsoft SQL Server.

On the first job iteration, this script sets a starting point for future log scanning and does not scan the existing entries in the logs. Therefore, it does not return any results on the first iteration. As it continues to run at the interval specified in the Schedule tab, this script scans the logs for any new entries created since the last time it checked.

This script raises an event if the number of successful log shipping records exceeds the threshold you specify, and if log shipping fails for any reason.

Resource Objects

Microsoft SQL Server instances

Default Schedule

The default interval for this script is Every hour.

Setting Parameter Values

Set the following parameters as needed:

Description

How to Set It

General Settings

 

Job Failure Notification

 

Raise event if job fails unexpectedly?

Select Yes to raise an event if the SQLServer_LogShipping job fails unexpectedly. The default is Yes.

Event severity when job fails unexpectedly

Set the event severity level, from 1 to 40, to indicate the importance of an event that is raised when the job fails unexpectedly. The default is 5.

Additional Settings

 

Event Details

Event detail format

Select the format in which you want to display the event detail. You can select from HTML Table or Plain Text. The default is HTML Table.

Monitor Log Shipping

 

Event Notification

 

Raise event if number of successful log shipped records exceeds threshold?

Select Yes to raise an event if the number of successful log shipping records exceeds threshold. The default is Yes.

Event severity when number of successful log shipped records exceeds threshold

Set the event severity level, from 1 to 40, to indicate the importance of an event in which the number of successful log shipping records exceeds the threshold you specify. The default is 25.

Threshold- Maximum number of successful log shipped records

Specify the maximum number of successful log shipping records that can be found before an event is raised. The default is 100 entries.

Raise event if number of failure log shipped records exceeds threshold?

Select Yes to raise an event if the number of log shipping records that failed exceeds the threshold. The default is Yes.

Exclude monitoring of the backup errors?

Select Yes to exclude the monitoring of the backup errors of SQL Server databases. The default is unselected.

IMPORTANT:This parameter is effective only when the Raise event if number of failure log shipped records exceeds threshold? parameter is selected.

Event severity when number of failure log shipped records exceeds threshold

Set the event severity level, from 1 to 40, to indicate the importance of an event in which the number of log shipping that failed exceeds the threshold you specify. The default is 5

Threshold- Maximum number of failure log shipped records

Specify the maximum number of log shipping records that can fail before an event is raised. The default is 0.

Data Collection

Collect data for successful records of log shipping?

Select Yes to collect data for successful log shipping records for charts and reports.The default is unselected.

Collect data for failure records of log shipping?

Select Yes to collect data for failed log shipping records for charts and reports. The default is unselected.

Custom data stream legend

Specify a custom data stream legend to display in the Graph Data tab.