Home Microsoft SQL Server DigiMailing iRN Contact
    Keyword



sys.sp_IHgetPublicationInfo

  No additional text.


Syntax


-- Name:
--          sp_IHgetPublicationInfo

-- Description:
--          HREPL helper proc to gather publication properties

-- Security:
--          Internal
-- Requires Certificate signature for catalog access

-- Returns:
--          Success/Failure + output property values

-- Owner:
--          

CREATE PROCEDURE sys.sp_IHgetPublicationInfo
(
	@publisher				sysname,
	@publication			sysname,
	@publication_id			int	OUTPUT,
	@autogen_sync_procs_id	bit OUTPUT,
	@sync_method			tinyint	OUTPUT,
	@allow_sync_tran		bit OUTPUT,
	@allow_queued_tran		bit	OUTPUT,
	@allow_dts				bit OUTPUT,
	@repl_freq				tinyint OUTPUT,
	@hr_admin				sysname = NULL OUTPUT
)
AS
BEGIN
	Set NOCOUNT ON
	
	DECLARE @retcode int

	-- Parameter check: publication
	exec @retcode = sys.sp_MSreplcheck_name @publication, '@publication', 'sp_IHgetPublicationInfo'
    if @@ERROR <> 0 or @retcode <> 0
        return(1)

	-- Parameter check: publisher
    IF @publisher IS NULL
	BEGIN
		RAISERROR (14043, 16, -1, '@publisher', 'sp_IHgetPublicationInfo')
		RETURN (1)
	END

	SELECT	@publication_id			= ihp.pubid,
			@autogen_sync_procs_id	= ihp.autogen_sync_procs,
			@sync_method			= ihp.sync_method,
			@allow_sync_tran		= ihp.allow_sync_tran,
			@allow_queued_tran		= ihp.allow_queued_tran,
			@allow_dts				= ihp.allow_dts,
			@repl_freq				= ihp.repl_freq,
			@hr_admin				= msdp.login
	FROM	IHpublications ihp,
			MSpublications msp,
			master.dbo.sysservers srv,
			msdb.dbo.MSdistpublishers msdp
	WHERE 	ihp.pubid				= msp.publication_id
	  AND	msp.publisher_id		= srv.srvid
	  AND	msdp.name				= srv.srvname
	  AND	ihp.name				= @publication
	  AND	UPPER(srv.srvname collate database_default)		= UPPER(@publisher) collate database_default

	IF @@ERROR <> 0
		RETURN (1)
END

 
Last revision 2008RTM
See also

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