For EBS upgrade to 19c, this method provides the functionality of UTL_FILE_DIR in the 19c using Database Directory Objects.


Migrating UTL_FILE_DIR Settings when Upgrading to Oracle Database 19c

Perform the steps in this section as part of your database upgrade when you are instructed to store the UTL_FILE_DIR parameter values in one of the following documents:

  • Interoperability Notes: Oracle E-Business Suite Release 12.2 with Oracle Database 19cDocument 2552181.1

  • Using Oracle 19c RAC Multitenant (Single PDB) with Oracle E-Business Suite Release 12.2Document 2530665.1

  • Interoperability Notes: Oracle E-Business Suite Release 12.1 with Oracle Database 19cDocument 2580629.1

  • Using Oracle 19c RAC Multitenant (Single PDB) with Oracle E-Business Suite Release 12.1Document 2530680.1

You should run the txkCfgUtlfileDir.pl script twice in different modes to complete this task. First you run the script in getUtlFileDir mode to retrieve the directory paths formerly specified in the UTL_FILE_DIR database initialization parameter and prepare them for the upgrade. Then you run the script in setUtlFileDir mode to store the directory paths in the new Oracle E-Business Suite tables underlying the apps.v$parameter and apps.v$parameter2 views and to create the corresponding directory objects.

To retrieve the directory path values from the source UTL_FILE_DIR database initialization parameter:

  1. Source the Oracle E-Business Suite database environment of your 11g or 12c Oracle home.

    $ . $ORACLE_HOME/<sid>_<hostname>.env
  2. Run the txkCfgUtlfileDir.pl script in getUtlFileDir mode using the following command:

    $ perl $ORACLE_HOME/appsutil/bin/txkCfgUtlfileDir.pl -contextfile=<DB Context File> \
    -oraclehome=<11g/12c ORACLE_HOME> -outdir=<Output/Log location> \
    -upgradedhome=<19c ORACLE_HOME> -mode=getUtlFileDir -servicetype=onpremise|opc

    With this command, the script retrieves the directory paths stored in the UTL_FILE_DIR database initialization parameter, modifies them to prepare them for use in Oracle Database 19c, and creates a text file named <DB_NAME>_utlfiledir.txt in the <ORACLE_HOME>/dbs directory with the list of modified directory paths. The -servicetype parameter defaults to -servicetype=onpremise, but when running on Oracle Cloud, you must specify -servicetype=opc for this parameter. The script performs the following modifications in the directory paths:

    • For all on-premises instances, and for Oracle Cloud instances on R12.AD.C.Delta.14 and R12.TXK.C.Delta.14 or later, any occurrences of the path /usr/tmp for UNIX/Linux, or C:\temp for Windows, are replaced with <19c ORACLE_HOME>/../temp/<PDB_NAME>, where <PDB_NAME> is the pluggable database (PDB) name.

    • For Oracle Cloud instances on R12.AD.C.Delta.13 and R12.TXK.C.Delta.13 or earlier, any occurrences of the path /usr/tmp are replaced with <19c ORACLE_HOME>/temp/<PDB_NAME>, where <PDB_NAME> is the pluggable database (PDB) name.

    • For both on-premises and Oracle Cloud instances, any occurrences of the 11g or 12c Oracle home within a directory path are replaced with the 19c Oracle home. For example, the following directory path:

      <11g/12c ORACLE_HOME>/appsutil/outbound/<context_name>

      is changed to the following new directory path:

      <19c ORACLE_HOME/appsutil/outbound/<context_name>

      Note: The <context_name> variable in these directory paths refers to the name of the database context file, which stores Oracle E-Business Suite configuration variables. By default, the value of <context_name> is <SID_hostname>.

      For a source database that is a 12c multitenant database, you must specify the value of <context_name> as <SID_hostname> with the SID value in upper case.

      Note that in Oracle Database 12c on Oracle Cloud Infrastructure, the value of <context_name> is <SID_hostname> with tthe SID value in lower case, even though the PDB name is always in upper case. However, after an upgrade to Oracle Database 19c, the PDB name becomes case-sensitive. Consequently, in the 19c directory paths, the value of <context_name> is <SID_hostname> with the SID value in upper case.

    The script also stores the original values from the 11g or 12c UTL_FILE_DIR database initialization parameter as well as the 19c replacement values in a text file in the log directory. You can compare the log file with the <DB_NAME>_utlfiledir.txt file in the <ORACLE_HOME>/dbs directory to review the modifications made by the script.

  3. If the list of directories in the <DB_NAME>_utlfiledir.txt file still includes any symbolic links, edit the file to replace the symbolic links with physical directory paths. You can also make any further updates needed to reflect any changes in your system architecture.

    Note: The maximum length for the value of the supplemental UTL_FILE_DIR parameter is 4000 characters. Due to modifications in the directory paths for use in Oracle Database 19c, the UTL_FILE_DIR value prepared for Oracle Database 19c can become longer than the original value for the UTL_FILE_DIR parameter in Oracle Database 11g or 12c. Check the <DB_NAME>_utlfiledir.txt file to verify the length of the list of directory paths.

    If the list exceeds 4000 characters, review the directory paths in the list and consider deleting any directories that are no longer in use or removing duplicate directories. However, note that Oracle E-Business Suite product code or your custom code may refer to a directory path at a specific position within the UTL_FILE_DIR parameter value, such as by a SQL substr()instr(), or similar function. Before removing a directory, you should search your code and system documentation to ensure there are no references to that directory by position. Additionally, you should search for any references to all subsequent directories in the list, whose position would be affected if you remove a directory that precedes them.

    Alternatively you can consider restructuring the disk system to create shorter directory paths.

To store the directory path values in the database:

  1. Create the appropriate directory paths for your AD-TXK codelevel.

    If your environment is on R12.AD.C.Delta.14 and R12.TXK.C.Delta.14 or later, create the following directory paths:

    • <19c ORACLE_HOME>/../temp/<PDB NAME> - for both on-premises and Oracle Cloud instances
    • <19c ORACLE_HOME>/appsutil/outbound/<context_name> - for both on-premises and Oracle Cloud instances

    If your environment is on R12.AD.C.Delta.13 and R12.TXK.C.Delta.13 or earlier, create the following directory paths:

    • <19c ORACLE_HOME>/../temp/<PDB NAME> - for on-premises instances
    • <19c ORACLE_HOME>/temp/<PDB NAME> - for instances on Oracle Cloud
    • <19c ORACLE_HOME>/appsutil/outbound/<context_name> - for both on-premises and Oracle Cloud instances

    Note: After an upgrade to Oracle Database 19c on Oracle Cloud Infrastructure, the PDB name becomes case-sensitive. Consequently, when you create the directory path <19c ORACLE_HOME>/appsutil/outbound/<context_name> for the Oracle E-Business Suite database context file, you must specify the value of <context_name> as <SID_hostname> where SID is the same value and case as the PDB name.

  2. Source the Oracle E-Business Suite database environment of your 11g or 12c Oracle home.

    $ . $ORACLE_HOME/<sid>_<hostname>.env
  3. Run the txkCfgUtlfileDir.pl script in setUtlFileDir mode using the following command:

    $ perl $ORACLE_HOME/appsutil/bin/txkCfgUtlfileDir.pl -contextfile=<DB Context File> \
    -oraclehome=<11g/12c ORACLE_HOME> -outdir=<Output/Log location> \
    -upgradedhome=<19c ORACLE_HOME> -mode=setUtlFileDir -servicetype=onpremise|opc [ -skipdirvalidation=Yes
     ]

    When prompted, 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.

    With this command, the script reads the <ORACLE_HOME>/dbs/<DB_NAME>_utlfiledir.txt file that you created previously and validates the physical directory paths listed in that file. If you are creating your Oracle Database 19c instance on a different server and cannot validate the 19c Oracle home directory, then you should pass the -skipdirvalidation=Yes parameter in the txkCfgUtlfileDir.pl script command. The -servicetype parameter defaults to -servicetype=onpremise, but when running on Oracle Cloud, you must specify -servicetype=opc for this parameter.

    After validating the directory paths, the script stores the paths for the supplemental UTL_FILE_DIR parameter in the new Oracle E-Business Suite tables underlying the apps.v$parameter and apps.v$parameter2 views.

    The txkCfgUtlfileDir.pl script also creates a directory object for each physical directory path. Note that the script creates only one directory object for each directory path; it does not create duplicate directory objects, even if a directory path appears more than once in the <DB_NAME>_utlfiledir.txt file. The first directory object that is generated is named EBS_DB_DIR_UTIL. The script uses the following naming convention for all subsequent directory objects:  EBS_UTL_FILE_DIR_<random_number>

    Note: If you encounter the following warning message:

    WARNING: Incorrect value s_applptmp detected on Apps Tier nodes. Please check log for details.

    then you can proceed with the database upgrade. However, you should update the value of the s_applptmp AutoConfig parameter in the Applications context file before running AutoConfig on the application tier.

  4. You should now perform any remaining steps to complete the database upgrade as described in the relevant document for your upgrade:

    • Interoperability Notes: Oracle E-Business Suite Release 12.2 with Oracle Database 19cDocument 2552181.1

    • Using Oracle 19c RAC Multitenant (Single PDB) with Oracle E-Business Suite Release 12.2Document 2530665.1

    • Interoperability Notes: Oracle E-Business Suite Release 12.1 with Oracle Database 19cDocument 2580629.1

    • Using Oracle 19c RAC Multitenant (Single PDB) with Oracle E-Business Suite Release 12.1Document 2530680.1

    Note: Another script that you run after the database upgrade, named txkPostPDBCreationTasks.pl, will set the values of the s_ecx_log_dir and s_bis_debug_log_dir context variables to the <19c Oracle Base>/temp/<PDB NAME> directory. This script will also create the apps.v$parameter and apps.v$parameter2 views and migrate them to the pluggable database in the 19c Oracle home. Additionally, the txkPostPDBCreationTasks.pl script will create the database context file and run AutoConfig on the database tier.

    AutoConfig will check the values of the s_db_util_filedirs_ecx_log_dirs_bis_debug_log_dir, and s_outbound_dir context variables to validate that they are set to valid directory paths and that corresponding directory objects have been created for the specified directories. You should ensure that the directory paths pointed to by the s_db_util_filedirs_ecx_log_dirs_bis_debug_log_dir, and s_outbound_dir context variables exist on the respective database tier node.

    If you use an Oracle RAC database, ensure that all the directories specified in the supplemental UTL_FILE_DIR parameter are accessible from all the nodes in the cluster.

3.1.2: Updating UTL_FILE_DIR in an Oracle E-Business Suite Instance on Oracle Database 19c

After the database upgrade, 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.

Note: If your Oracle E-Business Suite instance is on Oracle Database 19c and your product-specific documentation instructs you to define a database directory for PL/SQL file I/O, use the procedures in this section to do so, unless other steps are specified for your product.

 

Note: If you are already running Oracle Database 19c on Oracle Cloud and you have just applied the AD-TXK Delta 14 Release Update Packs, follow the steps in this section to modify your UTL_FILE_DIR directory paths to use the <19c ORACLE_HOME>/../temp/<PDB NAME> directory path. This modification is required to comply with an important architectural change that was introduced with AD-TXK Delta 14.

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
  2. 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.

  3. 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
  4. 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.

  5. 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>

  6. 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 6 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.

  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 -servicetype=onpremise|opc

    With this command, the script creates a text file named <PDBNAME>_utlfiledir.txt in the <ORACLE_HOME>/dbs directory.

  2. 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.

  3. 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

    When prompted, 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.

    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.

  4. 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 4 to run the txkCfgUtlfileDir.pl script in syncUtlFileDir mode on each database node.

 

Note: Changes to the supplemental UTL_FILE_DIR parameter in Oracle Database 19c take effect immediately. You do not need to restart the database.

3.2: Referencing a Physical Directory Path Without Using UTL_FILE_DIR

With Oracle E-Business Suite on Oracle Database 19c, calls to the UTL_FILE package can specify the location for file I/O as a directory path, but the directory must also have a corresponding directory object within the database. You should specify a physical directory path, not a symbolic link.

If you want to reference a directory for PL/SQL file I/O in custom code without using the supplemental UTL_FILE_DIR parameter and the txkCfgUtlfileDir.pl script, then you must create the corresponding directory object manually.

Note: Only a privileged database administrator should perform these steps.

  1. Create the physical directory path and make the directory write-enabled.

  2. Source the PDB environment file using the following command:

    $ . $ORACLE_HOME/<pdb_name>_<hostname>.env
  3. Log in and create a directory object for the new directory.

    • If your environment is on R12.AD.C.Delta.13 or later, log in as the EBS_SYSTEM user.

    • If your environmenet is on R12.AD.C.Delta.12 or earlier, log in as the SYSTEM user.

    Then create a directory object for the new directory path using the following commands:

    SQL>create or replace directory <Directory Object Name> as <Physical Directory Path>;

    SQL>grant read,write on directory <Directory Object Name> to APPS;

    Specify the directory object name in all uppercase.

    For more information, see CREATE DIRECTORYOracle Database SQL Language Reference 19c.

Note: Do not use this method for referencing a directory in the value of an Oracle E-Business Suite profile option. For compatibility with Oracle E-Business Suite product code, when you set a directory path as the value of a profile option, ensure that the directory has been defined in the supplemental UTL_FILE_DIR parameter as described in Section 3.1.2: Updating UTL_FILE_DIR in an Oracle E-Business Suite Instance on Oracle Database 19c.

3.3: Creating Database Directory Objects

With Oracle E-Business Suite on Oracle Database 19c, calls to the UTL_FILE package can specify the location for file I/O as a directory object. If you want to reference a directory object for PL/SQL file I/O in custom code, then you do not need include it in the supplemental UTL_FILE_DIR parameter, but you can use the txkCfgUtlfileDir.pl script to create the directory object.

To create a directory object, source the PDB environment file and then run the txkCfgUtlfileDir.pl script in createDirObject 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=createDirObject -servicetype=onpremise|opc

When prompted, 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.

Note: Do not use this method for referencing a directory in the value of an Oracle E-Business Suite profile option. For compatibility with Oracle E-Business Suite product code, when you set a directory path as the value of a profile option, ensure that the directory has been defined in the supplemental UTL_FILE_DIR parameter as described in Section 3.1.2: Updating UTL_FILE_DIR in an Oracle E-Business Suite Instance on Oracle Database 19c.

3.4: Specifying PL/SQL File I/O Directories in Profile Options

Several profile options in Oracle E-Business Suite store the locations of directories used for PL/SQL file I/O. When you set the value of such a profile option, first ensure that the directory has been defined in the supplemental UTL_FILE_DIR parameter as described in Section 3.1.2: Updating UTL_FILE_DIR in an Oracle E-Business Suite Instance on Oracle Database 19c. Then set the profile option value to the directory path exactly as the path is listed in UTL_FILE_DIR. For more details about profile options used by Oracle E-Business Suite applications, see your product-specific documentation.

Note: For compatibility with Oracle E-Business Suite product code, do not set the value of an Oracle E-Business Suite product profile option to a directory object or to a directory path that is not defined in the supplemental UTL_FILE_DIR parameter.

3.5: Setting the APPLPTMP Variable

PL/SQL concurrent programs as well as other application tier programs in Oracle E-Business Suite create temporary files such as log and output files that are written to the directory specified by the APPLPTMP environment variable. This directory must also be defined in the supplemental UTL_FILE_DIR parameter.

To set the value of the APPLPTMP variable:

  1. Create the new physical directory path. The path should not be a symbolic link.

  2. Add the directory path in the supplemental UTL_FILE_DIR parameter as described in Section 3.1.2: Updating UTL_FILE_DIR in an Oracle E-Business Suite Instance on Oracle Database 19c.

  3. Use Oracle Applications Manager to set the value of the s_applptmp AutoConfig parameter in the Applications context file to the new directory path.

  4. Run AutoConfig on the application tier to recreate the environment files.

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

3.6: Including PL/SQL File I/O Processing in Custom Code

With Oracle E-Business Suite on Oracle Database 19c, when you use a UTL_FILE function that requires you to provide a directory location for the file, you can specify the location as a directory object. Alternatively, you can specify a physical directory path, which must also have a corresponding directory object within the database. You can choose to add the directory path to the supplemental UTL_FILE_DIR parameter using the txkCfgUtlfileDir.pl script. In this case, the txkCfgUtlfileDir.pl script automatically creates the directory object. If you reference a directory path without using UTL_FILE_DIR, then you must create the corresponding directory object manually.

  • For detailed information on the UTL_FILE package, see UTL_FILEOracle Database PL/SQL Packages and Types Reference 19c.

  • For detailed information on directory objects, see CREATE DIRECTORYOracle Database SQL Language Reference 19c.

3.6.1: Reviewing Existing Usage of Database Directories in Custom Code after Upgrading to Oracle Database 19c

When you upgrade to Oracle Database 19c, you migrate the directories that were previously specified in the UTL_FILE_DIR database initialization parameter to the new supplemental UTL_FILE_DIR parameter. Any existing custom code that uses UTL_FILE functions and relies on UTL_FILE_DIR for the directory location should continue to operate in the same way as before the upgrade, now referencing the new supplemental parameter.

Note: If you had existing custom code that queried the UTL_FILE_DIR database initialization parameter before you upgraded to Oracle Database 19c, then you should update the query to ensure that you are accessing the new supplemental UTL_FILE_DIR parameter through the new views in the APPS schema. See Section 3.6.5: Querying the Supplemental UTL_FILE_DIR Parameter Value.

You can optionally review your existing custom code after the upgrade to determine whether you can benefit by referencing directory objects instead of physical directory paths. For example, you may want to do the following:

  • Take advantage of the more granular access privileges that you can define for directory objects.

  • Remove directory paths from the UTL_FILE_DIR value to shorten the value if it is close to the 4,000 character limit.

To review your code, search for cases where you use UTL_FILE functions that accept a directory location directly in a parameter. You should search for the following functions:

  • UTL_FILE.FCOPY
  • UTL_FILE.FGETATTR
  • UTL_FILE.FOPEN
  • UTL_FILE.FOPEN_NCHAR
  • UTL_FILE.FREMOVE
  • UTL_FILE.FRENAME

Note: Other UTL_FILE functions reference a file's location indirectly through the file handle returned by the UTL_FILE.FOPEN function. You do not need to consider these functions in your review.

Types of code that may instantiate a UTL_FILE function parameter with a directory location include the following:

  • Literal values

  • Declarative absolute values

  • Environment variables

  • Assignments to variables from queries

  • Assignments to variables using cursors

  • Program parameters

  • Oracle E-Business Suite profile options

3.6.2: Developing New Custom Code for Oracle E-Business Suite on Oracle Database 19c

It is recommended that you use directory objects for any new programs, scripts, and modules that you develop after you upgrade to Oracle Database 19c.

3.6.3: Using Directory Objects in UTL_FILE Functions

If you choose to reference a directory object in a UTL_FILE function in your new or existing custom code, you can create the directory object by running the txkCfgUtlfileDir.pl script in createDirObject mode. See Section 3.3: Creating Database Directory Objects.

For information on creating directory objects manually, see CREATE DIRECTORYOracle Database SQL Language Reference 19c.

When you create directory objects for use with Oracle E-Business Suite, the following best practices are recommended:

  • Use uppercase for the directory object name. If a directory object name is in mixed case or lowercase, you must enclose the name in double quotation marks when specifying the name. For ease of reference, and to avoid potential confusion between directory objects whose names differ only by case, it is recommended that you always use all uppercase for directory object names.

  • Use a custom product code as a prefix in the directory object name so that you can easily identify the directory objects that belong to your custom application. For example: <PRODUCT_CODE>_<DIRECTORY_OBJECT_NAME>

  • For security purposes, create directory objects as the EBS_SYSTEM user if your environment is on R12.AD.C.Delta.13 or later, or as the SYSTEM user if your environment is on R12.AD.C.Delta.12 or earlier. The EBS_SYSTEM or SYSTEM user should then grant read and write privileges on the directory object to the APPS user. If you need to grant privileges to another user within your custom code, grant only the least necessary access.

  • Avoid using the database Oracle home directory or its subdirectories for PL/SQL file I/O. Additionally, avoid using a temporary or common directory to which many users have access.

3.6.4: Using Directory Paths in UTL_FILE Functions

If you reference a physical directory path in a UTL_FILE function, that directory must also have a corresponding directory object within the database.

3.6.5: Querying the Supplemental UTL_FILE_DIR Parameter Value

If you use the supplemental UTL_FILE_DIR parameter to specify directories for PL/SQL file I/O, you may need to query the value of that parameter. To do so, your custom code should select the value from either the apps.v$parameter view or the apps.v$parameter2 view, and the user performing the query should have permission to use that view.

If you had existing custom code that queried the UTL_FILE_DIR parameter from the standard v$parameter or v$parameter2 views in the SYS schema before you upgraded to Oracle Database 19c, then you should update the query to select from apps.v$parameter or apps.v$parameter2, respectively, to ensure that you are accessing the new supplemental UTL_FILE_DIR parameter through the new views in the APPS schema.

For example, if your code included the following query:

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

then you should update the query as follows:

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

If your code queried the UTL_FILE_DIR parameter through another view such as v$system_parameter, then it is recommended that you change the reference to either apps.v$parameter or apps.v$parameter2 instead.

Comments

Popular posts from this blog

12c: emctl start agent Fails or Hangs or Timeout or Connection Refused