Sunday, July 26, 2020

How to setup UTL_FILE_DIR values in the 19c database.

 Perform the following steps to set the target UTL_FILE_DIR values in the database.


 1.Source the environment file 
            $ source <CONTEXT_NAME>.env

2.Obtain the existing value for the UTL_FILE_DIR using the following commands:

perl <ORACLE_HOME>/appsutil/bin/txkCfgUtlfileDir.pl -contextfile=<DB Context File> \ -oraclehome=<ORACLE_HOME> -outdir=<ORACLE_HOME>/appsutil/log -mode=getUtlFileDir


         This will create a text file <DB_NAME>_utilfiledir.txt under the $ORACLE_HOME/dbs directory with references    to the target oracle home.

3.Review the  <DB_NAME>_utilfiledir.txt and edit the values ,if required .

4.Execute the following command to store the updated values for UTL_FILE_DIR in the  database.

cd <ORACLE_HOME>/appsutil/bin

perl <ORACLE_HOME>/appsutil/bin/txkCfgUtlfileDir.pl -contextfile=<DB Context  File> \  -oraclehome=<ORACLE_HOME> -outdir=<ORACLE_HOME>/appsutil/log \
-mode=setUtlFileDir


           This command will validate the directory paths provided in the <DB_NAME>_utilfiledir.txt.

5.Execute the below command to create a directory object for the outbound     directory (Pointed to by the  s_outbound_dir context variable in the database tier  context file)

perl <ORACLE_HOME>/appsutil/bin/txkCfgUtlfileDir.pl -contextfile=<DB Context File> \-  oraclehome= <ORACLE_HOME> -outdir=<ORACLE_HOME>/appsutil/log -mode=createDirObject

When prompted for the OS patch for the directory object to be created ,enter the values of the s_outbound_dir context variable in the database tier context file .

 6.Sync up the values of UTL_FILE_DIR in the database tier context file by running the  following command.

perl <ORACLE_HOME>/appsutil/bin/txkCfgUtlfileDir.pl -contextfile=<DB Context File> \ 
 - oraclehome=<ORACLE_HOME> -outdir=  <ORACLE_HOME>/appsutil/log -   mode=syncUtlFileDir \ -skipautoconfig=yes 


             Now source the PDB environment file in the database tier and re-run the autoconfig .


 ..........................................................................................................Thank you 

No comments:

Post a Comment

ORACLE DATABASE CONTENT

ORACLE DATABASE 11gR2 & 12C  CONTENT Pre-Requisite: UNIX, SQL Basics Introduction to Oracle Database §   Introduction of Database ...