Skip to Main Content

Suppress DML Errors with LOG ERRORS

Resources

  • #SELECTION#
    #ICON_HTML#
  • #SELECTION#
    #ICON_HTML#

    DBMS_ERRLOG

    The DBMS_ERRLOG package provides a procedure that enables you to create an error logging table so that DML operations can continue after encountering errors rather than abort and roll back. This enables you to save time and system resources.
    #MISC#
    #ACTIONS#
  • #SELECTION#
    #ICON_HTML#

    Use LOG ERRORS to suppress SQL errors at the row level.

    The impact of a non-query DML statement is usually "all or nothing". If my update statement identifies 100 rows to change, then either all 100 rows are changed or none are. And none might be the outcome if, say, an error occurs on just one of the rows (value too large to fit in column, NULL value for non-NULL column, etc.). But if you have a situation in which you would really like to "preserve" as many of those row-level changes as possible, you can add the LOG ERRORS clause to your DML statement. Then, if any row changes raise an error, that information is written to your error log table, and processing continues. IMPORTANT: if you use LOG ERRORS, you must must must check that error log table immediately after the DML statement completes. You should also enhance the default error log table. Related blog post: http://stevenfeuersteinonplsql.blogspot.com/2016/03/nine-good-to-knows-about-plsql-error.html
    #MISC#
    #ACTIONS#

Featured Speakers

Workshop Info

Session Has Completed - 06 November 2018
1 Hour
English
Oracle PL/SQL

Hidden Translations

Join
Share
Register
English
Unregister
Outline
Objectives
Resources
06 November 2018
Session Has Completed - 06 November 2018
You Are A Speaker/Panelist
1 Hour
Pending
Prerequisites
Waitlisted
Rejected
Question And Answer
Register And Join
Add To Calendar
Registration Status
Series Name
Session Time
Log In To Register
You Are Registered. You Will Be Able To Join The Session 15 Minutes Before It Starts.
You Are Signed Up for the Lab
Sign Up for Lab
Remove Lab Sign Up