Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: dbms_rls and 815E on NT

Re: dbms_rls and 815E on NT

From: Jonathan Lewis <jonathan_at_jlcomp.demon.co.uk>
Date: Thu, 20 Jan 2000 19:59:44 -0000
Message-ID: <948399634.21450.0.nnrp-07.9e984b29@news.demon.co.uk>

Just to add the icing (dream topping, etc).

If you are using the an RLS function that generates a predicate of the form:

    dept_id = sys_context('application_name','legal_department')

and a logon trigger that uses

    dbms_session.set_context()
to set the context for the user, then your trigger can read
>create trigger my_trigger
>before insert on T for each row
>begin
> :new.dept_id := sys_context('application_name','legal_department')
>end;
>/

(at least I assume it should be able to, I haven't tested it yet).

--

Jonathan Lewis
Yet another Oracle-related web site: http://www.jlcomp.demon.co.uk

Thomas Kyte wrote in message <5lee8s4gcp9vhrmce1ilelhocdhi82krfh_at_4ax.com>...

>you use dbms_rls to restrict access to data.
>
>You can use a trigger to supply non-defaultable values.
>
>You would code:
>
>create trigger my_trigger
>before insert on T for each row
>begin
> :new.dept_id := Your_Function_That_Returns_The_Correct_id_For_This_User;
>end;
>/
Received on Thu Jan 20 2000 - 13:59:44 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US