Skip to content

Troubleshooting: Dropping an Ingestion Database

Issue

You need to drop a previous ingestion target database that is no longer in use — for example, after changing the ingestion target database in the Connector's Application Settings. The DROP DATABASE command fails because the database is owned by the Connector.

Background

When the Connector creates an ingestion target database, it takes ownership of the database so it can manage schemas, tables, and stages within it. Standard Snowflake roles cannot drop or alter a database owned by another role, including a Native App.

Resolution

A Snowflake account administrator can transfer ownership of the database away from the Connector and then drop it.

1. Transfer Ownership

Run the following SQL as ACCOUNTADMIN (or a role with MANAGE GRANTS privilege):

sql
GRANT OWNERSHIP ON DATABASE <DATABASE_NAME> TO ROLE ACCOUNTADMIN REVOKE CURRENT GRANTS;

Replace <DATABASE_NAME> with the name of the ingestion database you want to drop.

The REVOKE CURRENT GRANTS clause removes the Connector's privileges on the database. After this step, the Connector can no longer read from or write to this database.

2. Drop the Database

sql
DROP DATABASE <DATABASE_NAME>;

WARNING

After transferring ownership, any ingestion tasks that reference this database will fail because the Connector no longer has permission to manage it. Before transferring ownership, ensure that the Connector's ingestion target database has been changed to a different database in the Application Settings and that no active ingestion tasks depend on the old database.

© 2016-2026 Smart Data Hub Ltd.