Home Microsoft SQL Server DigiMailing iRN Contact
    Keyword



sys.sp_MSisreplmergeagent

  No additional text.


Syntax


create procedure sys.sp_MSisreplmergeagent @is_merge bit output, @at_publisher bit=0 output
as
begin
    declare @cur_context varbinary(128)
    declare @cur_context_first_byte binary(1)
    declare @mergeagent_bitmask tinyint
    declare @atpublisher_bitmask tinyint

    select @mergeagent_bitmask = 8        --     snapshot=1, logreader=2, distrib=4, merge=8
    select @atpublisher_bitmask = 16

    select @cur_context = isnull(context_info(),0x00)

    -- get the first byte out of the 128 byte array.
    select @cur_context_first_byte = substring(@cur_context, 1, 1)

    -- check whether it has the merge agent bit set.
    select @mergeagent_bitmask = (convert(tinyint,@cur_context_first_byte) & @mergeagent_bitmask)
    -- set the output param value appropriately.
    select @is_merge = case when @mergeagent_bitmask = 0 then 0 else 1 end

    -- check whether it has the "at publisher" bit set.
    select @atpublisher_bitmask = (convert(tinyint,@cur_context_first_byte) & @atpublisher_bitmask)
    -- set the output param value appropriately.
    select @at_publisher = case when @atpublisher_bitmask = 0 then 0 else 1 end

    return 0
end

 
Last revision 2008RTM
See also

  sp_MSaddmergetriggers_internal (Procedure)
sp_MSaddupdatetrigger (Procedure)
sp_MSmerge_altertable (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