May 29, 2012

sp_MSreset_transaction (Transact-SQL MetaData) Definition

Please note: that the following source code is provided and copyrighted by Microsoft and is for educational purpose only.
The meta data is from an SQL 2012 Server.

I have posted alot more, find the whole list here.

Goto Definition or MetaData

Definition:

sys.sp_MSreset_transaction(nvarchar @publisher
, nvarchar @publisher_db
, varbinary @xact_seqno)

MetaData:

 CREATE PROCEDURE sys.sp_MSreset_transaction   
(
@publisher sysname,
@publisher_db sysname,
@xact_seqno varbinary(10)
)
AS
begin
SET NOCOUNT ON
--
-- security check
-- only db_owner can execute this
--

if (is_member ('db_owner') != 1)
begin
raiserror(14260, 16, -1)
return (1)
end
declare @publisher_database_id int

select @publisher_database_id = a.id
from dbo.MSpublisher_databases a join master.dbo.sysservers b on a.publisher_id = b.srvid
where a.publisher_db = @publisher_db
and upper(b.srvname) = upper(@publisher) collate database_default

if @@error<>0
return 1

insert dbo.MSrepl_transactions (publisher_database_id, xact_id, xact_seqno, entry_time)
values (@publisher_database_id, @xact_seqno, @xact_seqno, GetDate())
if @@error<>0
return 1
return 0
end

No comments:

Post a Comment

Total Pageviews