Skip to content

Latest commit

 

History

History
69 lines (48 loc) · 2.86 KB

sp-deletepeerrequesthistory-transact-sql.md

File metadata and controls

69 lines (48 loc) · 2.86 KB
title description author ms.author ms.reviewer ms.date ms.service ms.subservice ms.topic f1_keywords helpviewer_keywords dev_langs
sp_deletepeerrequesthistory (Transact-SQL)
Deletes history related to a publication status request, which includes the request history (MSpeer_request) as well as the response history (MSpeer_response).
markingmyname
maghan
randolphwest
08/22/2024
sql
replication
reference
sp_deletepeerrequesthistory
sp_deletepeerrequesthistory_TSQL
sp_deletepeerrequesthistory
TSQL

sp_deletepeerrequesthistory (Transact-SQL)

[!INCLUDE SQL Server]

Deletes history related to a publication status request, which includes the request history (MSpeer_request) as well as the response history (MSpeer_response). This stored procedure is executed on the publication database at a Publisher participating in a Peer-to-Peer replication topology. For more information, see Peer-to-Peer - Transactional Replication.

:::image type="icon" source="../../includes/media/topic-link-icon.svg" border="false"::: Transact-SQL syntax conventions

Syntax

sp_deletepeerrequesthistory
    [ @publication = ] N'publication'
    [ , [ @request_id = ] request_id ]
    [ , [ @cutoff_date = ] cutoff_date ]
[ ; ]

Arguments

[ @publication = ] N'publication'

Name of the publication for which the status request was made. @publication is sysname, with no default.

[ @request_id = ] request_id

Specifies an individual status request so that all responses to this request will be deleted. @request_id is int, with a default of NULL.

[ @cutoff_date = ] cutoff_date

Specifies a cutoff date, before which all earlier response records are deleted. @cutoff_date is datetime, with a default of NULL.

Return code values

0 (success) or 1 (failure).

Remarks

sp_deletepeerrequesthistory is used in a Peer-to-Peer transactional replication topology. For more information, see Peer-to-Peer - Transactional Replication.

When executing sp_deletepeerrequesthistory, either @request_id or @cutoff_date must be specified.

Permissions

Only members of the sysadmin fixed server role or db_owner fixed database role can execute sp_deletepeerrequesthistory.

Related content