顯示有關(guān)在合并復(fù)制中用作項(xiàng)目的表中的行的信息。此存儲(chǔ)過程在存儲(chǔ)該表的計(jì)算機(jī)和數(shù)據(jù)庫(kù)中執(zhí)行。
sp_showrowreplicainfo [ [ @ownername = ] 'ownername' ]
, [ @tablename =] 'tablename'
, [ @rowguid =] 'rowguid'
[ , [ @show = ] 'show' ]
[@ownername = ] 'ownername'
是表所有者的名稱。publication 的數(shù)據(jù)類型為 sysname,默認(rèn)值為 NULL。如果數(shù)據(jù)庫(kù)包含多個(gè)具有同一名稱的表,但每個(gè)表的所有者不同時(shí),此參數(shù)對(duì)區(qū)分這些表很有用。
[@tablename =] 'tablename'
是包含所返回的信息行的表的名稱,tablename 的數(shù)據(jù)類型為 sysname,沒有默認(rèn)設(shè)置。
[@rowguid =] 'rowguid'
是行的唯一標(biāo)識(shí)符。rowguid 的數(shù)據(jù)類型為 uniqueidentifier,無默認(rèn)值。
[@show = ] 'show'
決定結(jié)果集中將返回的信息量。show 的數(shù)據(jù)類型為 nvarchar(20),默認(rèn)設(shè)置為 BOTH。如果為 row,則只返回行版本信息。如果為 columns,則只返回列版本信息。如果為 both,則將同時(shí)返回行信息和列信息。
列名 | 數(shù)據(jù)類型 | 描述 |
---|---|---|
server_name | 宿主數(shù)據(jù)庫(kù)并生成行版本項(xiàng)目的服務(wù)器的名稱。 | |
db_name | 生成此項(xiàng)目的數(shù)據(jù)庫(kù)的名稱。 | |
db_nickname | 生成此項(xiàng)目的數(shù)據(jù)庫(kù)的別名。 | |
version | 項(xiàng)目的版本。 | |
rowversion_table | 表明行版本存儲(chǔ)在 MSmerge_contents 表還是 MSmerge_tombstone 表中。 | |
comment | 有關(guān)此行版本項(xiàng)目的附加信息。通常,此字段為空。 |
列名 | 數(shù)據(jù)類型 | 描述 |
---|---|---|
server_name | 宿主數(shù)據(jù)庫(kù)并生成列版本項(xiàng)目的服務(wù)器的名稱。 | |
db_name | 生成此項(xiàng)目的數(shù)據(jù)庫(kù)的名稱。 | |
db_nickname | 生成此項(xiàng)目的數(shù)據(jù)庫(kù)的別名。 | |
version | 項(xiàng)目的版本。 | |
colname | 列版本項(xiàng)目代表的項(xiàng)目列的名稱。 | |
comment | 有關(guān)此列版本項(xiàng)目的附加信息。通常,該字段為空。 |
如果為 @show 選擇值 both,則將同時(shí)返回行結(jié)果集和列結(jié)果集。
sp_showrowreplicainfo 用于合并復(fù)制。
public 角色的成員可以執(zhí)行 sp_showrowreplicainfo。
相關(guān)文章