sp_refreshsubscriptions (Transact-SQL)sp_refreshsubscriptions (Transact-SQL)

适用于:Applies to: 是SQL ServerSQL Server(所有支持的版本)yesSQL ServerSQL Server (all supported versions) 是Azure SQL 托管实例Azure SQL Managed InstanceYesAzure SQL 托管实例Azure SQL Managed Instance适用于:Applies to: 是SQL ServerSQL Server(所有支持的版本)yesSQL ServerSQL Server (all supported versions) 是Azure SQL 托管实例Azure SQL Managed InstanceYesAzure SQL 托管实例Azure SQL Managed Instance

向立即更新发布中的所有现有订阅服务器添加新项目的订阅。Add subscriptions to new articles for all the existing Subscribers to an immediate-updating publication. 此存储过程在发布服务器上对发布数据库执行。This stored procedure is executed at the Publisher on the publication database.

主题链接图标 Transact-SQL 语法约定Topic link icon Transact-SQL Syntax Conventions

语法Syntax

  
sp_refreshsubscriptions [ @publication = ] 'publication'  

参数Arguments

[ @publication = ] 'publication' 要为其刷新订阅的发布。[ @publication = ] 'publication' Is the publication for which to refresh subscriptions. 发布sysname,无默认值。publication is sysname, with no default.

返回代码值Return Code Values

0 (成功) 或 1 (失败) 0 (success) or 1 (failure)

结果集Result Sets

None

备注Remarks

sp_refreshsubscriptions 用于快照复制、事务复制和合并复制。sp_refreshsubscriptions is used in snapshot, transactional, and merge replication.

对于即时更新发布, sp_addarticle 调用 sp_refreshsubscriptionssp_refreshsubscriptions is called by sp_addarticle for an immediate-updating publication.

权限Permissions

只有 sysadmin 固定服务器角色的成员或 db_owner 固定数据库角色的成员才能执行 sp_refreshsubscriptionsOnly members of the sysadmin fixed server role or the db_owner fixed database role can execute sp_refreshsubscriptions.

另请参阅See Also

sp_addarticle (Transact-sql) sp_addarticle (Transact-SQL)
系统存储过程 (Transact-SQL)System Stored Procedures (Transact-SQL)