Home Microsoft SQL Server DigiMailing iRN Contact
    Keyword



sys.sp_MSenumtranpublications

  No additional text.


Syntax

create procedure sys.sp_MSenumtranpublications
(
    @publication sysname = NULL,
    @category int,
    @empty_tranpub bit = 0
)
as
BEGIN
    set nocount on

    
    -- This SP depends on the pre-creation
    -- of the temp table #MSenumpublications
    

    -- Determine if distribution db or publisher db
    if (@category & 16 = 16)
    begin
        -- Get matching HREPL publications
        insert into #MSenumpublications
        SELECT ss.srvname,
                ihp.name,
                1,
                ihp.immediate_sync,
                ihp.allow_pull,
                ihp.allow_anonymous,
                ihp.enabled_for_internet,
                ihp.repl_freq,
                ihp.immediate_sync_ready,
                ihp.allow_sync_tran,
                ihp.independent_agent,
                is_member('db_owner'),
                0,                                -- thirdparty
                ss.srvproduct,
                ss.srvname,
                msdp.publisher_type,
                ihp.description,
                db_name(),
                ihp.allow_queued_tran,
                ihp.allow_dts,
                convert(int,null),                -- thirdparty_options
                ihp.queue_type,
                0                                -- dynamic_filters
        from dbo.IHpublications as ihp
            join dbo.MSpublications as msp on ihp.pubid = msp.publication_id
            join master.dbo.sysservers as ss on msp.publisher_id = ss.srvid
            join msdb.dbo.MSdistpublishers as msdp on ss.srvname = msdp.name
        where (@empty_tranpub = 1 or exists
            (
                select    *
                from    dbo.sysextendedarticlesview art
                where    ihp.pubid = art.pubid
            ))
          and ihp.status <> 0
          and (@publication is null or ihp.name = @publication)
    end
    else
    begin
        insert into #MSenumpublications
        select db_name(),
                name,
                1,
                immediate_sync,
                allow_pull,
                allow_anonymous,
                enabled_for_internet,
                repl_freq,
                immediate_sync_ready,
                allow_sync_tran,
                independent_agent,
                is_member('db_owner'),
                0,                                -- thirdparty
                N'Microsoft SQL Server',
                publishingservername(),
                N'MSSQLSERVER',
                description,
                convert(sysname, null),
                allow_queued_tran,
                allow_dts,
                convert(int,null),                -- thirdparty_options
                queue_type,
                0                                -- dynamic_filters
        from dbo.syspublications as pubs
        where (@empty_tranpub = 1 or exists
                (
                    select    *
                    from    dbo.sysextendedarticlesview art
                    where    pubs.pubid = art.pubid
                ))
          and    status <> 0
          and    (@publication is null or pubs.name = @publication)
    end
END

 
Last revision 2008RTM
See also

  sp_MSenumallpublications (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