Home Microsoft SQL Server DigiMailing iRN Contact
    Keyword



sys.sp_MSexecwithlsnoutput

  No additional text.


Syntax
create procedure sys.sp_MSexecwithlsnoutput
(
	@command	nvarchar(max),
	@xact_seqno	varbinary(16) output
)
as
begin
	declare @retcode int

	select @xact_seqno = 0x0
	
	-- security check for subscriber
	-- Though the work below is related to a publisher, we use
	-- a check for the subscriber because this is normally executed
	-- by the distribution agent at a subscriber (republisher).
	-- this should only be used by peer to peer subscribers.
	exec @retcode = sys.sp_MSreplcheck_subscribe
    if @@error <> 0 or @retcode <> 0
    begin
        return 1
    end

	begin transaction tran_sp_MSexecwithlsnoutput
	save transaction tran_sp_MSexecwithlsnoutput

	exec(@command)
	if @@error <> 0
    begin
        goto FAILURE
    end

    -- if this is not a republisher we will get an error. this is expected
    -- since we should never be calling this on a non-publisher database.
	exec @retcode = sys.sp_replincrementlsn @xact_seqno = @xact_seqno output
	if @@error <> 0 or @retcode <> 0
	begin
		goto FAILURE
	end

	commit transaction tran_sp_MSexecwithlsnoutput
	
    return 0
FAILURE:
	rollback transaction tran_sp_MSexecwithlsnoutput
	commit transaction

	return 1
end

 
Last revision 2008RTM
See also

  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