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,
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)
mistake in syntax :/
select SYS_CONTEXT ('USERENV','SESSIONID')
I have used sys_context('USERENV','SESSIONID') but even that is returning 0.
Is there any other approach.
Click Here to Expand Forum to Full Width