Home Microsoft SQL Server DigiMailing iRN Contact
    Keyword



sys.sp_MScheck_logicalrecord_metadatamatch

  No additional text.


Syntax
create procedure sys.sp_MScheck_logicalrecord_metadatamatch
    (@metadata_type tinyint,
     @parent_nickname int,
     @parent_rowguid uniqueidentifier,
     @logical_record_lineage varbinary(311),
     @pubid uniqueidentifier)
as
    declare @match int, @existing_lineage varbinary(311), @retcode int, @sel_proc nvarchar(255)

    exec @retcode = sys.sp_MSrepl_PAL_rolecheck @pubid = @pubid
    if (@retcode <> 0) or (@@error <> 0)
        return 1

    select @match = 0, @existing_lineage = NULL

    if @metadata_type = 3
    begin
            --lock the parent row
            select @sel_proc = 'dbo.' + select_proc from dbo.sysmergearticles
                    where pubid = @pubid and nickname = @parent_nickname
            exec @retcode = @sel_proc @maxschemaguidforarticle = NULL, @type = 8, @rowguid=@parent_rowguid
            if @@error <> 0 or @retcode <> 0
                    return 1
    end

    select @existing_lineage = logical_record_lineage
    from dbo.MSmerge_contents with (updlock)
    where tablenick = @parent_nickname
    and rowguid =  @parent_rowguid

    if @existing_lineage = @logical_record_lineage and @metadata_type = 2
    begin
                select @match = 1
        end
    else if @existing_lineage is null
    begin
                select @existing_lineage = logical_record_lineage
                from dbo.MSmerge_tombstone with (updlock)
                where tablenick = @parent_nickname
                and rowguid = @parent_rowguid

        if @existing_lineage = @logical_record_lineage and @metadata_type in (1,5,6)
                begin
                        select @match = 1
                end
                else if @existing_lineage is null
                begin
            if @metadata_type in (0,3)
            begin
                                select @match = 1
                        end
                end
        end

    if (@match = 0)
    begin
                raiserror(22521, 16, -1)
                return 1
        end
    return 0

 
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