Re: get Unix logon to Forms

From: Mario <mario.simic_at_in2.tel.hr>
Date: 1997/09/14
Message-ID: <01bcc161$1aad8860$35e11dc3_at_marios>#1/1


Candy Robinson <candy_at_bcstec.ca.boeing.com> wrote in article <CANDY.97Sep11083535_at_bcstec.ca.boeing.com>...
> I have an application in Developer 2000 that does a
>
> select user into user_log from dual
>
> from a procedure in order to determine access level allowed for the
> user. The problem is, I want to get the logon name from the Unix
> platform rather than the database logon.
>
> Is there a way to do something in PL/SQL similar to:
>
> :myvar := host('whoami');
>
> I don't know how to grab the logon name for my application. If I use the
> Oracle logon, users can get access to write to places they shouldn't
> by going outside of my application via sqlplus or Microsoft Access
 or
> whatever, because I am granting them write access to tables through
> Oracle, and then restricting which row they can write to through my
> application.
> What I need to do is run the application from a privileged account, and
> control writes based on the *platform* logon. I'm sure this is
> commonly done. Please help (thanks in advance!).
> --
> Sandra (Candy) Robinson Boeing Defense & Space -- Irving Co.
> candy_at_bcstec.ca.boeing.com P.O. Box 152707, MS TR-56
> (972) 659-2558 Irving, TX 75015-2707
> -------
> It takes all the running you can do to keep in the same place. If you
 want to
> get somewhere else you must run twice as fast as that.
> --Alice, in Lewis Carroll's "Through the Looking Glass"
>

If I have correctly understood your question, you want to know operating system login name of your users. Though it can be done with the aid of some "DBMS_something" package/procedure I think there is simpler way. For all of your users create OPS$ accounts, so their Oracle login names and their respective operating system user names will be the same. Instead of granting access to tables why don't you create views for all of your users, something like

create view user_one_view_on_my_table
as
select * from my_table
where user_log = user

After that, for each user grant access to that view, instead of granting access to whole table.

I hope I've helped you.

Have a nice day

Mario Simic
IN2 d.o.o.
Zagreb, Croaatia Received on Sun Sep 14 1997 - 00:00:00 CEST

Original text of this message