Purpose
You can use this statement to drop a directory.
Privilege requirements
To execute the DROP DIRECTORY statement, the current user must have the DROP ANY DIRECTORY privilege. For more information about privileges in OceanBase Database, see Privilege types in Oracle mode.
Syntax
DROP DIRECTORY directory_name
Parameters
| Parameter | Description |
|---|---|
| directory_name | The name of the directory to be dropped. When you drop a directory, the associated shared file system directories will not be dropped from the database. |
Examples
The following example creates a path object sql_file_dir and then drops it:
obclient> CREATE DIRECTORY sql_file_dir AS '/home/admin/sql_files';
obclient> DROP DIRECTORY sql_file_dir;
You can query the DBA_DIRECTORIES view to check whether the path object has been dropped:
obclient> SELECT * FROM DBA_DIRECTORIES WHERE DIRECTORY_NAME = 'SQL_FILE_DIR';