Home Microsoft SQL Server DigiMailing iRN Contact


  No additional text.


create procedure sys.sp_MSenumschemachange_70(
    @pubid              uniqueidentifier,
    @AlterTableOnly     int,
    @schemaversion      int,
    @compatlevel        int

    ** To public

    if (@schemaversion is null)
        RAISERROR(14043, 16, -1, '@schemaversion', 'sp_MSenumschemachange_70')
        return (1)

    if object_id('MSmerge_contents') is NULL
        RAISERROR(20054 , 16, -1)
        return (1)

    create table #temp_table_sp_MSenumschemachange_70
        (pubid uniqueidentifier NULL,
         artid uniqueidentifier NULL,
         schemaversion int NULL,
         schemaguid uniqueidentifier NULL,
         schematype int NULL,
         schematext nvarchar(2000) collate database_default null)

    /* handle the case of reinitall */
    if exists (select pubid from dbo.sysmergeschemachange where schemaversion > @schemaversion
            and pubid = @pubid and schematype = 12)
        select @schemaversion = 0

    ** For 70 RTM and SP1, we want to filter out type 9 (retention propagation) and 16 (metadata cleanup)
    ** and 5 ( last rec generation ) and 6 (last sent generation)
    ** which they do not support. SP2 subscriber will be passing in 7000200, which gets understands
    ** these schema types
    insert into #temp_table_sp_MSenumschemachange_70
        select pubid, artid, schemaversion, schemaguid, schematype, convert(nvarchar(2000), schematext) as schematext
          from dbo.sysmergeschemachange where schemaversion > @schemaversion
                and pubid = @pubid
                and ((@compatlevel=7000000 and schematype in (-1, 1, 2, 3, 4, 7, 8, 10, 15, 20))
                  or (@compatlevel=7000200 and
                    ((schematype in (-1, 1, 2, 3, 4, 7, 8, 9, 10, 12, 15, 16, 20,66))
                        or schematype in (5, 6) and @schemaversion = 0)))
        order by schemaversion

    -- Some schematypes that are distinct in Yukon used to have wrong number pre-Shiloh.
    -- Map them back to the old values.
    update #temp_table_sp_MSenumschemachange_70 set schematype=8 where schematype in (21,23)
    update #temp_table_sp_MSenumschemachange_70 set schematype=9 where schematype = 18

    /* for SP2 downlevel subscribers who do not understand type 12 (reinit-all) at provider level, but do
    ** at reconcile level, change it to type = 7 (directory) to be no-op.
    if @compatlevel=7000200
        update #temp_table_sp_MSenumschemachange_70 set schematype=7 where schematype = 12

    select  * from #temp_table_sp_MSenumschemachange_70
    drop table #temp_table_sp_MSenumschemachange_70

    return (0)

Last revision 2008RTM
See also

  sp_MSdrop_rlrecon (Procedure)
sp_MSenumschemachange (Procedure)


  Query a named instance
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
Zoekmachine optimalisatie
SQL Servers hidden objects
Flash in Ajax
De hype die AJAX heet
Barcode scannen
MySQL; Gratis, makkelijk en snel!
sIFR; de combinatie tussen HTML en Flash