分享方式:


sp_gettopologyinfo (Transact-SQL)

適用於:SQL Server

傳回點對點事務複製拓撲的相關信息。 執行 sp_requestpeertopologyinfo 以收集資訊,再執行此程式。

Transact-SQL 語法慣例

語法

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

引數

[ @request_id = ] request_id

拓撲狀態要求的標識碼。 @request_id為 int,預設值為 NULL。 若要取得標識符,請使用 sp_requestpeertopologyinfo的 @request_id OUTPUT 參數,或查詢MSpeer_topologyrequest系統數據表。

結果集

sp_gettopologyinfo 會傳回單一 XML 資料行的結果集。 XML 資料列中的數據與MSpeer_topologyresponse系統數據表中的數據相同。

傳回碼值

0 (成功) 或 1 (失敗)。

備註

sp_gettopologyinfo 用於點對點事務複製。 執行 之前,請先執行sp_gettopologyinfosp_requestpeertopologyinfo。 這些程式是由設定對等拓撲精靈所使用,但如果您需要 XML 格式的拓撲資訊,也可以直接使用這些程式。 如果您偏好表格式結果,請 查詢MSpeer_topologyresponse 系統數據表。

權限

需要系統管理員固定伺服器角色的成員資格,或db_owner固定資料庫角色的成員資格。