Purpose
This statement is used to drop a directory object.
Privilege requirements
To execute the DROP DIRECTORY statement, the current user must have the DROP ANY DIRECTORY privilege. For more information about OceanBase Database privileges, see Privilege classification in Oracle mode.
Syntax
DROP DIRECTORY directory_name
Parameters
| Parameter | Description |
|---|---|
| directory_name | The name of the directory object to be dropped. Dropping a directory object does not remove the associated shared file system path from the system. |
Examples
The following example creates a directory object named 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 verify whether the directory object has been dropped:
obclient> SELECT * FROM DBA_DIRECTORIES WHERE DIRECTORY_NAME = 'SQL_FILE_DIR';
