Home » SQL & PL/SQL » SQL & PL/SQL » ORA-04020: deadlock detected while trying to lock object (oracle 11.2.0.1.0 linux)
ORA-04020: deadlock detected while trying to lock object [message #557053] Fri, 08 June 2012 08:22 Go to next message
nehhaverma
Messages: 34
Registered: September 2009
Location: JAIPUR
Member
Hi

I am trying to fetch data from a table but it takes time and give such an error:

SQL> Select * from adm_users;
Select * from adm_users
*
ERROR at line 1:
ORA-04020: deadlock detected while trying to lock object
SCOTT.BIN$wTG5asChpIHgQKjAZGRwSQ==$0
ORA-06512: at line 23
ORA-06512: at line 23
ORA-06512: at line 23
ORA-06512: at line 23
ORA-06512: at line 23
ORA-06512: at line 23

Please help.
Re: ORA-04020: deadlock detected while trying to lock object [message #557054 is a reply to message #557053] Fri, 08 June 2012 08:30 Go to previous messageGo to next message
Michel Cadot
Messages: 68767
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator
And? What do you expect from us.
It is obvious your "table" is either a synonym or a view.
Check.

Regards
Michel
Re: ORA-04020: deadlock detected while trying to lock object [message #557056 is a reply to message #557054] Fri, 08 June 2012 08:35 Go to previous messageGo to next message
Michel Cadot
Messages: 68767
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator
And stop to post your SQL question in the Linux forum which is for "Oracle Installation, Configuration, Troubleshooting and Scripting on Linux Platforms". This has nothing specific to Linux.
And feedback to people that tried to help you (see your previous topics how many end with an answer from others when it should end with a thank from you).

And also:

Michel Cadot wrote on Fri, 17 February 2012 13:51
...
Please read OraFAQ Forum Guide and How to use [code] tags and make your code easier to read.
Make sure that lines of code do not exceed 80 characters when you format.
Indent the code, use code tags and align the columns in result.
Use the "Preview Message" button to verify.
...


Regards
Michel

[Updated on: Fri, 08 June 2012 08:37]

Report message to a moderator

Re: ORA-04020: deadlock detected while trying to lock object [message #557061 is a reply to message #557054] Fri, 08 June 2012 09:37 Go to previous messageGo to next message
nehhaverma
Messages: 34
Registered: September 2009
Location: JAIPUR
Member
Yes
I tried to drop or create or replace those synonyms but got the same error.

SQL> drop synonym spt.adm_users;

drop synonym spt.adm_users

*

ERROR at line 1:

ORA-00604: error occurred at recursive SQL level 1

ORA-04020: deadlock detected while trying to lock object SCOTT.BIN$wTG5asChpIHgQKjAZGRwSQ==$0

ORA-06512: at line 23

ORA-06512: at line 23

ORA-06512: at line 23

ORA-06512: at line 23

ORA-06512: at line 23

ORA-06512: at line 23

Thanks &
Regards//Neha
Re: ORA-04020: deadlock detected while trying to lock object [message #557062 is a reply to message #557061] Fri, 08 June 2012 09:39 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
Please read and follow the forum guidelines, to enable us to help you:

http://www.orafaq.com/forum/t/88153/0/


http://www.oracle.com/pls/db112/search?remark=quick_search&word=purge+recyclebin
Re: ORA-04020: deadlock detected while trying to lock object [message #557063 is a reply to message #557062] Fri, 08 June 2012 09:59 Go to previous messageGo to next message
nehhaverma
Messages: 34
Registered: September 2009
Location: JAIPUR
Member
Hello

Sorry for irrelevance but I am not getting where I made a mistake on this forum. It is now posted on sql & pl/sql also.

I read your link and purge table SCOTT.BIN$wTG5asChpIHgQKjAZGRwSQ==$0 but it gives error sql command not properly ended.
Also I purge recycle bin but error still exist.
What step I should follow?

Regards//Neha
Re: ORA-04020: deadlock detected while trying to lock object [message #557064 is a reply to message #557063] Fri, 08 June 2012 10:04 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
I don't know which USER you are.
I don't know what you have.
I don't know what you do.
I don't know what you see.
It is really, Really, REALLY difficult to fix a problem that can not be seen.
use COPY & PASTE so we can see what you do & how Oracle responds.

If you have the SYSDBA privilege, then you can purge the entire recycle bin by specifying DBA_RECYCLEBIN, instead of RECYCLEBIN in the previous statement.
Re: ORA-04020: deadlock detected while trying to lock object [message #557067 is a reply to message #557061] Fri, 08 June 2012 10:32 Go to previous messageGo to next message
Michel Cadot
Messages: 68767
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator
Connect as sysdba and execute
purge dba_recyclebin;


Regards
Michel
Re: ORA-04020: deadlock detected while trying to lock object [message #557130 is a reply to message #557067] Sat, 09 June 2012 07:21 Go to previous message
nehhaverma
Messages: 34
Registered: September 2009
Location: JAIPUR
Member
Hello

Thanks, It works.
I use above command 'purge dba_recyclebin;' and select required table now it shows desired output.

Regards//Neha
Previous Topic: how to modify column data
Next Topic: Need sql querry for this logic
Goto Forum:
  


Current Time: Sun Aug 31 07:44:56 CDT 2025