Re: How to find OS username for a session??
From: John Jones <john_at_iluvatar.tip.duke.edu>
Date: 1995/12/06
Message-ID: <Pine.NXT.3.90.951206134457.15708A-100000_at_iluvatar>#1/1
Date: 1995/12/06
Message-ID: <Pine.NXT.3.90.951206134457.15708A-100000_at_iluvatar>#1/1
On 6 Dec 1995, Donna Kray wrote:
> What view do I need to use to find the OS username for that paricular
> session? I am using it in a trigger to update an "updated_by" field and I
> want username *and* the OS username. Is v$session the correct view? And
> if so, how do I get the data for only that particular session?
>
> SELECT USERNAME, OSUSER
> FROM ????
> [WHERE ????];
not sure about the OSUSER, but for the USERNAME just:
"select user from dual;"
dual is a dummy table used for this type of select, user will return the person logged on at the time this is issued. If like in our case, you use OPS$ that will be on there. To get rid of that just use:
select substr(user,5,10) from dual;
>
John Jones | my views are my own......... Oracle Consultant | no matter what company they are john_at_iluvatar.tip.duke.edu | coming from. --------------------------------------------------------------------Received on Wed Dec 06 1995 - 00:00:00 CET