共用方式為


sp_gettopologyinfo (Transact-SQL)

傳回有關點對點交易式複寫拓撲的資訊。在執行這個程序之前,先執行 sp_requestpeertopologyinfo 來收集資訊。

主題連結圖示Transact-SQL 語法慣例

語法

sp_gettopologyinfo [ @request_id = ] request_id

引數

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

結果集

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

傳回碼值

0 (成功) 或 1 (失敗)

備註

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

權限

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