cancel
Showing results for 
Search instead for 
Did you mean: 
Data Engineering
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
Esteemed Contributor
Esteemed Contributor

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.

Welcome to Databricks Community: Lets learn, network and celebrate together

Join our fast-growing data practitioner and expert community of 80K+ members, ready to discover, help and collaborate together while making meaningful connections. 

Click here to register and join today! 

Engage in exciting technical discussions, join a group with your peers and meet our Featured Members.