Note
This statement is supported starting from V4.3.5 BP2.
Purpose
This statement is used to drop an external data catalog.
Limitations and considerations
- The Internal Catalog (
INTERNAL) cannot be deleted. - Unlike MySQL-compatible mode, the
DROP CATALOGstatement in Oracle-compatible mode does not support theIF EXISTSclause. If the catalog to be dropped does not exist, an error will be returned with the error code-11080and the error messageCatalog 'xxx' doesn't exist. - Catalog names are case-insensitive. Catalog names that are not enclosed in double quotation marks will be uniformly converted to uppercase for matching.
- After a catalog is dropped, the
USE CATALOGobject privilege of other users on that catalog is also revoked.
Privilege requirements
To execute the DROP CATALOG statement, the current user must have the CREATE CATALOG system privilege. For more information about OceanBase Database privileges, see Privilege types in Oracle-compatible mode.
Syntax
DROP CATALOG external_catalog_name
Parameters
Parameter |
Description |
|---|---|
| external_catalog_name | The name of the external data directory to be deleted. It is case-insensitive. If not enclosed in double quotes, it is uniformly converted to uppercase for matching. |
Examples
Create and drop an External Catalog named tmp_catalog.
obclient> CREATE EXTERNAL CATALOG tmp_catalog PROPERTIES = (TYPE = 'JDBC', URL = 'jdbc:sqlserver://10.10.10.1:1433');
obclient> DROP CATALOG tmp_catalog;
If the catalog to be deleted does not exist, an error will be reported:
obclient> DROP CATALOG tmp_catalog;
The query result is as follows:
OBE-00600: internal error code, arguments: -11080, Catalog 'TMP_CATALOG' doesn't exist