Home Microsoft SQL Server DigiMailing iRN Contact
    Keyword



sys.sp_markpendingschemachange

  No additional text.


Syntax
create procedure sys.sp_markpendingschemachange(
    @publication        sysname,
    @schemaversion      int = 0,
    @status             nvarchar(10) = 'active'          /* active, skipped */
    )
as
begin
    set nocount on
    declare @retcode        int
    declare @pubid          uniqueidentifier
    declare @compatlevel    int
    declare @statusid       int
    declare @SCHEMA_TYPE_SNAPSHOTTRAILER int

    select @retcode = 0
    exec @retcode=sys.sp_MSreplcheck_publish
    if @retcode<>0 or @@ERROR<>0 return (1)

    if @publication IS NULL
    begin
        raiserror (14003, 16, -1)
        return (1)
    end

    select @pubid = pubid, @compatlevel = backward_comp_level FROM dbo.sysmergepublications WHERE name = @publication and UPPER(publisher)=UPPER(publishingservername()) and publisher_db=db_name()
    if @pubid is NULL
    begin
        raiserror (21274, 16, -1, @publication)
        return (1)
    end

    if @compatlevel < 90
    begin
        raiserror(22557, 16, -1, @publication)
        return 1
    end

    select @status  = lower(@status  collate SQL_Latin1_General_CP1_CS_AS)
    if @status  not in ('active', 'skipped')
    begin
        RAISERROR(22559 , 16, -1)
        return (1)
    end

    if @status = N'active'
        select @statusid = 1
    else if @status = N'skipped'
        select @statusid = 2

    update dbo.sysmergeschemachange set schemastatus = @statusid
        where pubid=@pubid and schemaversion = @schemaversion
    if @@error <> 0 or @@rowcount <> 1
        begin
            RAISERROR(22558 , 16, -1)
            return (1)
        end
    return (0)
end

 
Last revision 2008RTM
See also

  sp_MSdrop_rlrecon (Procedure)
       



News

  Query a named instance
Sybase+ASE+silent+install
SQL 2008 R2
Deprecated procedures in SQL2008
Reporting Services item-level role definitions
Create all your missing indexes
Converting datetime field
Start MSSQL Server Profiler at time
Replicating MSSQL Server views
Exploring Microsoft Sharepoint
The OLE DB provider "SQLNCLI10" for linked server indicates.
Mobile solar charger
Oracle to SQL Server replication
Cannot insert the value NULL into column
Undocumented Microsoft SQL Server 2008
VMware
Zoekmachine optimalisatie
SQL Servers hidden objects
FckEditor
Flash in Ajax
De hype die AJAX heet
Barcode scannen
MySQL; Gratis, makkelijk en snel!
PHP
sIFR; de combinatie tussen HTML en Flash