1
2 CREATE PROCEDURE sp_abort_xact
3 @commid int,
4 @password varchar(30) = NULL
5 AS
6
7
8 if exists (select *
9 from sybsystemdb.dbo.spt_committab
10 where commid = @commid
11 and password = @password)
12 begin
13 UPDATE sybsystemdb.dbo.spt_committab
14 SET status = 'a', lastchange = getdate()
15 WHERE commid = @commid
16 END
17 else
18 begin
19 /*
20 ** 17380, "Commit service xact id doesn't exist."
21 */
22 raiserror 17380
23 end
24
exec sp_procxmode 'sp_abort_xact', 'AnyMode'
go
Grant Execute on sp_abort_xact to public
go