Home Microsoft SQL Server DigiMailing iRN Contact
    Keyword



sys.sp_MShelptranconflictpublications

  No additional text.


Syntax
create procedure sys.sp_MShelptranconflictpublications (
    @publication_type   sysname = 'queued' )        -- '%'==ALL | 'queued' | 'p2p'
as
begin
    set nocount on
    declare @merge_pub_id uniqueidentifier
    declare @cftpublications table ( publication sysname collate database_default, t_pub_id integer, s_agent_id integer, publication_type sysname collate database_default)
    select @publication_type = lower(@publication_type)
    
    -- validate
    
    if (@publication_type  NOT IN ('%', 'queued', 'p2p'))
    begin
        raiserror(21402, 16, 1, '@publication_type')
        return (1)
    end
    
    -- process publisher info
    
    if exists (select * from sys.objects where name = 'syspublications')
    begin
		if(@publication_type in ('%', 'queued'))
		begin
        insert into @cftpublications(publication, t_pub_id, publication_type)
            select name, pubid, N'queued' from syspublications where allow_queued_tran = 1
        if (@@error != 0)
        begin
            raiserror(21499, 16, 1, 'sp_MShelptranconflictpublications', 'populate', '@cftpublications', @@error)
            return (1)
        end
		end
		if(@publication_type in ('%', 'p2p'))
		begin
        insert into @cftpublications(publication, t_pub_id, publication_type)
            select name, pubid, N'p2p' from syspublications where options & 0x8 = 0x8
        if (@@error != 0)
        begin
            raiserror(21499, 16, 1, 'sp_MShelptranconflictpublications', 'populate', '@cftpublications', @@error)
            return (1)
        end
		end
    end
    
    -- process subscriber info
    
    if exists (select * from sys.objects where name = 'MSsubscription_agents')
		and @publication_type in ('%', 'queued')
    begin
        insert into @cftpublications(publication, s_agent_id)
            select publication, id from MSsubscription_agents where update_mode in (2,3,4,5)
    end
    
    -- now do a select on the temp table
    
    select  'name'              = publication,
            'publication_type'  = publication_type,
            'merge_pub_id'      = @merge_pub_id,
            'tran_pub_id'       = t_pub_id,
            'sub_agent_id'      = s_agent_id
    from @cftpublications
    
    -- all done
    
    return 0
end

 
Last revision 2008RTM
See also

  sp_MSdrop_repltran (Procedure)
sp_MShelpconflictpublications (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