Tuesday, February 5, 2013

Issues when opening forms on our DEV
*******************************


FRM-40833: Could not completely load the dynamic user exit libraries.
User exit FND did not execute

To resolve the issue:

1. Copy fndfmxit.so from a backup
2. Place it in $FND_TOP/bin
3. Do NOT relink fndfmxit.so, instead bounce services and you should be able to launch forms now


~~~~~~~~~~~XX~~~~~~~~~~~
Auto Config  completed with Error in DB Tire : java.lang.UnsatisfiedLinkError: njni11
*****************************************************************

Running AutoConfig On DB Node Reports: UnsatisfiedLinkError
Exception Loading Native Library: njni11 while DB upgraded to 11.2.0.2


Recently While DB Upgraded from 11.1.0.7 to 11.2.0.2 , while running autoconfig below is the error


Context Value Management will now update the Context file
UnsatisfiedLinkError exception loading native library: njni11
java.lang.UnsatisfiedLinkError: njni11 (No such file or directory)

        Updating Context file...COMPLETED

        Attempting upload of Context file and templates to database...COMPLETED

Updating rdbms version in Context file to db112
Updating rdbms type in Context file to 64 bits
Configuring templates from ORACLE_HOME ...

AutoConfig completed successfully.






Solution :
*******
This issue because of Database 11.2 it only comes with 64bit libraries, but we are still trying to use 32bit java as defined by context variables s_jdktop and s_jretop which points to ORACLE_HOME/appsutil/jre

So changed the  s_jdktop and s_jretop in $CONTEXT_FILE  to point to $ORACLE_HOME/jdk/jre and ran the autoconfig and if went successful.

Context Value Management will now update the Context file

        Updating Context file...COMPLETED

        Attempting upload of Context file and templates to database...COMPLETED

Updating rdbms version in Context file to db112
Updating rdbms type in Context file to 64 bits
Configuring templates from ORACLE_HOME ...

AutoConfig completed successfully.

############################################################################3
How to Create a Read Only Schema in Oracle R12.

Method :1

SQL> CREATE USER APPSREAD IDENTIFIED BY APPSREAD;  
User created.
SQL>

SQL> GRANT CONNECT, RESOURCE,CREATE SYNONYM TO APPSREAD;
Grant succeeded.  
SQL>

Generate a Script for creating database objects of Application User ‘APPS’

set echo off set
pagesize 0
set linesize 300
spool cr8synonyms.sql
select 'create synonym ' || OBJECT_NAME || ' for '|| OWNER ||'.' ||OBJECT_NAME || ';' from all_objects where OWNER in ('APPS') and
OBJECT_NAME not like '%/%' and OBJECT_TYPE in ('TABLE','VIEW','SYNONYM');  
spool off

Generate a script for selecting database objects of Application User ‘APPS’

spool GrantSelect.sql  
select 'grant select on '|| OWNER ||'.' ||OBJECT_NAME || ' to APPSREAD;' from all_objects  where OWNER not in ('SYS','SYSTEM') and OBJECT_NAME not like '%/%' and OBJECT_TYPE in ('TABLE','VIEW','SYNONYM');  
spool off

Connect to sqlplus  as sysdaba and execute the following script

SQL> @GrantSelect.sql
SQL> @cr8synonyms.sql

Connect to Read only schema User and check the objects.

SQL> conn oracle/oracle Connected.
SQL> select count(*) from tab;    
COUNT(*) ----------      15515  
SQL>
How to create Apps Read Only Mode in Oracle R12

Method :2

1. create role READ_ONLY not identified;

2. begin
for t1 in ( select owner,table_name from dba_tables where owner='READ_ONLY') loop
execute immediate ' grant select on ' || t1.owner || '.' || t1.table_name || ' to READ_ONLY';
end loop;
end;

3. begin
for t1 in ( select owner,view_name from dba_views where owner='READ_ONLY') loop
execute immediate ' grant select on ' || t1.owner || '.' || t1.view_name || ' to READ_ONLY';
end loop;
end;

4. begin
for t1 in ( select owner,object_name from dba_objects where owner='READ_ONLY' and object_type in ('PROCEDURE','FUNCTION','PACKAGE','PACKAGE BODY')) loop
execute immediate ' grant execute on ' || t1.owner || '.' || t1.object_name || ' to READ_ONLY';
end loop;
end;

5.Trigger creation script. ( which will give the privs when objects were just created.)

create or replace trigger APPSREAD.trigger_READ_ONLY_USER after CREATE on schema
declare
l_stat varchar2(255);
l_job number;
begin
if ( ora_dict_obj_type = 'TABLE' )
then
l_stat := 'execute immediate "grant select on ' || ora_dict_obj_name || ' to READ_ONLY";';
dbms_job.submit( l_job, replace(l_stat,'"','''') );
end if;
if ( ora_dict_obj_type = 'VIEW' )
then
l_stat := 'execute immediate "grant select on ' || ora_dict_obj_name || ' to READ_ONLY";';
dbms_job.submit( l_job, replace(l_stat,'"','''') );
end if;
if ( ora_dict_obj_type in ('PROCEDURE','FUNCTION','PACKAGE','BODY'))
then
l_stat := 'execute immediate "grant execute on ' || ora_dict_obj_name || ' to READ_ONLY";';
dbms_job.submit( l_job, replace(l_stat,'"','''') );
end if;
end;


6. Grant the READ_ONLY Role to the eligible users


7. Grant READ_ONLY to APPSREAD;

Oracle Applications DBA

Hello Friends,

I m Raj Working as Oracle Applications DBA/Oracle DBA in United States Of America. I started these Blog to share my Experiences in my day to day work. I also need users to share there experiences in my blogs.....