Home » SQL & PL/SQL » SQL & PL/SQL » DEADLOCK FOUND (oracle 10g,w7)
DEADLOCK FOUND [message #572041] Wed, 05 December 2012 08:49 Go to next message
oracle_doubt
Messages: 96
Registered: December 2012
Location: CHENNAI
Member
Hi all,
While i am trying to execute below mentioned query i am facing "DEADLOCK FOUND WHEN TRYING TO GET LOCK"
error.Please help me to solve this issue..

UPDATE PLAN
SET PLAN_PMS_BLOCK_ID =''
WHERE PLAN_PMS_BLOCK_ID<>''
AND PLAN_PMS_BLOCK_ID NOT BETWEEN '0' AND '9'
AND PLAN_PMS_BLOCK_ID NOT BETWEEN 'A' AND 'Z'
AND PLAN_PMS_BLOCK_ID NOT IN('-')
AND LENGTH(PLAN_PMS_BLOCK_ID )=1;

Re: DEADLOCK FOUND [message #572044 is a reply to message #572041] Wed, 05 December 2012 08:54 Go to previous messageGo to next message
BlackSwan
Messages: 23159
Registered: January 2009
Senior Member
Please read and follow the forum guidelines, to enable us to help you:

http://www.orafaq.com/forum/t/88153/0/
Re: DEADLOCK FOUND [message #572047 is a reply to message #572044] Wed, 05 December 2012 09:10 Go to previous messageGo to next message
cookiemonster
Messages: 11285
Registered: September 2008
Location: Rainy Manchester
Senior Member
1) That's not an oracle error message, you need to post the full oracle error message.
2) That update wont update anything.
This will never be true:
WHERE PLAN_PMS_BLOCK_ID<>''


'' is the same as null. Nothing is not equal to null.
Re: DEADLOCK FOUND [message #572083 is a reply to message #572047] Thu, 06 December 2012 00:41 Go to previous messageGo to next message
oracle_doubt
Messages: 96
Registered: December 2012
Location: CHENNAI
Member
Hi,
Thank you for your reply.That is MySql query.That query is running successfully at most.But sometimes it is showing dead lock error message.I am not able to find the issue.Please do needfull.Query is correct only.
Re: DEADLOCK FOUND [message #572084 is a reply to message #572083] Thu, 06 December 2012 00:43 Go to previous messageGo to next message
oracle_doubt
Messages: 96
Registered: December 2012
Location: CHENNAI
Member
Here i am trying to remove junk values.That holds 1 byte length.
Re: DEADLOCK FOUND [message #572085 is a reply to message #572084] Thu, 06 December 2012 01:06 Go to previous messageGo to next message
Michel Cadot
Messages: 60013
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Assuming PLAN_PMS_BLOCK_ID is of VARCHAR2 data type, the correct statement is:
UPDATE PLAN
SET PLAN_PMS_BLOCK_ID = null
WHERE PLAN_PMS_BLOCK_ID is not null
AND PLAN_PMS_BLOCK_ID NOT BETWEEN '0' AND '9'
AND PLAN_PMS_BLOCK_ID NOT BETWEEN 'A' AND 'Z'
AND PLAN_PMS_BLOCK_ID NOT IN('-')
AND LENGTH(PLAN_PMS_BLOCK_ID )=1;


The error you have comes from the tool you use and not from Oracle.

Regards
Michel
Re: DEADLOCK FOUND [message #572099 is a reply to message #572085] Thu, 06 December 2012 01:36 Go to previous messageGo to next message
oracle_doubt
Messages: 96
Registered: December 2012
Location: CHENNAI
Member
Hi michel,
I need to update that field as empty('').So only i have used that update.So query is not a problem.Because that is running properly as per our expectation at most of the times.But sometimes it is giving such kind of error.So Please do needfull.\
Re: DEADLOCK FOUND [message #572105 is a reply to message #572099] Thu, 06 December 2012 02:00 Go to previous message
Michel Cadot
Messages: 60013
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
As I said:

Quote:
The error you have comes from the tool you use and not from Oracle.


Regards
Michel
Previous Topic: Access programatically a record (%rowtype)
Next Topic: Restriction on Analytical functions
Goto Forum:
  


Current Time: Mon Dec 22 00:44:16 CST 2014

Total time taken to generate the page: 0.06979 seconds