ORA-00001: unique constraint (.) violated [message #56565] |
Tue, 08 April 2003 22:13 |
Satya
Messages: 36 Registered: January 2001
|
Member |
|
|
The application uses JDBC Oracle Thin driver. The app connects to Oracle Server - 9i Rel 2 and inserts a row in a table. Ora9i has a database link ro 8i Rel4. A sequence on 8i is generated and used to insert into 2 tables in 8i.
ie.
insert into 9i table
generate seq. on 8i
insert into 8i table 1
insert into 8i table 2.
I am getting the error
"ORA-00001: unique constraint (.) violated" immediately after sequence generation sql stmt is parsed. I am not sure, if the sequence is generated or not.
I am surprized to see the error message without constraint name. How to identify the problem?
--
Satya
|
|
|
|
Re: ORA-00001: unique constraint (.) violated [message #56575 is a reply to message #56573] |
Wed, 09 April 2003 04:24 |
Satya
Messages: 36 Registered: January 2001
|
Member |
|
|
I have enabled session level trace on 9i. I am getting following sql stmts in trace.
trace looks like this....
--------------------
--seq is a remote sequence on 8i with driving site as 9i
select seq.nextval into var1 from dual ;
---
---first stmt in exception handler.....
select sid,serial# into vsid, vserial from .........
-----------------
Now, in tracefile, immediately after sequence creation exception handler is called. Does this mean, sequence succesfully generated? or error has occurred in sequence generation. Note that 2nd stmt in above partial trace is 1st sql stmt in exception handler.
Are there some internal mechanism in Oracle where actual problemis located?
Note: I am getting this problem only in PROD. not repeated in any other environment.
|
|
|