Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: dbms_rls and 815E on NT
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
![]() |
![]() |