Home » SQL & PL/SQL » SQL & PL/SQL » DML Error logging
DML Error logging [message #259495] Wed, 15 August 2007 14:03 Go to next message
Messages: 24969
Registered: January 2009
Location: SoCal
Senior Member
Yesterday I attended a conference sponsored by Oracle where Tom Kyte gave two presentations.
I learned about a new feature in V10.2 that I previously did not know about.
Below is now legal SQL.
INTO sales SELECT product_id, customer_id, TRUNC(sales_date), 3,
   promotion_id, quantity, amount
FROM sales_activity_direct
LOG ERRORS INTO sales_activity_errors('load_20040802') REJECT LIMIT UNLIMITED

The last line will insert into "sales_activity_errors" the records which failed
& it will report why that particular record failed to INSERT.
DBMS_ERRLOG is a new procedure that creates the error logging table used by the LOG ERRORS INTO clause.
This approach should only be used when less than 1% of the records fail.
Re: DML Error logging [message #259498 is a reply to message #259495] Wed, 15 August 2007 14:13 Go to previous messageGo to next message
Messages: 1027
Registered: October 2006
Location: United Kingdom
Senior Member
Thanks for sharing.
Re: DML Error logging [message #259500 is a reply to message #259495] Wed, 15 August 2007 14:18 Go to previous message
Michel Cadot
Messages: 63937
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
It is true for all DML statements.


Previous Topic: Using avg in a sub query
Next Topic: Partition index analyze
Goto Forum:

Current Time: Thu Oct 27 15:42:20 CDT 2016

Total time taken to generate the page: 0.12047 seconds