Home Microsoft SQL Server DigiMailing iRN Contact
    Keyword



sys.sp_IHgetPublisherInfo

  No additional text.


Syntax


-- Name:
--          sp_IHgetPublisherInfo

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

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

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

-- Owner:
--          

CREATE PROCEDURE sys.sp_IHgetPublisherInfo
(
	@publisher		sysname,
	@publisher_db  	sysname OUTPUT,
	@publisher_type	sysname OUTPUT,
	@remoteserver  	sysname OUTPUT,
	@distributor   	sysname OUTPUT,
	@distribdb     	sysname OUTPUT
)
AS
BEGIN

	SET NOCOUNT ON

	-- is this server a distributor
	IF NOT EXISTS (select * from master.dbo.sysservers
              where UPPER(datasource collate database_default) = UPPER(@@SERVERNAME) collate database_default
                 AND srvstatus & 8 <> 0)
	BEGIN
		RETURN (0)
	END

	-- NULL publisher means this is a SQL publisher

	SELECT	@publisher_type = pub.publisher_type,
			@remoteserver   = srv.datasource,
			@distribdb      = pub.distribution_db,
			@distributor    = @@SERVERNAME,
			@publisher_db   = pub.distribution_db
	FROM msdb.dbo.MSdistpublishers pub
	JOIN master.dbo.sysservers srv ON pub.name = srv.srvname collate database_default
	WHERE UPPER(pub.name collate database_default) = UPPER(@publisher) collate database_default

	IF @@ERROR <> 0
		RETURN (1)

	IF @remoteserver IS NULL
	BEGIN
		RAISERROR(21618, 16, -1, @publisher)
		RETURN (1)
	END
	ELSE
	BEGIN
		-- a NULL publisher_type is a Sql publisher
		IF @publisher_type IS NULL
			SELECT @publisher_type = N'MSSQLSERVER'
	END
END

 
Last revision 2008RTM
See also

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