Home

UTL_FILE_DIR initialization parameter is desupported from the DBMS_LOGMNR_D package

Description

    Starting from Oracle Database 18c, the UTL_FILE_DIR initialization parameter is desupported. As a result, using UTL_FILE_DIR with DBMS_LOGMNR_D.BUILD or any similar procedures will result in runtime errors.

    Oracle recommends using secure DIRECTORY objects instead of UTL_FILE_DIR for specifying file locations. This ensures better security, maintainability, and compliance with modern database practices.

    Update your code by replacing references to UTL_FILE_DIR with an appropriate DIRECTORY object created via CREATE DIRECTORY command.

Key Benefits

  • Compliance: Ensures compatibility with Oracle 19c and future database versions.
  • Security: Reduces risks by controlling file access through Oracle Directory objects instead of open file system paths.
  • Maintainability: Improves the structure and security management of external file access.

 

Non-compliant Code Example

BEGIN
  -- Using UTL_FILE_DIR, which is desupported in Oracle 18c+
  DBMS_LOGMNR_D.BUILD(
    dictionary_filename => 'dict.ora',
    dictionary_location => 'UTL_FILE_DIR'           --Non compliant code (UTL_FILE_DIR desupported from DBMS_LOGMNR_D package)
  );
END;

Compliant Code Example

-- First, create a DIRECTORY object if not already existing
CREATE OR REPLACE DIRECTORY logmnr_dir AS '/u01/app/oracle/admin/orcl/adump';

-- Then use the directory object in the procedure
BEGIN
  DBMS_LOGMNR_D.BUILD(
    dictionary_filename => 'dict.ora',
    dictionary_location => 'LOGMNR_DIR'         --Compliant code
  );
END;
Visual Expert 2025
 VEPLSQLRULE214