Home Microsoft SQL Server DigiMailing iRN Contact
    Keyword



sys.sp_verifypublisher

  No additional text.


Syntax


-- Name:
--		sp_verifypublisher

-- Description:
--		Verify that publisher state is valid for HREPL

-- Returns:
--		0      == Valid
--		1      == Error in publisher state

-- Security:
--		Internal

-- Notes:
--		Used by any routine that wants to validate
--		the state of the HREPL publisher before
--		performing any actions against it.
--		Errors are issued at warning level to allow
--		the calling proc to decide how to handle it.
--		For example, drop procedures would typically
--		choose to ignore the errors since everything
--		is being dropped.  Add procedures would tend
--		to error out immediately.


CREATE PROCEDURE sys.sp_verifypublisher
(
	@publisher			sysname
)
AS
BEGIN
	DECLARE @retcode	int
	DECLARE	@publisher_type	sysname
	DECLARE @cmd		nvarchar(4000)
	
	-------- security check, db_owner
	exec @retcode = dbo.sp_MSreplcheck_publish
	if @@ERROR <> 0 or @retcode <> 0
		return(1)

	-- Get publisher information
	EXEC @retcode = sys.sp_MSrepl_getpublisherinfo	@publisher		= @publisher,
													@publisher_type	= @publisher_type OUTPUT,
													@rpcheader		= @cmd OUTPUT
	
	IF @retcode <> 0
		RETURN (@retcode)

	-- Execute provider-specific verification
	IF UPPER(@publisher_type) IN ('ORACLE', 'ORACLE GATEWAY')
	BEGIN
		SET @publisher = UPPER(@publisher) COLLATE DATABASE_DEFAULT
		SELECT @cmd = @cmd + 'sys.sp_ORAverifypublisher'
		EXEC @retcode = @cmd @publisher
	END
	ELSE
	BEGIN
		RAISERROR(21645, 16, -1, @publisher_type)
		SET @retcode = 1
	END

	return @retcode
END

 
Last revision 2008RTM
See also

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