sp_gettopologyinfo (Transact-SQL)

適用於:SQL Server

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

Transact-SQL 語法慣例

語法

  
sp_gettopologyinfo [ @request_id = ] request_id  

引數

[ @request_id= ] request_id
這是拓撲狀態要求的識別碼。 request_id為 int ,預設值為 Null。 若要取得識別碼,請使用 @request_id 來自 sp_requestpeertopologyinfo 的輸出參數,或查詢 MSpeer_topologyrequest 系統資料表。

結果集

sp_gettopologyinfo傳回具有單一 XML 資料行的結果集。 XML 資料行中的資料與MSpeer_topologyresponse 系統資料表中的資料 相同。

傳回碼值

0 (成功) 或 1 (失敗)

備註

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

權限

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

另請參閱

@loopback_detection
複寫預存程式 (Transact-SQL)