DB_NAME [message #118988] |
Tue, 10 May 2005 02:52 |
patrykp
Messages: 31 Registered: April 2005
|
Member |
|
|
How migrate the code to Oracle?
SELECT DISTINCT DB_NAME(SYSP.dbid) dmname, SYSP.program_name, SYSP.loginame
FROM sysprocesses SYSP, test T
WHERE (T.User_ID = SYSP.uid_) AND
(
(DB_NAME(SYSP.dbid) = DB_NAME())
Best regards.
|
|
|
Re: DB_NAME [message #119059 is a reply to message #118988] |
Tue, 10 May 2005 08:20 |
Frank Naude
Messages: 4587 Registered: April 1998
|
Senior Member |
|
|
Try something like this:
SELECT DISTINCT SYS_CONTEXT('USERENV', 'DB_NAME') dmname,
sysp.program, sysp.username
FROM sys.v_$session sysp, test t
WHERE t.user_id = sysp.audsid
/
Best regards.
Frank
|
|
|
|