sp_enumeratependingschemachanges (Transact-SQL)


Applies To: SQL Server

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 nameData typeDescription
article_namesysnameName of the article to which the schema change applies, or Publication-wide for schema changes that apply to the entire publication.
schemaversionintNumber of the pending schema change.
schematypesysnameA text value that represents the type of schema change.
schematextnvarchar(max)Transact-SQL that describes the schema change.
schemastatusnvarchar(10)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
schemaguiduniqueidentifierIdentifies 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.

Replication Stored Procedures (Transact-SQL)
sysmergeschemachange (Transact-SQL)

Community Additions