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

sp_enumeratependingschemachanges (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).

Returns a list of all pending schema changes. This stored procedure can be used with sp_markpendingschemachange, which enables an administrator to skip selected pending schema changes so that they are not replicated. This stored procedure is executed at the Publisher on the publication database.

Topic link icon Transact-SQL Syntax Conventions

sp_enumeratependingschemachanges [ @publication = ] 'publication' 
    [ , [ @starting_schemaversion = ] starting_schemaversion ]

[ @publication= ] 'publication'

Is the name of the publication. publication is sysname, with no default.

[ @starting_schemaversion= ] starting_schemaversion

Is the lowest number schema change to include in the result set.

Column name

Data type




Name of the article to which the schema change applies, or Publication-wide for schema changes that apply to the entire publication.



Number of the pending schema change.



A text value that represents the type of schema change.



Transact-SQL that describes the schema change.



Indicates if a schema change is pending for the article, which can be one of the following values:

active = schema change is pending

inactive = schema change is inactive

skip = schema change is not replicated



Identifies the schema change.

0 (success) or 1 (failure)

sp_enumeratependingschemachanges is used in merge replication.

sp_enumeratependingschemachanges, used with sp_markpendingschemachange, is intended for the supportability of merge replication and should be used only when other corrective actions, such as reinitialization, have failed to correct the situation.

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

Community Additions

© 2015 Microsoft