Home Microsoft SQL Server DigiMailing iRN Contact


  No additional text.


create procedure sys.sp_MSCleanupForPullReinit (
    @publication         sysname,
    @publisher_db        sysname,
    @publisher             sysname = NULL
    ) AS
    declare @pubid         uniqueidentifier
    declare @artid         uniqueidentifier
    declare @retcode    smallint

    ** Security Check
    EXEC @retcode = sys.sp_MSreplcheck_publish
    IF @@ERROR <> 0 or @retcode <> 0
        return (1)

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

    -- This only gets called after database is enable to subscribe, so
    -- sysmergepublications should exist
    select @pubid = pubid from dbo.sysmergepublications
        where name = @publication and
              publisher_db = @publisher_db and
              upper(publisher collate SQL_Latin1_General_CP1_CS_AS) = upper(@publisher collate SQL_Latin1_General_CP1_CS_AS) and
              status <> 7 -- REPLICA_STATUS_BeforeRestore

    /* Normal case - nothing to cleanup, just return */
    if @pubid is null
        return (1)

    select @retcode = 0
    exec @retcode = sys.sp_MSCleanupForPullReinitWithPubId @pubid = @pubid

    return @retcode

Last revision 2008RTM
See also

  sp_MSCleanupForPullReinitWithPubId (Procedure)
sp_MSpurgepartialmergesnapshot (Procedure)
sp_reinitmergepullsubscription (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