CREATE/DROP DIRECTORY
CREATE [OR REPLACE] DIRECTORY directory_name AS 'path_name'

Creates a directory object that specifies an operating system directory for storing BFILE objects.

DROP DIRECTORY directory_name

Removes a directory object from the database.

Keywords

OR REPLACE

Specifies that this directory object should replace any existing directory object with the same name.

directory_name

Name of the directory object.

path_name

The operating system directory's full case-sensitive pathname.

Oracle does not check to see if the directory actually exists on the host operating system, so be sure to check the path you provide carefully.

Examples

Create a directory object graphic_home on the host disk storage system that an Oracle application will use for storing graphical images:

CREATE DIRECTORY graphic_home AS '/disk13/data/graphics';

Remove the directory object graphic_home:

DROP DIRECTORY graphic_home;

Get Oracle SQL: the Essential Reference now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.