<pre>
dump tran sybsystemprocs with truncate_only
go

use sybsystemprocs
go

if exists (select * from sysobjects where name = "sp_opentran" and type = 'P')
   drop proc sp_opentran
go

create procedure sp_opentran 
as

-- sp_whom.sql: quickly selects only info about open transactions
-- Author: Todd Boss
-- Change log
-- date		author	purpose
-- 07/01/97	T.Boss	creation

select spid, username=convert(varchar(12),suser_name(suid)),
tran_name=convert(varchar(25),tran_name),
dbname=convert(varchar(12),db_name(dbid))
from master..sysprocesses where tran_name > ' ' 
go

if object_id('sp_opentran') is not null
begin
    print '<<< Created procedure dbo.sp_opentran >>>'
    grant execute on dbo.sp_opentran to public
end
else
begin
    print '<<< Failed creating proc dbo.sp_opentran >>>'
end
go         
