locking - How to find out table lock or row lock in Sybase -
i have stored procedure in sybase, it's called java code on row row insertion, how find out whether sp locking table or locking row? check underlying table properties or sp itself?
create procedure dbo.sp1 (@id_code varchar(10), @position_id numeric(10,0) output ) begin begin transaction insert abc..table1( id_code, position_id ) values ( @id_code @position_id ) commit select @position_id = @@identity end go exec sp_procxmode 'dbo.sp1', 'unchained' go if object_id('dbo.sp1') not null print '<<< created procedure dbo.sp1 >>>' else print '<<< failed creating procedure dbo.sp1 >>>'
the lock scheme table can determined using lockscheme()
built in command.
lockscheme('tablename')
you can specify obj_id
, dbid
.
Comments
Post a Comment