cancel
Showing results for 
Search instead for 
Did you mean: 
Data Engineering
Join discussions on data engineering best practices, architectures, and optimization strategies within the Databricks Community. Exchange insights and solutions with fellow data engineers.
cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to DROP TABLE: "Lock wait timeout exceeded"

MarthinusBosma1
New Contributor II

We have a table where the underlying data has been dropped, and seemingly something else must have gone wrong as well, and we want to just get rid of the whole table and schema, but running "DROP TABLE schema.table" is throwing the following error:

org.apache.hadoop.hive.ql.metadata.HiveException: MetaException(message:org.datanucleus.exceptions.NucleusDataStoreException: Update of object "org.apache.hadoop.hive.metastore.model.MStorageDescriptor@955c52" using statement "UPDATE SDS SET CD_ID=? WHERE SD_ID=?" failed : java.sql.SQLTransientConnectionException: (conn=64550) Lock wait timeout exceeded; try restarting transaction

I have used the script mentioned in this conversation, but that leads to a similar error:

HiveException: MetaException(message:org.datanucleus.exceptions.NucleusDataStoreException: Update of object "org.apache.hadoop.hive.metastore.model.MStorageDescriptor@5396216a" using statement "UPDATE SDS SET CD_ID=? WHERE SD_ID=?" failed : java.sql.SQLTransientConnectionException: (conn=64632) Lock wait timeout exceeded; try restarting transaction

Any search for this error only brings up MySQL topics. Is there anything I can do to force-drop the table? 

3 REPLIES 3

Lakshay
Databricks Employee
Databricks Employee

The table needs to be dropped from the backend. If you can raise a ticket, support team can do it for you. 

This is running on a private Azure Databricks subscription. So I'm not sure who "support" is in that case?

I think it should be Microsoft but probably you can check within your organization.

Connect with Databricks Users in Your Area

Join a Regional User Group to connect with local Databricks users. Events will be happening in your city, and you won’t want to miss the chance to attend and share knowledge.

If there isn’t a group near you, start one and help create a community that brings people together.

Request a New Group