DROP EXTERNAL DATABASE
Removes an external database from Hologres, deleting only the metadata mapping between Hologres and the external data source. Data in the external data source is not affected.
Prerequisites
Before you begin, ensure that you have:
Superuser permissions on the instance where the external database resides, or ownership permissions on the external database
Syntax
DROP EXTERNAL DATABASE [IF EXISTS] EXT_DB_NAME;Parameters
| Parameter | Description |
|---|---|
IF EXISTS | Optional. Suppresses an error if the specified external database does not exist. |
EXT_DB_NAME | The name of the external database to drop. |
Usage notes
Dropping an external database removes only the metadata mapping between Hologres and the external data source. No schemas or tables exist in external databases in Hologres, so no Hologres objects are deleted.
Data in the external data source (such as a data lakehouse) is not deleted.
To reconnect the external data source to Hologres, create the external database again. See CREATE EXTERNAL DATABASE.
Examples
Drop an external database mapped to Data Lake Formation (DLF):
DROP EXTERNAL DATABASE IF EXISTS EXT_DB_DLF;Drop an external database mapped to MaxCompute:
DROP EXTERNAL DATABASE IF EXISTS EXT_DB_MC;