Update or set utl_file_dir in oracle database 19c Container DB (CDB & PDB)

 Check exiting values utl_file_dir


for 19c DB: login as apps user

select value from v$parameter where name = 'utl_file_dir';


cd $ORACLE_HOME

source $ORACLE_HOME/CONTEXT_NAME.environment

For 19c its PDB env


Run below to get details of existing utl_file_dir:


perl $ORACLE_HOME/appsutil/bin/txkCfgUtlfileDir.pl -contextfile=$ORACLE_HOME/appsutil/Prod.xml \

-oraclehome=<full path of $ORACLE_HOME> -outdir=<full path of $ORACLE_HOME>/appsutil/log -mode=getUtlFileDir



Above scripts creates PROD_utlfiledir.txt, check values correct, if not then edit PROD_utlfiledir.txt file and update utl_file/dir vlue


Example:

vi $ORACLE_HOME/dbs/PROD_utlfiledir.txt


/u01/temp/PROD --> this directory should be created  with read write permission for both DB &APPS


mkdir -p /u01/temp/PROD


Run below to set details of new utl_file_dir:


perl $ORACLE_HOME/appsutil/bin/txkCfgUtlfileDir.pl -contextfile=$CONTEXT_FILE \

-oraclehome=$ORACLE_HOME -outdir=$ORACLE_HOME/appsutil/log \

-mode=setUtlFileDir


Run below to create directory of existing utl_file_dir: (same like step mkdir -p /u01/temp/PROD )


perl $ORACLE_HOME/appsutil/bin/txkCfgUtlfileDir.pl -contextfile=$CONTEXT_FILE \

-oraclehome=$ORACLE_HOME -outdir=$ORACLE_HOME/appsutil/log -mode=createDirObject


When prompted for the OS path for the directory object to be created, enter /u01/temp/PROD


Run below to sync details of new utl_file_dir:


perl $ORACLE_HOME/appsutil/bin/txkCfgUtlfileDir.pl -contextfile=$CONTEXT_FILE \

-oraclehome=$ORACLE_HOME -outdir=$ORACLE_HOME/appsutil/log -mode=syncUtlFileDir \

-skipautoconfig=yes


Run below to check details of utl_file_dir got updated or not:


for 19c DB: login as apps user

select value from v$parameter where name = 'utl_file_dir';

Post a Comment

0 Comments