Home Microsoft SQL Server DigiMailing iRN Contact
    Keyword



sys.sp_MSregenerate_mergetriggers

  No additional text.


Syntax

-- Requires Certificate signature for catalog access
create procedure sys.sp_MSregenerate_mergetriggers @publication sysname, @publisher sysname = NULL, @publisher_db sysname = NULL
as
    declare @pubid uniqueidentifier, @retcode int, @objid int, @col_track int, @source_owner sysname,
            @source_object sysname, @qualified_name nvarchar(270)

    if @publisher is NULL
        select @publisher = publishingservername()

    if @publisher_db is NULL
        select @publisher_db = db_name()

    select @pubid = pubid from dbo.sysmergepublications
    where name = @publication and UPPER(publisher) = UPPER(@publisher) and publisher_db = @publisher_db

    declare articles_in_pub CURSOR LOCAL FAST_FORWARD FOR select objid, column_tracking
    from dbo.sysmergearticles
    where pubid = @pubid
    FOR READ ONLY

    open articles_in_pub
    fetch next from articles_in_pub into @objid, @col_track

    while (@@fetch_status <> -1)
    begin
        -- regenerate the triggers
        select @source_owner = SCHEMA_NAME(schema_id), @source_object = name from sys.objects where object_id = @objid
        select @qualified_name = QUOTENAME(@source_owner) + '.' + QUOTENAME(@source_object)
        exec @retcode = sys.sp_MSaddmergetriggers @qualified_name, NULL, @col_track
        if @@error <> 0 or @retcode <> 0
        begin
            return 1
        end

        fetch next from articles_in_pub into @objid, @col_track
    end

    close articles_in_pub
    deallocate articles_in_pub

    return 0

 
Last revision 2008RTM
See also

  sp_changemergefilter (Procedure)
sp_dropmergefilter (Procedure)
sp_MSdisable_use_partition_groups (Procedure)
sp_MSdrop_rladmin (Procedure)
sp_MSregenerate_mergetriggersprocs (Procedure)
sp_MSrestoredbreplication (Procedure)
sp_MSrestore_sub_merge (Procedure)
sp_MSsetup_partition_groups (Procedure)
sp_MSsetup_publication_for_partition_groups (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