Home Microsoft SQL Server DigiMailing iRN Contact
    Keyword



sys.sp_MSscriptpeerconflictdetection_topology_sendresponse

  No additional text.


Syntax
create procedure sys.sp_MSscriptpeerconflictdetection_topology_sendresponse (
	@request_id	int,
	@publication	sysname,
	@originator_node sysname,
	@orginator_db sysname,
	@cmdtxt		nvarchar(max) output
)
as
begin
	
	select @cmdtxt = N'if @@microsoftversion >= 0x09000000 and exists (select * from sys.databases where database_id = db_id() and is_published = 1)
					begin
						if exists(select * from syspublications where name = N' + QUOTENAME(@publication, N'''') + N' and options & 0x1 = 0x1)
						begin
							declare 	@applyresponsecmdtxt nvarchar(max),
									@srvname sysname,
									@dbname sysname,
									@srvversion int,
									@peer_subscriptions nvarchar(max)

							select	@srvname = publishingservername(),
									@dbname = db_name(),
									@srvversion = @@microsoftversion
							declare @peersubtab table (sub_node sysname, sub_db sysname)
							insert 	@peersubtab
								select	distinct C.srvname, C.dest_db
								from 	(syspublications A join sysarticles B on A.pubid = B.pubid) join syssubscriptions C on B.artid = C.artid
								where (C.srvid <> -1) and 	A.name = N' + QUOTENAME(@publication, N'''') + N'
							select @peer_subscriptions = convert(nvarchar(max), (select * from @peersubtab as sub for XML auto))

							select @applyresponsecmdtxt = N''if @@microsoftversion >= 0x0A000000
														begin
															if exists (select * from sys.databases where database_id = db_id() and is_published = 1)
														 	begin
															 	if 	publishingservername() = N''' + QUOTENAME(@originator_node, N'''') + N'''
										       						and db_name() = N''' + QUOTENAME(@orginator_db, N'''') + N'''
									       						begin
									       							exec sp_MSpeerconflictdetection_topology_applyresponse ' +
										       							cast(@request_id as nvarchar) + N',
										       							N'' + QUOTENAME(@srvname, N'''''''') + N'',
										       							N'' + QUOTENAME(@dbname, N'''''''') + N'',''
										       							+ cast(@srvversion as nvarchar) + N'',
										       							N'''''' + REPLACE(@peer_subscriptions, N'''''''', N'''''''''''') + N''''''
								       							end
																end
							       						end''
						
							exec sys.sp_MSpeertopeerfwdingexec @command = @applyresponsecmdtxt, @publication = N' +
												QUOTENAME(@publication, N'''') + N'
						end
					end'
	return
end

 
Last revision 2008RTM
See also

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