Skip to content

Latest commit

 

History

History
59 lines (41 loc) · 2.54 KB

sp-gettopologyinfo-transact-sql.md

File metadata and controls

59 lines (41 loc) · 2.54 KB
title description author ms.author ms.reviewer ms.date ms.service ms.subservice ms.topic f1_keywords helpviewer_keywords dev_langs
sp_gettopologyinfo (Transact-SQL)
sp_gettopologyinfo returns information about a peer-to-peer transactional replication topology.
markingmyname
maghan
randolphwest
07/16/2024
sql
replication
reference
sp_gettopologyinfo_TSQL
sp_gettopologyinfo
sp_gettopologyinfo
TSQL

sp_gettopologyinfo (Transact-SQL)

[!INCLUDE SQL Server]

Returns information about a peer-to-peer transactional replication topology. Execute sp_requestpeertopologyinfo to collect information before you execute this procedure.

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

Syntax

sp_gettopologyinfo [ [ @request_id = ] request_id ]
[ ; ]

Arguments

[ @request_id = ] request_id

The ID of a topology status request. @request_id is int, with a default of NULL. To obtain an ID, use the @request_id OUTPUT parameter from sp_requestpeertopologyinfo, or query the MSpeer_topologyrequest system table.

Result set

sp_gettopologyinfo returns a result set that's a single XML column. The data in the XML column is the same as the data in the MSpeer_topologyresponse system table.

Return code values

0 (success) or 1 (failure).

Remarks

sp_gettopologyinfo is used in peer-to-peer transactional replication. Execute sp_requestpeertopologyinfo before you execute sp_gettopologyinfo. These procedures are used by the Configure Peer-to-Peer Topology Wizard, but they can also be used directly if you require topology information in XML format. If you prefer tabular results, query the MSpeer_topologyresponse system table.

Permissions

Requires membership in the sysadmin fixed server role, or db_owner fixed database role.

Related content