Transact-SQL 参考

sp_helpdistributor

列出有关分发服务器、分发数据库、工作目录和 SQL Server 代理程序用户帐户的信息。该存储过程在分发服务器的任何数据库上执行。

语法

sp_helpdistributor [[@distributor =] 'distributor' OUTPUT]
    [ , [ @distribdb = ] 'distribdb' OUTPUT ]
    [ , [ @directory = ] 'directory' OUTPUT ]
    [ , [ @account = ] 'account' OUTPUT ]
    [ , [ @min_distretention = ] min_distretention OUTPUT ]
    [ , [ @max_distretention = ] max_distretention OUTPUT ]
    [ , [ @history_retention = ] history_retention OUTPUT ]
    [ , [ @history_cleanupagent = ] 'history_cleanupagent' OUTPUT ]
    [ , [ @distrib_cleanupagent = ] 'distrib_cleanupagent' OUTPUT ]
    [ , [ @publisher = ] 'publisher' ]
    [ , [ @local = ] 'local' ]
    [ , [ @rpcsrvname = ] 'rpcsrvname' OUTPUT ]

参数

[@distributor =] 'distributor' OUTPUT

是分发服务器名。distributor 的数据类型为 sysname,默认设置为 %,该值是返回结果集的唯一值。

[@distribdb =] 'distribdb' OUTPUT

是分发数据库名。distribdb 的数据类型为 sysname,默认设置为 %,该值是返回结果集的唯一值。

[@directory =] 'directory' OUTPUT

是工作目录。directory 的数据类型为 nvarchar(255),默认设置为 %,该值是返回结果集的唯一值。

[@account =] 'account' OUTPUT

是 Windows NT® 用户帐户。account 的数据类型为 nvarchar(255),默认设置为 %,该值是返回结果集的唯一值。

[@min_distretention = ] min_distretention OUTPUT

是以小时为单位的最小分发保持期。min_distretention 的数据类型为 int,默认设置为 –1。

[@max_distretention =] max_distretention OUTPUT

是以小时为单位的最大分发保持期。max_distretention 的数据类型为 int,默认设置为 –1。

[@history_retention =] history_retention OUTPUT

是以小时为单位的历史记录保持期。history_retention 的数据类型为 int,默认设置为 –1。

[@history_cleanupagent =] 'history_cleanupagent' OUTPUT

是历史记录清除代理程序的名称。history_cleanupagent 的数据类型为 nvarchar(100),默认设置为 %,该值是返回结果集的唯一值。

[@distrib_cleanupagent =] 'distrib_cleanupagent' OUTPUT

是历史记录清除代理程序的名称。distrib_cleanupagent 的数据类型为 nvarchar(100),默认设置为 %,该值是返回结果集的唯一值。

[@publisher =] 'publisher'

是发布服务器名称。publisher 的数据类型为 sysname,默认设置为 NULL。

[@local =] 'local'

是 Microsoft® SQL Server™ 是否应获得本地服务器值。local 的数据类型为 nvarchar(5),默认设置为 NULL。

[@rpcsrvname =] 'rpcsrvname' OUTPUT

是发出远程过程调用的服务器名。rpcsrvname 的数据类型为 sysname,默认设置为 %,该值是返回结果集的唯一值。

结果集
列名 数据类型 描述
Distributor sysname 分发服务器的名称。
distribution database sysname 分发数据库的名称。
Directory nvarchar(255) 工作目录名。
Account nvarchar(255) Windows 用户帐户的名称。
min distrib retention int 最小分发保持期。
max distrib retention int 最大分发保持期。
history retention int 历史记录保持期。
history cleanup agent nvarchar(100) 历史记录清除代理程序的名称。
distribution cleanup agent nvarchar(100) 分发清除代理程序的名称。
rpc server name sysname 远程分发服务器或本地分发服务器的名称。
rpc login name sysname 用于对远程分发服务器的远程过程调用的登录。

如果没有安装分发数据库,则返回 NULL 值。

注释

sp_helpdistributor 用于所有类型的复制。

权限

执行权限默认授予 public 角色。

请参见

sp_adddistpublisher

sp_addsubscriber

sp_changesubscriber

sp_changesubstatus

sp_dboption

sp_dropsubscriber

sp_helpserver

sp_helpsubscriberinfo

系统存储过程