Home Microsoft SQL Server DigiMailing iRN Contact
    Keyword



sys.sp_publication_validation

  No additional text.


Syntax

CREATE PROCEDURE sys.sp_publication_validation
(
	@publication 	sysname,	/* publication name */
	@rowcount_only 	smallint = 1,	/* type of check requested */
	@full_or_fast 	tinyint = 2,	/* full (0) fast (1), or conditional fast (2)  method to calculate rowcount */
	@shutdown_agent bit = 0,	/* shut down agent after validation if 1 */
	@publisher 	sysname = NULL	/* only non-null for heterogeneous publishers */	
)
AS
BEGIN
	DECLARE @cmd			nvarchar(4000)
	DECLARE @retcode		int
	DECLARE @publisher_type	sysname

	SET @retcode = 0

	
	-- Security Check
	-- No reason anyone but Sysadmin or dbo of publishing db should run this
	exec @retcode = sys.sp_MSreplcheck_publish
	if @@error <> 0 or @retcode <> 0
	begin
		return (1)
	end
	
	EXEC @retcode = sys.sp_MSrepl_getpublisherinfo	@publisher      = @publisher,
													@publisher_type	= @publisher_type OUTPUT,
													@rpcheader      = @cmd OUTPUT
	
	IF @retcode <> 0
		RETURN (@retcode)

	if (@publisher_type = 'MSSQLSERVER')
	begin
		
		SET @cmd = @cmd + N'dbo.sp_MSpublication_validation '

		EXEC @retcode = @cmd
				@publication,
				@rowcount_only,
				@full_or_fast,
				@shutdown_agent
					
	end
	else
	begin
		-- Heterogeneous articles are handled directly by sp_IHpublication_validation
		SET @publisher = UPPER(@publisher) COLLATE DATABASE_DEFAULT
		set @cmd = @cmd + N'sys.sp_IHpublication_validation '

		EXEC @retcode = @cmd
				@publication,
				@rowcount_only,
				@full_or_fast,
				@shutdown_agent,
				@publisher
	end	

	RETURN (@retcode)
END

 
Last revision 2008RTM
See also

  sp_article_validation (Procedure)
sp_IHarticle_validation (Procedure)
sp_MSarticle_validation (Procedure)
sp_MSdrop_repltran (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