Hi everybody,

I need some sybase quereis which contains sybase system commands, to be converted to oracle equivalent system commands. Please somebody can help me out in this. Its very urgent.

These are the queries

Query - 1 :-

SELECT SPID = sp1.spid,
LOGIN = convert(char(10),suser_name(sp1.suid)),
PGM = sp1.program_name,
BLK_SPID = sp1.blocked,
BLK_LOGIN = convert(char(10),suser_name(sp2.suid)),
BLK_PGM = sp2.program_name,
TIME_BLK = convert(char(5), sp1.time_blocked),
BLK_START = convert(char(26), dateadd(ss,0-sp1.time_blocked,GetDate() ),9),
CMD = sp1.cmd,
BLK_CMD = sp2.cmd
FROM master..sysprocesses sp1,
master..sysprocesses sp2
WHERE sp1.blocked = sp2.spid
AND sp1.blocked in
(SELECT spid
FROM master..syslocks
WHERE type &256 = 256)


================================================== =====================

Query - 2: -

SELECT SPID = convert(char(3), sl.spid),
LOGIN = convert(char(10), suser_name(sp.suid)),
locktype = convert(char(15), v.name),
dbname = convert(char(30), db_name(sl.dbid)),
tbl_name = convert(char(40), object_name(sl.id,sl.dbid)),
page,
BLK = convert(char(3), sp.blocked),
TIME = convert(char(5), sp.time_blocked),
sp.program_name
FROM master..syslocks sl,
master..spt_values v,
master..sysprocesses sp
WHERE sl.type = v.number
AND v.type = "L"
AND sl.spid = sp.spid
ORDER BY 1,3,4


Thanks,
Abdul