sp_gettopologyinfo (Transact-SQL)

适用于:SQL Server

返回有关对等事务复制拓扑的信息。 在执行此过程之前,执行 sp_requestpeertopologyinfo 以收集信息。

Transact-SQL 语法约定

语法

  
sp_gettopologyinfo [ @request_id = ] request_id  

自变量

[ @request_id= ] request_id
拓扑状态请求 ID。 request_idint,默认值为 NULL。 若要获取 ID,请使用@request_idsp_requestpeertopologyinfo的输出参数或查询MSpeer_topologyrequest系统表。

结果集

sp_gettopologyinfo 返回包含单个 XML 列的结果集。 XML 列中的数据与 MSpeer_topologyresponse 系统表中的数据相同。

返回代码值

0 (成功) 或 1 (失败)

备注

sp_gettopologyinfo 用于对等事务复制。 在执行 sp_gettopologyinfo 之前执行sp_requestpeertopologyinfo。 这些过程由配置对等拓扑向导使用,但如果需要 XML 格式的拓扑信息,也可以直接使用它们。 如果更喜欢表格结果,请查询 MSpeer_topologyresponse 系统表。

权限

要求具有 sysadmin 固定服务器角色或 db_owner 固定数据库角色的成员身份。

另请参阅

@loopback_detection
复制存储过程 (Transact-SQL)