Tuesday, July 28, 2020

UTL_FILE_DIR Desupported with Oracle Database 19c

UTL_FILE_DIR is desupported with 19c database. UTL_FILE_DIR is a database pfile parameter. Which is used for EBS custom code or products requres access for read write file Operations on file system. 

In Database 19c, the UTL_FILE_DIR replaced with database directory objects.

With the EBS database upgrade to Database 19c, an equivalent Directory Object will be created for each UTL_FILE_DIR entry Pre-existing EBS product code and custom code will continue to function.

Query to find UTL_FILE_DIR location in EBS Database 19c:
select value from APPS.v$parameter where name='utl_file_dir';

To add a new directory path to the UTL_FILE_DIR parameter:
1) Source the PDB environment file
   
    . $ORACLE_HOME/<<pdb_name>>_<<hostname>>.env

2) Create the new directory path. 

    For example: $mkdir /u01/debuglogdir

3) run the txkCfgUtlfileDir.pl script in addUtlFileDir mode

    $ perl $ORACLE_HOME/appsutil/bin/txkCfgUtlfileDir.pl -contextfile=$CONTEXT_FILE -oraclehome=$ORACLE_HOME \ 
-outdir=$ORACLE_HOME/appsutil/log -mode=addUtlFileDir
      a) When prompted, enter the passwords for the APPS user (the Oracle E-Business Suite database user) and for the SYSTEM user of the root container database (CDB).
      b) When prompted, enter the physical directory path you want to add.

4) Finally, synchronize the modified UTL_FILE_DIR value with the database context file. To do so, run the txkCfgUtlfileDir.pl script in syncUtlFileDir mode using the following commands:

    $ perl $ORACLE_HOME/appsutil/bin/txkCfgUtlfileDir.pl -contextfile=$CONTEXT_FILE -oraclehome=$ORACLE_HOME -outdir=$ORACLE_HOME/appsutil/log -mode=syncUtlFileDir
    

To modify or delete a directory path in the UTL_FILE_DIR parameter:
1) 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:

    $ . $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
    a) With this command, the script creates a text file named _utlfiledir.txt in the /dbs directory.
    b) 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 the changes

    $ perl $ORACLE_HOME/appsutil/bin/txkCfgUtlfileDir.pl -contextfile=$CONTEXT_FILE -oraclehome=$ORACLE_HOME -outdir=$ORACLE_HOME/appsutil/log -mode=setUtlFileDir

3) Finally, synchronize the modified UTL_FILE_DIR value with the database context file.

    $ perl $ORACLE_HOME/appsutil/bin/txkCfgUtlfileDir.pl -contextfile=$CONTEXT_FILE -oraclehome=$ORACLE_HOME -outdir=$ORACLE_HOME/appsutil/log -mode=syncUtlFileDir

That's it. Hope this article will help you.

Best Regards..

9 comments:

  1. Hi Chowdari,

    It is a great article.

    I have an issue in my upgrade.

    When I put the utl_file_dir in init.ora file, it is ignored as
    Obsolete system parameters with specified values:
    utl_file_dir

    because 19c does not recognize this parameter.

    I DO NOT have the
    following views under the APPS schema

    APPS.v$parameter and APPS.v$parameters

    when I run following sql

    SQL> select value from APPS.v$parameter where name='utl_file_dir';
    select value from APPS.v$parameter where name='utl_file_dir'
    *
    ERROR at line 1:
    ORA-00942: table or view does not exist

    I am not sure why I dont have these views under APPS and that is why my apps tier autoconfig keeps failing

    ERROR DESCRIPTION:
    (*******FATAL ERROR*******
    PROGRAM : (/app/applmgr/IMM25D/fs1/EBSapps/appl/fnd/12.0.0/patch/115/bin/txkCfgUtlfileDir.pl)
    TIME : Sat Jan 30 20:11:00 2021
    FUNCTION: main::getUtlFileDirParam [ Level 1 ]
    ERRORMSG: Unable to read UTL_FILE_DIR parameter.
    )
    ERRORCODE = 1 ERRORCODE_END


    Do you have any idea why this is happening.




    ReplyDelete
    Replies
    1. Chowdari'S Oracle Dba Blog / Weblog: Utl_File_Dir Desupported With Oracle Database 19C >>>>> Download Now

      >>>>> Download Full

      Chowdari'S Oracle Dba Blog / Weblog: Utl_File_Dir Desupported With Oracle Database 19C >>>>> Download LINK

      >>>>> Download Now

      Chowdari'S Oracle Dba Blog / Weblog: Utl_File_Dir Desupported With Oracle Database 19C >>>>> Download Full

      >>>>> Download LINK Hd

      Delete
  2. 1. Try querying sys schema for v$parameter
    2. Did you exported the list of diretories to $SID_utlfiledir.txt using
    erl $ORACLE_HOME/appsutil/bin/txkCfgUtlfileDir.pl -contextfile=$CONTEXT_FILE -oraclehome=$ORACLE_HOME -outdir=/tmp -upgradedhome=new $ORACLE_HOME -mode=getUtlFileDir -servicetype=onpremise
    3. once step 2 done , did you setUtlFileDir to create the directories after making necessary changes to $SID_utlfiledir.txt

    ReplyDelete
  3. After done this, still facing same issue, autconfig was done Database but in application autconfig is going in to error

    ReplyDelete
  4. Well written .. Thank you for sharing this ..

    ReplyDelete
  5. Chowdari'S Oracle Dba Blog / Weblog: Utl_File_Dir Desupported With Oracle Database 19C >>>>> Download Now

    >>>>> Download Full

    Chowdari'S Oracle Dba Blog / Weblog: Utl_File_Dir Desupported With Oracle Database 19C >>>>> Download LINK

    >>>>> Download Now

    Chowdari'S Oracle Dba Blog / Weblog: Utl_File_Dir Desupported With Oracle Database 19C >>>>> Download Full

    >>>>> Download LINK

    ReplyDelete
  6. Thanks, its helped me.

    Bhaskar chow

    ReplyDelete

Some Most Popular Articles