Skip to content

Latest commit

 

History

History
70 lines (48 loc) · 2.82 KB

sp-requestpeerresponse-transact-sql.md

File metadata and controls

70 lines (48 loc) · 2.82 KB
title description author ms.author ms.reviewer ms.date ms.service ms.subservice ms.topic f1_keywords helpviewer_keywords dev_langs
sp_requestpeerresponse (Transact-SQL)
sp_requestpeerresponse requests a response from every other node in a peer-to-peer topology.
markingmyname
maghan
randolphwest
08/22/2024
sql
replication
reference
sp_requestpeerresponse_TSQL
sp_requestpeerresponse
sp_requestpeerresponse
TSQL

sp_requestpeerresponse (Transact-SQL)

[!INCLUDE SQL Server]

When executed from a node in a peer-to-peer topology, this procedure requests a response from every other node in the topology. By executing this procedure and reviewing the corresponding responses, you can guarantee that all previous commands are delivered to the responding nodes. This stored procedure is executed at the requesting node on any database.

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

Syntax

sp_requestpeerresponse
    [ @publication = ] N'publication'
    [ , [ @description = ] N'description' ]
    [ , [ @request_id = ] request_id OUTPUT ]
[ ; ]

Arguments

[ @publication = ] N'publication'

The name of the publication in a peer-to-peer topology for which the status is being verified. @publication is sysname, with no default.

[ @description = ] N'description'

User-defined information that can be used to identify individual status requests. @description is nvarchar(4000), with a default of NULL.

[ @request_id = ] request_id OUTPUT

Returns the ID of the new request. @request_id is an OUTPUT parameter of type int. This value can be used when executing sp_helppeerresponses to view all responses to a status request.

Return code values

0 (success) or 1 (failure).

Remarks

sp_requestpeerresponse is used in peer-to-peer transactional replication.

sp_requestpeerresponse is used to ensure that all commands are received by all other nodes, before restoring a database published in a peer-to-peer topology. You can also use this stored procedure when replicating data definition language (DDL) changes made while a node was offline, to estimate when these changes arrive at the other nodes.

sp_requestpeerresponse can't be executed within a user-defined transaction.

Permissions

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

Related content