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 -> Why my sys_context('USERENV','CURRENT_SQL') is null?

Why my sys_context('USERENV','CURRENT_SQL') is null?

From: NewRacGuy <NewRacGuy(nospam)_at_hotmail.com>
Date: Thu, 10 Nov 2005 03:21:18 GMT
Message-ID: <O0zcf.25754$ip6.21940@trnddc07>


I am studying the use of sys_context.(Oracle 9206) I created a function



create or replace function test_function (l_data_input in varchar2)
return varchar2 as
result varchar2(2000);
begin

   result :=sys_context('USERENV','CURRENT_SQL'); return result;



Then I do
select test_function(ssn) from test;
I have already enabled FGA on ssn column on table test, and I have verified that the select statement has put an entry in DBA_FGA_AUDIT_TRAIL.

According to the ducument, sys_context('USERENV','CURRENT_SQL') "Returns the first 4K bytes of the current SQL that triggered the fine-grained auditing event.", but in my case, sys_context('USERENV','CURRENT_SQL') always returns null. I am expecting it returns "select test_function(ssn) from test".

Why is that? Can somebody help?

Thanks very much for your help. Received on Wed Nov 09 2005 - 21:21:18 CST

Original text of this message

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