Home Microsoft SQL Server DigiMailing iRN Contact
    Keyword



sys.sp_MScheckIsPubOfSub

  No additional text.


Syntax

/*
  *  This proc will discover if the specified subid is a subscriber to the specified pubid.
      
  *  Currently, this is a one level check, it does not support n-level re-publishing.
            
*/
create procedure sys.sp_MScheckIsPubOfSub
    @pubid uniqueidentifier,
 
    @subid uniqueidentifier,
 
    @pubOfSub bit output
     
as

    declare @retcode int
     

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

	if exists(select sms_a.subid from sysmergesubscriptions as sms_a
	                where pubid in (select smp.pubid from sysmergesubscriptions as sms join sysmergepublications as smp on
           
	                    sms.subscriber_server = smp.publisher and sms.db_name = smp.publisher_db where sms.subid = @pubid)
            
	                and sms_a.subid <> sms_a.pubid and sms_a.subid = @subid)
	begin
		select @pubOfSub = 1
       
	end
	else
	begin
		select @pubOfSub = 0
       
	end

    return 0

 
Last revision SQL2008SP2
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