VB and VBA Users Source Code: Obtaining Sybase Lock information
[
Home
|
Contents
|
Search
|
Reply
| Previous | Next ]
VB/VBA Source Code
Obtaining Sybase Lock information
By:
Andrew Baker
Email (spam proof):
Email the originator of this post
Date:
Monday, August 19, 2002
Hits:
1011
Category:
Database/SQL/ADO
Article:
The following SQL return process level locking information for a Sybase SQL server: SELECT L.spid 'PID', L.fid 'FID', P.status 'Status', V.name 'Lock Type', SUSER_NAME(P.suid) 'User', DB_NAME(L.dbid) 'Database', OBJECT_NAME(L.id,L.dbid) 'Object Name', L.page 'Lock Page', L.class 'Lock Class', P.hostname 'Host', P.program_name 'Program', P.cmd 'Command', P.cpu 'CPU Time', P.physical_io 'I/O', P.memusage 'Mem Usage', P.tran_name 'Transaction' FROM master.dbo.syslocks L, master.dbo.sysprocesses P, master.dbo.spt_values V WHERE L.spid=P.spid AND L.type=V.number AND V.type='L' ORDER BY 1 go
Terms and Conditions
Support this site
Download a trial version of the Excel Workbook Rebuilder