Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
sp_restoremergeidentityrange (Transact-SQL)
Collapse the table of content
Expand the table of content

sp_restoremergeidentityrange (Transact-SQL)

Applies To: SQL Server 2014, SQL Server 2016 Preview

Topic Status: Some information in this topic is preview and subject to change in future releases. Preview information describes new features or changes to existing features in Microsoft SQL Server 2016 Community Technology Preview 2 (CTP2).

This stored procedure is used to update identity range assignments. It ensures that automatic identity range management functions properly after a Publisher has been restored from a backup. This stored procedure is executed at the Publisher on the publication database.

Topic link icon Transact-SQL Syntax Conventions

sp_restoremergeidentityrange [ [ @publication = ] 'publication' ]
    [ , [ @article = ] 'article' ]

[ @publication = ] 'publication'

Is the name of the publication. publication is sysname, with default value of all. When specified, only identity ranges for that publication are restored.

[ @article = ] 'article'

Is the name of the article. article is sysname, with a default value of all. When specified, only identity ranges for that article are restored.

0 (success) or 1 (failure)

sp_restoremergeidentityrange is used with merge replication.

sp_restoremergeidentityrange gets maximum identity range allocation information from the Distributor and updates values in the max_used column of MSmerge_identity_range_allocations (Transact-SQL) for the articles which use automatic identity range management.

Only members of the sysadmin fixed server role or db_owner fixed database role can execute sp_restoremergeidentityrange.

Community Additions

ADD
Show:
© 2015 Microsoft