Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> how to get user_id for a APPS user ?
Hi All,
The environment is Oracle EBS 11.5.9/ Oracle 9.2.0.4/ AIX5.2L.
Below is the procedure is use to get the USER_ID of oracle applications user.This procedure in turn is being used by DBMS_FGA as shown below .
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',-
But the user_id and user_name returned is -1 and ANONYMOUS and not the correct one.Whereas i have logged on as user "SCOTT". How do i get the proper values for userid and user_name ?
Can someone let me know !
Regards,
Prem.
![]() |
![]() |