How to update UTL_FILE_DIR in an Oracle E-Business Suite Instance on Oracle Database 19c


After the database upgrade to 19c, when you are running Oracle E-Business Suite on Oracle Database 19c, you can use the txkCfgUtlfileDir.pl script to add, modify, or delete directory paths in the supplemental UTL_FILE_DIR parameter as needed.


To add a new directory path to the supplemental UTL_FILE_DIR parameter:

1) Source the PDB environment file.

$ . $ORACLE_HOME/<pdb_name>_<hostname>.env
Create the new directory path. For example:

$ mkdir /u01/debuglogdir
Note: If you use an Oracle RAC database, ensure that the directory path is shared across all the nodes in the cluster.

2) Source the PDB environment file and then run the txkCfgUtlfileDir.pl script in addUtlFileDir mode using the following commands:

$ . $ORACLE_HOME/<pdb_name>_<hostname>.env

$ perl $ORACLE_HOME/appsutil/bin/txkCfgUtlfileDir.pl -contextfile=$CONTEXT_FILE \
-oraclehome=$ORACLE_HOME -outdir=$ORACLE_HOME/appsutil/log -mode=addUtlFileDir -servicetype=onpremise|opc
When prompted, enter the password for the APPS user (the Oracle E-Business Suite database user).

Additionally, if your environment is on R12.TXK.C.Delta.13 or later, enter the password for the EBS_SYSTEM user. If your environment is on R12.TXK.C.Delta.12 or earlier, enter the password for the SYSTEM user.

When prompted, enter the physical directory path you want to add. The script validates the directory path and then creates a directory object for that directory. The script uses the following naming convention for the directory object:  EBS_UTL_FILE_DIR_<random_number>

3) Finally, synchronize the modified UTL_FILE_DIR value with the database context file. To do so, source the PDB environment file and then run the txkCfgUtlfileDir.pl script in syncUtlFileDir mode using the following commands:
$ . $ORACLE_HOME/<pdb_name>_<hostname>.env

$ perl $ORACLE_HOME/appsutil/bin/txkCfgUtlfileDir.pl -contextfile=$CONTEXT_FILE \
-oraclehome=$ORACLE_HOME -outdir=$ORACLE_HOME/appsutil/log -mode=syncUtlFileDir -servicetype=onpremise|opc
Note: If you use an Oracle RAC database, repeat step to run the txkCfgUtlfileDir.pl script in syncUtlFileDir mode on each database node.

 

To modify or delete a directory path in the supplemental UTL_FILE_DIR parameter:

Note: Before deleting a directory path from UTL_FILE_DIR, ensure that the directory is no longer referenced by any application.

First, retrieve the list of directory paths that are currently stored in the UTL_FILE_DIR supplemental parameter. To do so, source the PDB environment file and then run the txkCfgUtlfileDir.pl script in getUtlFileDir mode using the following commands:

1) Source PDB Enviornment
$ . $ORACLE_HOME/<pdb_name>_<hostname>.env

$ perl $ORACLE_HOME/appsutil/bin/txkCfgUtlfileDir.pl -contextfile=$CONTEXT_FILE \
-oraclehome=$ORACLE_HOME -outdir=$ORACLE_HOME/appsutil/log -mode=getUtlFileDir -servicetype=onpremise|opc
With this command, the script creates a text file named <PDBNAME>_utlfiledir.txt in the <ORACLE_HOME>/dbs directory.

Edit the text file to modify any changed directory path or delete any directory path that you no longer need. If you modify a directory path, ensure that you have created the directory at the new location.

2) To update the value of the supplemental UTL_FILE_DIR parameter with your changes, run the txkCfgUtlfileDir.pl script in setUtlFileDir mode using the following command:

$ perl $ORACLE_HOME/appsutil/bin/txkCfgUtlfileDir.pl -contextfile=$CONTEXT_FILE \
-oraclehome=$ORACLE_HOME -outdir=$ORACLE_HOME/appsutil/log -mode=setUtlFileDir -servicetype=onpremise|opc
With this command, the script creates directory objects for any modified physical directory paths and deletes the directory objects for any directory paths that you deleted from the UTL_FILE_DIR value.

Note: If you are using a new session, then you should source the PDB environment file before running the txkCfgUtlfileDir.pl command.

3) Synchronize the modified UTL_FILE_DIR value with the database context file. To do so, source the PDB environment file and then run the txkCfgUtlfileDir.pl script in syncUtlFileDir mode using the following commands:

$ . $ORACLE_HOME/<pdb_name>_<hostname>.env

$ perl $ORACLE_HOME/appsutil/bin/txkCfgUtlfileDir.pl -contextfile=$CONTEXT_FILE \
-oraclehome=$ORACLE_HOME -outdir=$ORACLE_HOME/appsutil/log -mode=syncUtlFileDir -servicetype=onpremise|opc
Note: If you use an Oracle RAC database, repeat step to run the txkCfgUtlfileDir.pl script in syncUtlFileDir mode on each database node.




If you like please follow and comment