Home Microsoft SQL Server DigiMailing iRN Contact
    Keyword



sys.sp_MSdrop_synctran_objects

  No additional text.


Syntax
create procedure sys.sp_MSdrop_synctran_objects
as
begin
    
    -- Important Note:
    --  There is no error handling in this proc as it is considered
    --   part of a best effort cleanup.
    
    declare @object_name sysname
            ,@sync_ins_proc_id int
            ,@sync_upd_proc_id int
            ,@sync_del_proc_id int
            ,@conflict_tableid  int
            ,@sync_upd_trig_id int
            ,@ins_conflict_proc int
            ,@sync_objid int
            ,@filter_id int
            ,@filter_name nvarchar(517)
            ,@type tinyint
            ,@objid int


    begin tran tr_sp_MSdrop_synctran_objects
    save tran tr_sp_MSdrop_synctran_objects

    
    --  Publisher side cleanup
    
    if object_id('dbo.sysarticleupdates') is not null
    begin
        declare #articleupdates cursor local fast_forward for
            select sync_ins_proc, sync_upd_proc, sync_del_proc, sync_upd_trig, conflict_tableid, ins_conflict_proc
                from sysarticleupdates

        open #articleupdates

        fetch #articleupdates into @sync_ins_proc_id, @sync_upd_proc_id, @sync_del_proc_id, @sync_upd_trig_id, @conflict_tableid, @ins_conflict_proc

        while (@@fetch_status <> -1)
        begin
            if @sync_ins_proc_id is not null
                exec sys.sp_MSdrop_object @object_id = @sync_ins_proc_id

            if @sync_upd_proc_id is not null
                exec sys.sp_MSdrop_object @object_id = @sync_upd_proc_id

            if @sync_del_proc_id is not null
                exec sys.sp_MSdrop_object @object_id = @sync_del_proc_id

            if @sync_upd_trig_id is not null
                exec sys.sp_MSdrop_object @object_id = @sync_upd_trig_id

            if @conflict_tableid is not null
                exec sys.sp_MSdrop_object @object_id = @conflict_tableid

            if @ins_conflict_proc is not null
                exec sys.sp_MSdrop_object @object_id = @ins_conflict_proc

            fetch #articleupdates into @sync_ins_proc_id, @sync_upd_proc_id, @sync_del_proc_id, @sync_upd_trig_id, @conflict_tableid, @ins_conflict_proc
        end

        close #articleupdates
        deallocate #articleupdates
    end


    
    -- Cleanup sync views
    
    if object_id('dbo.sysarticles') is not null
    begin
        declare #sysarticles cursor local fast_forward for
            select type,objid,sync_objid,filter from sysextendedarticlesview where
                type & 7 > 0

        open #sysarticles

        fetch #sysarticles into @type, @objid, @sync_objid, @filter_id

        while @@fetch_status <> -1
        begin
            
            -- Drop article view for logbased non-manual view
            
            if (@type & 5) = 1 and @sync_objid is not null
                exec sys.sp_MSdrop_object @object_id = @sync_objid

            
            -- Drop article filter if logbased non-manualfilter
            
            if (@type & 3) = 1 and @filter_id is not null and @filter_id <> 0
                exec sys.sp_MSdrop_object @object_id = @filter_id

            
            -- Clear dependency for manual filter
            --  We do not want to drop it
            
            if (@type & 3) = 3
            begin
                if @filter_id is not null and @filter_id <> 0
                begin
                    exec sys.sp_MSget_qualified_name @filter_id, @filter_name OUTPUT

                    if @filter_name is not null
                        EXEC sys.sp_MSsetfilterparent @filter_name, 0
                end
            end

            fetch #sysarticles into @type, @objid, @sync_objid, @filter_id
        end

        close #sysarticles
        deallocate #sysarticles
    end

    commit tran tr_sp_MSdrop_synctran_objects
    return(0)
end

 
Last revision 2008RTM
See also

  sp_MSdrop_repltran (Procedure)
sp_MSremovedbreplication (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