Oracle 11g 记录DML错误数据
[From] https://oracle-base.com/articles/10g/dml-error-logging-10gr2
需要记录下大量DML操作中出错的具体record,看到有两种方案,一种是使用批量DML操作bulk collect并带上save exceptions子句,然后做处理。稍微繁琐,不想使用。于是用另一种方案,就是在DML语句后面跟上LOG ERRORS。
LOG ERRORS [INTO [schema.]table] [('simple_expression')] [REJECT LIMIT integer|UNLIMITED]
The optional INTO clause allows you to specify the name of the error logging table. If you omit this clause, the the first 25 characters of the base table name are used along with the "ERR$_" prefix.
The simple_expression is used to specify a tag that makes the errors easier to identify. This might be a string or any function whose result is 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 is the keyword UNLIMITED. For parallel DML operations, the reject limit is applied to each parallel server.
其中,这个错误记录表需要先创建,可以使用包 exec DBMS_ERRLOG.CREATE_ERROR_LOG('target_table'); 来创建。第一个参数就是需要被记录DML操作的目标表。如果不附加参数,则默认会创建表名为ERR&_target_table的表。之后就可以使用LOG ERRORS了,使用默认表名时,log errors 后面可以不需要into。
Oracle 11g 记录DML错误数据的更多相关文章
- Oracle 11g使用DML Error Logging来避免bulk insert故障
当使用带有子查询的insert语句来加载数据时如果出现错误.系统会终止该语句并回滚整个操作.这是非常消耗时间和资源的操作.如果insert这样的语句可以使用DML Error Logging功能来避免 ...
- DBMS_ERRLOG记录DML错误日志(一)
当一个DML运行的时候,如果遇到了错误,则这条语句会整个回滚,就好像没有执行过.不过对于一个大的DML而言,如果个别数据错误而导致整个语句的回滚,会浪费很多的资源和运行时间,从10g开始Oracle支 ...
- oracle 11g 下载安装 使用记录
Oracle 11g 使用记录 1.下载oracle快捷安装版: (1)下载连接:https://pan.baidu.com/s/1ClC0hQepmTw2lSJ2ODtL7g 无提取码 (2)去 ...
- Oracle 11g 单实例静默安装实战记录(linux)
oracle 11g 单实例静默安装 AUTHOR:Oracle_Ran 环境规划: OS Version : Red Hat Enterprise Linux Server release 6.7 ...
- Oracle 11g新特性
文章转自网络 Oracle 11g于2007年7月11日美国东部时间11时(北京时间11日22时)正式发布,11g是甲骨文公司30年来发布的最重要的数据库版本,根据用户的需求实现了信息生命周期管理(I ...
- ORACLE 11G R2 RAC classical install OGG12.1(LINUX) 经典抽取模式单项同步配置OGG12.1
博文结构图如下: 一.环境描述以及注意事项 1.1 环境简介 IP 系统 Oracle版本 OGG版本 源端 172.16.10.16/36 RHEL6.5 oracle11204 12.1 目标端 ...
- Oracle 11g 物理Dataguard日常操作维护(二)
Oracle 11g 物理Dataguard日常操作维护(二) 2017年8月25日 14:34 3.3 3.3.1 查看备库进程状态 SYS(125_7)@fpyj123> select pr ...
- Oracle 11g 物理存储结构
Oracle 系统的物理存储结构比较具体和直观,它用来描述 Oracle 数据在磁盘上的物理组成情况.Oracle 系统的数据在逻辑上存储在表空间中,而在物理上存储在表空间所包含的物理文件(即数据文件 ...
- oracle 11g 数据库恢复技术 ---03 补充日志
三 补充日志(supplemental logging) 补充日志是对重做记录中变更矢量的补充信息,增加了变更矢量记载的记录量.Oracle某些功能要求启用补充日志才能正常或更好的工作,比如logmi ...
随机推荐
- GridView删除行
在GridView绑定数据的时候需要设置该GridView的主键值,设置的这个主键与取出来的数据的一个字段对应.比如,取出来的数据表中有个ID的字段,那设这个ID为该GridView的主键是比较好的. ...
- Servlet入门第一天
1. 使用 JavaEE 版的 Eclipse 开发动态的 WEB 工程(JavaWEB 项目) 1). 把开发选项切换到 JavaEE 2). 可以在 Window -> Show View ...
- CSS3 grayscale滤镜图片变黑白
1. 使整个页面的图片都变成灰色的,代码如下. html{ font-size: 100%; -webkit-text-size-adjust: none; -ms-text-s ...
- What is difference between 3-layer architecture and MVC architecture?
By Vikas Singh on Sep 26, 2014 In 3-layer architecture 3-layer architecture separates the applicati ...
- Java IO输入输出流 FileWriter 字符流
字节缓冲流 //为什么要使用包装流,使用包装流是为了提高读写操作的性能. public class Packing_flowDemo { public static void main(String[ ...
- javaweb分页
package com.aishang.util; //分页 public class Pagemethod { public static int[] getPageArray(int selInd ...
- Castle Windsor
让我们从Web API的集成点开始,它们是IDependencyResolver和IDependencyScope接口.IDependencyResolver和其他接口的名称可能与MVC中的接口相同, ...
- angular Docheck
import { Component, OnInit, Input, OnChanges, SimpleChanges, DoCheck } from '@angular/core'; @Compon ...
- p2p_server
以太坊系列之十九 对p2p模块server的理解 type transport interface { // The two handshakes. doEncHandshake(prv *ecdsa ...
- Node简单服务器开发
运用的知识:http,fs,get,post 接口定义:/user?act=reg$user=aaa&pass=bbb后台返回格式:{"ok":false,"ms ...