SQL Flow Field Guide

sys.sp_delete_log_shipping_secondary_primary

Check SQL Server version support in the source

Removes the information about the specified primary server from the secondary server, and removes the copy job and restore job from the secondary.

What changes

Input
Not stated in the Microsoft summary.
Output or change
Removes the information about the specified primary server from the secondary server, and removes the copy job and restore job from the secondary.

Syntax at a glance

sys.sp_delete_log_shipping_secondary_primary
    [ @primary_server = ] N'primary_server'
    , [ @primary_database = ] N'primary_database'
[ ; ]

Work example

Removes the information about the specified primary server from the secondary server, and removes the copy job and restore job from the secondary.

Write a proposed call on paper. Name the target, required permission, expected change, and recovery step before any lab use.

Check your work What can this procedure change or start, and what permission does it need?

Open Microsoft Learn for full syntax, permissions, and details for your version.