Oracle 11g records DML error data

Source: Internet
Author: User

[From] Https://oracle-base.com/articles/10g/dml-error-logging-10gr2

You need to record a specific record of errors in a large number of DML operations, and see that there are two scenarios, one of which is to use the bulk DML operation Bulk collect with the SAVE exceptions clause and then do the processing. A little cumbersome, do not want to use. Another option, then, is to keep the log ERRORS behind the DML statement.

LOG ERRORS [into [schema.] Table] [(' simple_expression ')] [REJECT LIMIT integer| Unlimited]the Optional INTO clause allows your to specify the name of the error logging table. IF you omit this clause, the first characters of the base table name is used along with the "Err$_" prefix. The simple_expression is used to specify a tag, makes the errors easier to identify. This might was a string or any function whose result was converted to a string. The REJECT LIMIT is used to specify the maximum number of errors before the statement fails. The default value is 0 and the maximum values are the keyword UNLIMITED. For parallel DML operations, the reject limit was applied to each parallel server.

Where this error logging table needs to be created first, you can use the package exec dbms_errlog. Create_error_log (' target_table '); To create. The first parameter is the target table that needs to be logged for DML operations. If no parameters are attached, a table named Err&_target_table is created by default. After that, you can use log errors, and with the default table name, you don't need into after log errors.

Oracle 11g records DML error data

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.