Home Microsoft SQL Server DigiMailing iRN Contact
    Keyword



sys.sp_MSvalidatepeertopeerpublication

  No additional text.


Syntax
CREATE PROCEDURE sys.sp_MSvalidatepeertopeerpublication
(
	@publication sysname
)
AS
BEGIN
	DECLARE @retcode 				bit,
			@publisher 				sysname,
		    @publisher_db 			sysname,
		  	@allow_sync_tran		int,
			@allow_queued_tran		int,
			@allow_dts				int,
			@allow_anonymous		int,
			@independent_agent		int,
			@repl_freq				int,
			@allow_init_from_backup	int
			
	SELECT @publisher		= publishingservername(),
		    @publisher_db	= DB_NAME()

	SELECT @allow_sync_tran = allow_sync_tran,
			@allow_queued_tran = allow_queued_tran,
			@allow_dts = allow_dts,
			@allow_anonymous = allow_anonymous,
			@independent_agent = independent_agent,
			@repl_freq = repl_freq,
			@allow_init_from_backup = allow_initialize_from_backup
		FROM syspublications
		WHERE @publication = name

	IF @allow_sync_tran = 1
	BEGIN
		-- Peer-To-Peer publications do not support immediate updating subscribers. Please change the 'allow_sync_tran' parameter value.
		RAISERROR(20646, 16, -1, 'immediate updating subscribers', 'allow_sync_tran')
		RETURN 1
	END

	IF @allow_queued_tran = 1
	BEGIN
		-- Peer-To-Peer publications do not support queued updating subscribers. Please change the 'allow_queued_tran' parameter value.
		RAISERROR(20646, 16, -1, 'queued updating subscribers', 'allow_queued_tran')
		RETURN 1
	END

	IF @allow_dts = 1
	BEGIN
		-- Peer-To-Peer publications do not support DTS subscriptions. Please change the 'allow_dts' parameter value.
		RAISERROR(20646, 16, -1, 'DTS subscriptions', 'allow_dts')
		RETURN 1
	END

	IF @allow_anonymous = 1
	BEGIN
		-- Peer-To-Peer publications do not support anonymous subscriptions. Please change the 'allow_anonymous' parameter value.
		RAISERROR(20646, 16, -1, 'anonymous subscriptions', 'allow_anonymous')
		RETURN 1
	END

	IF @independent_agent = 0
	BEGIN
		-- Peer-To-Peer publications do not support shared agents. Please change the 'independent_agent' parameter value.
		RAISERROR(20646, 16, -1, 'shared agents', 'independent_agent')
		RETURN 1
	END

	IF @repl_freq = 1
	BEGIN
		-- Peer-To-Peer publications do not support snapshot replication. Please change the 'repl_freq' parameter value.
		RAISERROR(20646, 16, -1, 'snapshot replication', 'repl_freq')
		RETURN 1
	END

	IF @allow_init_from_backup = 0
	BEGIN
		-- Peer-To-Peer publications do not support disallowing initialize from a backup. Please change the 'allow_initialize_from_backup' parameter value.
		RAISERROR(20646, 16, -1, 'disallowing initialize from a backup', 'allow_initialize_from_backup')
		RETURN 1
	END

	RETURN 0
END

 
Last revision 2008RTM
See also

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