This content has been marked as final. Show 7 replies
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.
which user are you connected as ? seems the constraint is in "OPS$CMS"
Yes correct user: OPS$CMS only i am getting error .
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.