Re: Q: Get OS Userid
Date: 20 Jun 1994 21:51:49 GMT
Message-ID: <2u531l$88o_at_blkbox.blkbox.COM>
mem8321_at_u.cc.utah.edu (Mark Miller) writes:
>In article <1994Jun19.162306.24152_at_ericsson.se>,
>BO/EBC/KX/RGFC Roger Bjaerevall 08-682 4851 <ebcrbj_at_ebcw150.ericsson.se> wrote:
>>Is it possible to get the OS userid of the current user (SUN OS)?
>>
>>The 'SELECT user FROM dual' call does only return current ORACLE userid.
>>I did not find any matching parameter to the USERENV() call either.
>>
>We had this problem before too. Somehow it seems overkill to create
>a separate Oracle account for each user on a 500 user system.
>The solution is to write a user exit using Pro*C that uses a local OS
>function (e.g. logname() ) to get the system userid and return it to
>SQL*FORMS.
If you are using Oracle V7, look in the v$session table. There should be
column which is the system account name. I do not recall the name of the
column. Also, you may have to grant the oracle account select access to
the table. Hope this helps (and is correct).
Later,
Steven Whatley
Received on Mon Jun 20 1994 - 23:51:49 CEST