The CREATE DIRECTORY command in Oracle SQL is used to create a directory object for data base-centric processes to write to.

This allows a system administrator to create a directory object (or alias) for use within the Application, insulating the user from knowledge of the directory structure.

You will then need to grant the appropriate access to the directory for the data base users

For example,

if the directory on the data base server is D:\Payroll\Output In SQL as the SYS user:

CREATE OR REPLACE DIRECTORY PR_OUTPUT AS 'D:\Payroll\Output';
GRANT ALL ON DIRECTORY PR_OUTPUT TO P2K WITH GRANT OPTION;

and then in the launch screen of the you would enter PR_OUTPUT as the directory name.

The directory name in the CREATE command must be unique across the entire data base, but you may have as many of these as you wish. The path name (contained within quotes) must be a full path and not use an system logical variables or symbols. The existence of the directory is not validated until the directory alias is referenced by the data base for a write or read operation.


Notes #

Click to create a new notes page