AQ: XOP12083212969:Failed during processing,
check the log. SQLCode: ORA-00001: unique constraint (OPS$CMS.X2_XOP_FAILED_ORDERS)
Above is the error which i am getting in my package, so i want to search in my package, where exactly the problem is, so kindly tell me what are all the ways to identify the exact statement in the package or procedure, its affected..
if you are executing your packaged procedure from sqlplus or other IDE for pl/sql, you can set serverouput on and put the below line in exception block to get exact line number from which the exception is raised. If not you may have to device some strategy to log this. You can also scan your code to find insert/update on the table which has this unique constraint and reason for the failure.
Thank you friend,. And i want to see my error after adding the dbms output in all the exception in the package.. i have to make the package in anonymous block right.. or give me some idea to find it out..plz
just add that line in the exception block from which you got your previous error message but this line should be the first line in exception block. After this call your packaged procedure as you were already testing it, but make sure you execute set serveroutput on / alternate if you are using a tool. The line causing the problem will be printed along with error message.
I searched by using SELECT * FROM USER_CONSTRAINTS WHERE CONSTRAINT_NAME='X2_XOP_FAILED_ORDERS';
SELECT * FROM USER_CONS_COLUMNS WHERE CONSTRAINT_NAME='X2_XOP_FAILED_ORDERS';
friend but i could nt see the item in the tble, there is no item belongs to the constraint.
Please help me out.
Select owner, constraint_name, constraint_type, table_name, index_name from all_constraints
Now we can see the table_name on which we have the constraint.