Press "Enter" to skip to content

How to Create Directory in Oracle?

In Oracle, a directory object corresponds to a directory on the database server’s filesystem. The CREATE DIRECTORY command is used to create a directory object in Oracle, and you must have a CREATE ANY DIRECTORY privilege. The following are the examples.

Examples For Creating a Directory in Oracle

In Windows:

CREATE OR REPLACE DIRECTORY CSV_FILES AS 'C:\MY_CSV_FILES';

In Linux:

CREATE OR REPLACE DIRECTORY CSV_FILES AS '/user1/my_csv_files';

Create Directory Using Toad

Follow these steps to create a directory in Oracle using Toad

  1. Click on the menu Database > Create > Directory.
  2. Then Create Directory window will appear.
  3. Specify directory name in the Directory Name field.
  4. Specify the path in the Directory Path field, or you can browse directly there (if you are creating a directory on the server).
  5. Then click on OK to create the directory.

Create Directory Using Oracle SQL Developer

Follow these steps to create a directory using Oracle SQL Developer

  1. Navigate to the Connections navigator, open the schema node.
  2. Locate Directories node and do the right click.
  3. Click on the Create Directory option in the shortcut menu.
  4. Then Create Directory window will appear.
  5. Specify the directory name in the Directory Name field.
  6. Specify the path in the Directory Path field.
  7. Then click on the Apply button to create the directory.

See also: