分享方式:


sp_get_distributor (Transact-SQL)

適用於:SQL Server

判斷散發者是否安裝在伺服器上。 此預存程式會在任何資料庫上尋找散發者的電腦執行。

Transact-SQL 語法慣例

語法

sp_get_distributor
[ ; ]

引數

無。

結果集

資料行名稱 資料類型 描述
installed int 0 = 否; 1 = 是
distribution server sysname 散發者伺服器的名稱
distribution db installed int 0 = 否; 1 = 是
is distribution publisher int 0 = 否; 1 = 是
has remote distribution publisher int 0 = 否; 1 = 是

備註

sp_get_distributor 主要是由 SQL Server Management Studio 在快照式、交易式和合併式複寫中使用。

權限

任何使用者可以執行 sp_get_distributor。 當這個預存程式是由散發資料庫上db_owner或重新plmonitor 固定資料庫角色的成員,或至少一個已發佈資料庫上db_owner固定資料庫角色的成員執行時,會傳回非 NULL 結果集。

當此預存程式是由至少一個已發佈資料庫的發行集存取清單 (PAL) 或非 SQL Server 發行者之散發資料庫的 PAL 執行時,也會傳回非 NULL 結果集,也可以執行 sp_get_distributor