To create directories use the database
CREATE DIRECTORY you specify the path as a relative path for the
CREATE DIRECTORY creates the
database directory object and also creates the file system directory if it does not already
exist. If the file system directory exists then
CREATE DIRECTORY only creates
the database directory object. For example, the following command creates the database
staging and creates the file system directory
CREATE DIRECTORY staging AS 'stage';
You can also create subdirectories. For example, the
following command creates the database directory object
the file system directory
CREATE DIRECTORY sales_staging AS 'stage/sales';
When you create subdirectories you do not have to create the initial file system directory.
For example, in the previous example if the directory
stage does not
exist then the
CREATE DIRECTORY command creates both directories
To add a directory, you must have the
ANY DIRECTORY system privilege. The ADMIN user is
CREATE ANY DIRECTORY
system privilege. The ADMIN user can grant
DIRECTORY system privilege to other
See CREATE DIRECTORY for more information.
CREATE DIRECTORYcreates the database directory object in the Autonomous Transaction Processing database and also creates the file system directory. For example the directory path could be:
You can create a directory in the root file system to see all the files with the following commands:
CREATE OR REPLACE DIRECTORY ROOT_DIR AS '';
After you create the
ROOT_DIRdirectory, use the following command to list all files:
SELECT * FROM DBMS_CLOUD.list_files('ROOT_DIR');
DBMS_CLOUD.LIST_FILESwith a user other than ADMIN you need to grant read privileges on the directory to that user. See LIST_FILES Function for more information.
Space in the file system allocated for the directories you create and their contents is part of your storage allocation. See Console Overview to view the total space allocated.