hraja77
asked on
In Oracle sql how can write a query to show my current session details
Hi All,
In Oracle sql how can write a query to show the current session details, i.e. there are many people logged into the database but i want the pl/sql routine to just pickup the session details of the user currently executing the plsql;
please help
thanks
H
In Oracle sql how can write a query to show the current session details, i.e. there are many people logged into the database but i want the pl/sql routine to just pickup the session details of the user currently executing the plsql;
please help
thanks
H
ASKER
thanks for the quick response angel;
i just need to know how do i get the machine info that the user is comming from ?
i just need to know how do i get the machine info that the user is comming from ?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
You can also use:
sys_context('USERENV', 'HOST')
to get the value of V$SESSION.MACHINE.
Due to security audit reasons, some places may not allow access to the V$SESSION view.
sys_context('USERENV', 'HOST')
to get the value of V$SESSION.MACHINE.
Due to security audit reasons, some places may not allow access to the V$SESSION view.
declare
v_par1 NUMBER;
BEGIN
v_par1 :=SYS_CONTEXT('USERENV','S
dbms_output.put_line ('Session ID = '|| v_par1);
end;
/