Home Microsoft SQL Server DigiMailing iRN Contact
    Keyword



sys.sp_MSpeerapplyresponse

  No additional text.


Syntax
create procedure sys.sp_MSpeerapplyresponse
(
	@request_id		int,
	@originator		sysname,
	@originator_db	sysname,
	@response_srvr	sysname,
	@response_db	sysname
)
as
begin
	set nocount on	
	
	declare @retcode int
	
	-- security check for subscriber
	exec @retcode = sys.sp_MSreplcheck_subscribe
    if @@error <> 0 or @retcode <> 0
    begin
        return 1
    end

	-- we will exit in either of these conditions since this means we
	-- are not at the correct node and we should treat this as a noop
	-- the conditions are as follows:
	--	1. Any of the user provided information is NULL
	--	2. We are not on the originator server
	--	3. The originator and reponse_srvr are the same
	
	-- section 1
	if @request_id is NULL
		or @originator is NULL
		or @originator_db is NULL
		or @response_srvr is NULL
		or @response_db is NULL
		-- section 2
		or UPPER(@originator) <> UPPER(publishingservername())
		or @originator_db <> db_name()
		-- section 3
		or (UPPER(@originator) = UPPER(@response_srvr)
			and @originator_db = @response_db)
	begin
		return 0
	end
	
	begin transaction tr_sp_MSpeerapplyresponse
	save transaction tr_sp_MSpeerapplyresponse

	update MSpeer_response
		set received_date = getdate()
		where request_id = @request_id
			and peer = @response_srvr
			and peer_db = @response_db
	if @@error <> 0
	begin
		-- The procedure sys.sp_MSpeerapplyresponse failed to UPDATE the resource MSpeer_response Server error =  0.
		raiserror (21499, 16, -1, 'sys.sp_MSpeerapplyresponse', 'UPDATE', 'MSpeer_response.', @@error)
		goto FAILURE
	end

	commit transaction tr_sp_MSpeerapplyresponse

	return 0
FAILURE:
	rollback transaction tr_sp_MSpeerapplyresponse
	commit transaction
	
	return 1
end

 
Last revision 2008RTM
See also

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