473,657 Members | 2,489 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

deadlock situation

28 New Member
Hi,
I am updating same row of the Same Table in 2 diff session, i.e, for deadlock situation

In 1st session

declare
a number(5) := 123;
begin
update ba_bank_mast set COD_BANK=a;
end;
/

In 2nd Session

declare
a number(5) := 456;
Deadlock_detect ed Exception;
Pragma Exception_init( Deadlock_detect ed, -60);
begin
update ba_bank_mast set COD_BANK=a;
Exception
When Deadlock_detect ed then
dbms_output.put _line('DeadLOck Detected');
end;
/

i.e, I wanted to handle this deadlock in Exception Handler Section. But Whenever
I fire this in 2nd session, session hangs.
So What Others parameters to be checked or change in PL code.
Jul 2 '07 #1
1 1844
debasisdas
8,127 Recognized Expert Expert
in the code of second session as u try to execute the update part the session will get hanged becasue of deadlock situation.

so the control will not go inside the EXCEPTION block.
and the second session code will never execute fully.
Jul 2 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

1
6155
by: Steve Thorpe | last post by:
Hi I have a deadlock situation and I am trying to debug my Trace Log. How do I find out what is the cause ? I can see from the trace I have an exclusive lock on a RID, but how can I find out what/where 'RID: 7:1:431830:13 ' is ? Regards
11
2513
by: hendershot | last post by:
Using SQL Server 2000 SP3a, I run the following in 2 query analizer windows on the Northwind database, the second one always gets the deadlock Msg 1205: Window 1: declare @cnt int select @cnt = 5 while @cnt > 0 begin
7
9209
by: Andrew Mayo | last post by:
Here's a really weird one for any SQL Server gurus out there... We have observed (SQL Server 2000) scenarios where a stored procedure which (a) begins a transaction (b) inserts some rows into a table (c) re-queries another table using a subquery which references the inserted table (correlated or not)
1
2357
by: debian mojo | last post by:
Hello faculties, i'm encountering a strange a deadlock problem on my remote server which is used to give application demo to the client. It has happened that on one of the databases a deadlock situation is taking place. What is the most detailed way to detect such the cause of such a deadlock to the innermost level of detail, like what statements, stored procedures and locks are causing the deadlock to occur.
3
26454
by: Daniel Chou | last post by:
Hello, We are runnig DB2 on AIX and have DB2 deadlock problem. Is there any way or any tool to find out which SQL statements cause the deadlock? Thanks a lot.
8
9540
by: Javauser | last post by:
Hi there we are getting the following db2 error on executeBatch() method that inserts n rows on a table (where n is between 50 and 200). SQL0911N The current transaction has been rolled back because of a deadlock or timeout. Reason code "2". SQLSTATE=40001 errorCode : 911
8
2315
by: mk | last post by:
You probably suspect the answer, typically its 'yes' deadlock can occur in any multithreaded application. Even ones that employ static members. Commonly it occurs when more than one thread tries to lock a resource that another thread has already locked. A workaround is to use the Monitor object's TryEnter method, and pass a timeout value, if timeout occurs the method returns false. This pattern will save you no end of pain and...
13
2539
by: Jonathan Amsterdam | last post by:
I think there's a slight design flaw in the Queue class that makes it hard to avoid nested monitor deadlock. The problem is that the mutex used by the Queue is not easy to change. You can then easily get yourself into the following situation (nested monitor deadlock): Say we have a class that contains a Queue and some other things. The class's internals are protected by a mutex M. Initially the Queue is empty. The only access to the...
3
4044
by: ThunderMusic | last post by:
Hi, We have a web application developped in asp.net (I think it's not relevant, but well, it's so you know)... Yesterday, we received the following message "Transaction (Process ID 69) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. " The thing is, the query was a simple select with inner joins between 3 tables (like select fields from table1 inner join table2......
0
8823
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8726
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8503
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8603
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
4151
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4301
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2726
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1944
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1604
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.