As requested by one of our techies, I had to enable native compilation for database which is on 10.2.0.3 and Apps is on 12.0.6
This is done as follows:
ALTER SESSION SET PLSQL_CODE_TYPE='NATIVE';
which has a default value as INTERPRETED;
as required for a particular session .
The other two parameters for native compilation are:
which have values well set for my instance.
But when I tested it with a test procedure,
native compilation failed with these errors.
PLS-00925: native compilation failed: Unable to create C file.
Checked with the file permissions for nativelib directory under $ORACLE_HOME/plsql
but still didnot work.
The reason is found to be
The directories required to store the shared libraries
generated as part of native PL/SQL compilation are not present.
I thought that the gcc compiler is not picking up the code.
So checked with the spnc_commands file under plsql directory ( which by default
should not have any problem)
The $ORACLE_HOME, I replaced it with actual path and retested which didnt work.
Finally, I discovered that the directories which the compiler
is trying to access under nativelib directory are not there as indicated by the
PLS-925: native compilation failed: Unable to create C file
DB oracle home/plsql/nativelib/d_number/name.c
So created the directories manually
using mkdir -p d0 ------- d100
and then the compilation went fine as per the procedure.