Insert Hangs [message #625495] |
Thu, 09 October 2014 04:04 |
|
nnr420
Messages: 14 Registered: September 2014
|
Junior Member |
|
|
Hello All,
I do an insert in a table tab1 which has 2 unique keys
unique key 1 : col1, col2, col3
unique key 2 : col1, col2, col3, col4
Insert into tab1 (col1, col2, col3, col4) values (1,2,3,4);
first time it gave me an error ORA-02049
The application rolled back
Now if I re execute the query it hangs! there is no error message!
I thought there is a lock in the table row but there is no lock.
select a.sid, a.serial#,sql_id ,(case LOCKED_MODE when 0 then 'none'
when 1 then 'null'
when 2 then 'row-S'
when 3 then 'row-x'
when 4 then 'share'
when 5 then 'S/Row-X'
when 6 then 'exclusive'
end ) LOCKED_MODE
from v$session a, v$locked_object b, dba_objects c
where b.object_id = c.object_id
and a.sid = b.session_id;
Any body has an idea what this is waiting for. Where can I find this?
Please help me....
I have posted this in development forum also cas I don't know in which categorie to add.
Sorry for my english...
Dan.
Edited by Lalit : Added code tags
[Updated on: Thu, 09 October 2014 04:35] by Moderator Report message to a moderator
|
|
|
Re: Insert Hangs [message #625497 is a reply to message #625495] |
Thu, 09 October 2014 04:36 |
Lalit Kumar B
Messages: 3174 Registered: May 2013 Location: World Wide on the Web
|
Senior Member |
|
|
Welcome to the forum!
Please read and follow the OraFAQ Forum Guide and How to use [code] tags, to enable us to help you.
Your query after formatting looks like this :
SELECT a.sid,
a.serial#,
sql_id,
( CASE locked_mode
WHEN 0 THEN 'none'
WHEN 1 THEN 'null'
WHEN 2 THEN 'row-S'
WHEN 3 THEN 'row-x'
WHEN 4 THEN 'share'
WHEN 5 THEN 'S/Row-X'
WHEN 6 THEN 'exclusive'
END ) LOCKED_MODE
FROM v$session a,
v$locked_object b,
dba_objects c
WHERE b.object_id = c.object_id
AND a.sid = b.session_id;
|
|
|
|
Re: Insert Hangs [message #625499 is a reply to message #625495] |
Thu, 09 October 2014 04:48 |
Lalit Kumar B
Messages: 3174 Registered: May 2013 Location: World Wide on the Web
|
Senior Member |
|
|
nnr420 wrote on Thu, 09 October 2014 14:34
first time it gave me an error ORA-02049
The application rolled back
Now if I re execute the query it hangs! there is no error message!
The error you got first time is ORA-02049: timeout: distributed transaction waiting for lock
Check My Oracle support for OERR: ORA 2049 "timeout: distributed transaction waiting for lock" (Doc ID 19332.1)
|
|
|
|
|
|
|
|
|
Re: Insert Hangs [message #625528 is a reply to message #625527] |
Thu, 09 October 2014 10:04 |
cookiemonster
Messages: 13920 Registered: September 2008 Location: Rainy Manchester
|
Senior Member |
|
|
Actually you can get a distributed transaction with a single DB and a connection pool. Something about the pool set up can lead the DB to think the client session is interacting with more than one DB. Don't ask me what set up mind, we never got to the bottom of it.
|
|
|
|
|
Re: Insert Hangs [message #625532 is a reply to message #625531] |
Thu, 09 October 2014 10:23 |
|
nnr420
Messages: 14 Registered: September 2014
|
Junior Member |
|
|
Michel:
insert into FIL_INFO(COMP,MONT,FILNO,ARTICLE,INFOTYP,KEYTT) values ('88','4','1510635','HEADER','KFC','TEST JM') ;
This is what you want to see!!
|
|
|
|
|
|
|
|
|
|
|
|
|
|