Home Microsoft SQL Server DigiMailing iRN Contact
    Keyword



sys.sp_MScheckfailedprevioussync

  No additional text.


Syntax

/*
  *  This proc is called on subscriber when the merge agent wants to do
  * consolidation of generations. This proc checks of the last sync failed.
  * If the last sync failed then the merge agent does not do consolidation.
  * This procs checks for any generations with genstatus of 4 in the genshistory
  * table to make this determination.
*/
create procedure sys.sp_MScheckfailedprevioussync
    @pubid uniqueidentifier,
    @last_sync_failed bit output
as

    declare @retcode int

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

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

	if exists(select * from dbo.MSmerge_genhistory mgh JOIN dbo.sysmergearticles sma
				ON mgh.art_nick = sma.nickname
				where mgh.genstatus = 4 and
					(sma.pubid = @pubid or mgh.art_nick = 0))
	begin
		select @last_sync_failed = 1
	end
	else
	begin
		select @last_sync_failed = 0
	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