DROP TABLE Command Produces Multiple Locks

Are producing multiple locks in a database (lots of sessions locked), it seems that is doing a drop table, and this is causing locking. The session is killed and the lock is released. After a few minutes it throws and locks reoccurrence.

From the session that launches the DROP TABLE command gives the following error ;

 

ERROR at line 1:
ORA-04020: deadlock detected while trying to lock object CLOUD.ELEMENTS

 

This is not the table is trying to erase, investigating the table has FKs to other tables, such as above. FKs associated to the table are deleted and proceeds to drop the table without problems, is a table that does not use nobody.

 

Conclusions;

  • This type of DML operations and generally in large environments, must be performed at period of low activity.
  • Remove the constraints to and from the table to be erased.
  •  The locks on the dictionary are critical and very sensitive, if possible try avoid it.

 

HTH – Antonio NAVARRO

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s