近日,我们有个环境在数据加载到oracle的时候出现ora-39782异常,版本是11.2。经google,几乎没有什么先例,因为我们是使用oci直接写的,可见现在还使用oci接口并不多,也或者我们的库比较奇葩。

ORA-39780: Direct path context operations are not allowed after the context is aborted or finished
Cause: The specified direct path context was aborted or finished.
Action: Do not pass a direct path context that has ended to any direct path functions.
ORA-39781: Direct path stream loads are not allowed after another context loading the same table has ended
Cause: Attempt to load a stream in one context after another loading the same table has ended.
Action: Close all contexts before trying to create another that loads the same table as a previous context in the same session.
ORA-39782: Direct path prepare is not allowed after another context loading the same table has ended
Cause: Direct path prepare called after a context loading the same table has ended. --初步看,跟direct load有关,可能是sqlldr也可能是append模式,这底层应该都是oci调用,前者确定,后者??。
Action: Close all contexts before trying to create another that loads the same table as a previous context in the same session.
ORA-39783: Invalid direct path transaction active
Cause: Direct path operations were not performed in the transaction started by the first OCIDirPathPrepare call.
Action: Ensure the correct transaction is active prior to calling Direct Path API operations.
ORA-39784: This direct path operation is not allowed while another is in progress
Cause: Another direct path operation was active.
Action: Complete any direct path operations in progress before attempting this operation.

使用sqlldr并发加载表,如下:

[oracle@hs-test-10-20-30-17 sqlldr_test]$ sh sqlldr_append_parallel_direct_test.sh 

SQL*Loader: Release 11.2.0.4.0 - Production on Mon Aug 6 16:14:18 2018

Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.

SQL*Loader-951: Error calling once/load initialization
ORA-00604: error occurred at recursive SQL level 1
ORA-00054: resource busy and acquire with NOWAIT specified or timeout expired

一边append、一边sqlldr,也是上述错误,说明问题不在并发上。

进一步分析了ora-39782上下几个错误,尤其是ora-39783,推测应该是第一个OCIDirPathPrepare调用加载了表之后,又去调用了一次导致这个异常。将问题反馈给了库开发者,等待解决。

参考:

https://docs.oracle.com/cd/E11882_01/server.112/e17766/e38001.htm

direct加载之ora-39782一例的更多相关文章

  1. 用TWaver加载大型游戏场景一例

    游戏中经常会出现一些大型的户外场景,例如一个小镇.一座古城等.通常这种场景中包含了较多的建筑.道路.桥梁等等元素,其3D模型比较大且复杂.在使用TWaver加载时,可使用一些技巧,让加载速度更快.显示 ...

  2. 如何使用 require.js ,实现js文件的异步加载,避免网页失去响应,管理模块之间的依赖性,便于代码的编写和维护。

    一.为什么要用require.js? 最早的时候,所有Javascript代码都写在一个文件里面,只要加载这一个文件就够了.后来,代码越来越多,一个文件不够了,必须分成多个文件,依次加载.下面的网页代 ...

  3. require.js按需加载使用简介

    一.为什么要用require.js? 最早的时候,所有Javascript代码都写在一个文件里面,只要加载这一个文件就够了.后来,代码越来越多,一个文件不够了,必须分成多个文件,依次加载.下面的网页代 ...

  4. 【Web】移动端下拉刷新、上拉加载更多插件

    移动网站中常常有的功能:列表的下拉刷新.上拉加载更多 本例介绍一种简单使用的移动端下拉刷新.上拉加载更多插件,下载及参考地址:https://github.com/ximan/dropload 插件依 ...

  5. 【Spring源码分析系列】bean的加载

    前言 以 BeanFactory bf  = new XmlBeanFactory(new ClassPathResource("beans.xml"));为例查看bean的加载过 ...

  6. Spring IOC - 控制反转(依赖注入) - 懒加载机制

    懒加载机制 Spring默认会在容器初始化的过程中,解析xml,并将单例的bean创建并保存到map中,这样的机制在bean比较少的时间问题不大,但一旦bean非常多时,Spring需要在启动的过程中 ...

  7. 如何实现加载DOM时执行js代码

    有一些功能需求,需要在DOM载入时马上执行一些函数,但又不愿意仅为了这一个需求而引入整个JQuery库,于是就把jQuery的方法提取出来,单独使用了. 大家可以使用windows.onload事件, ...

  8. require.js模块化管理和加载js(按需加载)简单实例教学

    一.为什么要用require.js? 最早的时候,所有Javascript代码都写在一个文件里面,只要加载这一个文件就够了.后来,代码越来越多,一个文件不够了,必须分成多个文件,依次加载.下面的网页代 ...

  9. maven 手动加载第三方jar、zip包

    使用maven搭建工程时,难免要加载大量的第三方的jar包.zip包比较少用,而maven的官网提供的jar往往不能满足需求,这时需要我们手动加载到我们本地或nexus私服的仓库中. 1.加载jar包 ...

随机推荐

  1. React对比Vue(06 路由的对比)

    其实差不多, 都需要先安装路由 React  先安装 cnpm install react-router-dom --save 在再根组件引入 import { BrowserRouter as Ro ...

  2. 巧用CurrentThread.Name来统一标识日志记录(完结篇)

    ▄︻┻┳═一Agenda: ▄︻┻┳═一巧用CurrentThread.Name来统一标识日志记录 ▄︻┻┳═一巧用CurrentThread.Name来统一标识日志记录(续) ▄︻┻┳═一巧用Cur ...

  3. HttpContext.Current.Items的用途

    HTTP是一个无状态的协议.每次的请求都是独立的,它的执行情况和结果与前面的请求和之后的请求是无直接关系的,它不会受前面的请求应答情况直接影响,也不会直接影响后面的请求应答情况.而实际上,我们的系统往 ...

  4. AIX挂载NFS写入效率低效解决

    背景: Linux是NFS的Server端,AIX是NFS的Client端(此外,有一个Linux也作为Client端对比测试). 1.NFS对应的底层设备是闪存卡,本地测试I/O写性能可达2GB/s ...

  5. 读书笔记_Effective_C++_条款三:尽可能使用const

    const是常量的意思,它可以定义一个不可改变的量,主要用于以下几个地方: 1. 修饰变量,使之不可改变 举个例子: const int var = 3; 此时var的值就不能改变了.也正是因为con ...

  6. LA 4992 Jungle Outpost(半平面交)

    Jungle Outpost [题目链接]Jungle Outpost [题目类型]半平面交 &题解: 蓝书282 我自己写的代码居然AC了!!! 刘汝佳的说要right要-3什么的,还要特判 ...

  7. SQL中的关联更新和关联删除

    在SQL中,经常用到关联查询,比如select a.* from A a inner join B b on a.PId=b.FId where 条件,SQL中也支持类似的关联更新和关联删除. 关联更 ...

  8. uva11990 动态逆序对

    这题说的是给了一个数组,按照他给的顺序依次删除数,在删除之前输出此时的逆序对个数 我们用Fenwick树 维护这整个数列, C[i]是一个 treap的头, 管理了在树状数组中 能影响他的点,然后我们 ...

  9. cookie中存取中文

  10. Python - 2. Built-in Collection Data Types

    From: http://interactivepython.org/courselib/static/pythonds/Introduction/GettingStartedwithData.htm ...