UTL_DIR module

The UTL_DIR module provides a set of routines for maintaining directory aliases that are used with the UTL_FILE module.

Note: The UTL_DIR module does not issue any direct operating system calls, for example, the mkdir or rmdir commands. Maintenance of the physical directories is outside the scope of this module.
The schema for this module is SYSIBMADM.
Note: In Db2 11.5.7 and later, the privileges that are needed on the UTL_DIR module to use a statement depend on the user's authority and how the statement is issued. If a statement is issued dynamically from a package with the DYNAMICRULES run behavior in effect, users with SYSADM authority have implicit EXECUTE privilege on the UTL_DIR module.

For the SYSTOOLS.DIRECTORIES table to be created successfully in the SYSTOOLSPACE table space, ensure that you have CREATETAB authority if you are running the UTL_DIR module for the first time.

The UTL_DIR module includes the following built-in routines.

Table 1. Built-in routines available in the UTL_DIR module
Routine name Description
CREATE_DIRECTORY procedure Creates a directory alias for the specified path.
CREATE_OR_REPLACE_DIRECTORY procedure Creates or replaces a directory alias for the specified path.
DROP_DIRECTORY procedure Drops the specified directory alias.
GET_DIRECTORY_PATH procedure Gets the corresponding path for the specified directory alias.