Re[1]: FGAC and application contexts help !

  • From: "Prem Khanna J" <premj@xxxxxxxxxxxxxx>
  • To: oracle-l@xxxxxxxxxxxxx
  • Date: 20 Aug 2004 12:29:32 -0000

Hi Tanel, 
Thanks for your reply.
we want to have APPS username based access control.

Below is the procedure is use to get the USER_ID of 
application user.This procedure in turn is being used by 
DBMS_FGA as shown below . 

--------------------------------------------------------------- 
CREATE OR REPLACE PROCEDURE fga.aud_pro ( 
schema_name VARCHAR2, 
table_name VARCHAR2, 
policy_name VARCHAR2 ) 
IS 
appuserid number; 
appusername varchar2(30); 
BEGIN 
SELECT user_id , user_name into appuserid , appusername 
from apps.fnd_user where 
user_id = apps.fnd_profile.value('user_id'); 

INSERT INTO AUD_LOG VALUES ( 
appuserid,appusername,table_name,policy_name,sysdate ) ; 
END; 


EXECUTE DBMS_FGA.ADD_POLICY (- 
OBJECT_SCHEMA => 'APPLSYS',- 
OBJECT_NAME => 'FND_CONCURRENT_PROGRAMS',- 
POLICY_NAME => 'TEST_POLICY',- 
AUDIT_CONDITION => 'CONCURRENT_PROGRAM_NAME = ''TESTPRG''',- 
AUDIT_COLUMN => 'CONCURRENT_PROGRAM_NAME',- 
HANDLER_SCHEMA => 'FGA',- 
HANDLER_MODULE => 'AUD_PRO',- 
ENABLE => TRUE ); 
--------------------------------------------------------------- 

But the user_id and user_name returned is "-1" and "ANONYMOUS"
and not the correct one.How do i get the proper values ? 
Any profile setting to be done in APPS ?! 

The environment is Oracle EBS 11.5.9/ Oracle 9.2.0.4/ AIX5.2L. 

Thanks & Regards, 
Prem.
----------------------------------------------------------------
Please see the official ORACLE-L FAQ: http://www.orafaq.com
----------------------------------------------------------------
To unsubscribe send email to:  oracle-l-request@xxxxxxxxxxxxx
put 'unsubscribe' in the subject line.
--
Archives are at //www.freelists.org/archives/oracle-l/
FAQ is at //www.freelists.org/help/fom-serve/cache/1.html
-----------------------------------------------------------------

Other related posts: