USERENV variables in RLS
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 4 of 4

Thread: USERENV variables in RLS

  1. #1
    Join Date
    Aug 2001
    Location
    India
    Posts
    2

    Exclamation

    Hi,

    I want to enforce FGAC secuity policies on certain tables in my application
    for which I need the user's session id(AUDSID) variable.
    When I include "select userenv('SESSIONID') from dual" statement in my security function
    and attach to the concerned table using DBMS_RLS , the statement always returns 0.
    Is there any approach to be followed to retrieve a database user's AUDSID value in RLS.

    Thanks in advance,
    Mahesh

  2. #2
    Join Date
    Feb 2001
    Location
    Paris, France
    Posts
    809
    well ... problem can come from the fact that your function is launched by the system when some user is performing some action, and if it's launched by the system, chances are that AUDSID=0 ...
    can't you use something like :

    SYS_CONTEXT(''SESSIONID'') instead of userenv ???
    (it's twice 2 simple quotes, not doubles)

  3. #3
    Join Date
    Feb 2001
    Location
    Paris, France
    Posts
    809
    mistake in syntax :/
    use :

    select SYS_CONTEXT ('USERENV','SESSIONID')
    from dual

  4. #4
    Join Date
    Aug 2001
    Location
    India
    Posts
    2
    I have used sys_context('USERENV','SESSIONID') but even that is returning 0.
    Is there any other approach.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width