Below query can be used to check blocking on Sybase database server.

select convert(varchar(4),a.spid) as SPID,convert(varchar(15),db_name(a.dbid)) as DB,convert(varchar(12),suser_name(a.suid)) as LOGIN_NAME,
a.blocked) as BLOCKING_PROCESS,convert(varchar(15),suser_name(b.suid)) as BLOCKING_USER,convert(varchar(4),
a.time_blocked/60) as TIME_BLOCKED,
convert(varchar(10),a.cmd) as COMMAND,convert(varchar(18),a.hostname) as HOSTNAME ,convert(varchar(20),a.loggedindatetime) as BLOCKING_START_TIME
from master..sysprocesses a, master..sysprocesses b
where a.time_blocked >0
and a.blocked = b.spid

Sample Output:

How useful was this post?

Click on a star to rate it!

Average rating 0 / 5. Vote count: 0

No votes so far! Be the first to rate this post.