近日,我们有个环境在数据加载到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. 4个项目带你学习ThinkPHP

    ThinkPHP是一个快速.兼容而且简单的轻量级国产PHP开发框架,这里分享4个项目教程,带你掌握ThinkPHP,并能够在实践开发中应用. ThinkPHP框架实践 这个教程从ThinkPHP的入门 ...

  2. CentOS6.5安装Elasticsearch5.3.0

    1. 首页到官方网站下载最新安装包 https://www.elastic.co/downloads/elasticsearch elasticsearch-5.3.0.tar.gz 2. 将软件包上 ...

  3. Oracle 10g使用amdu抽取数据文件

    环境:OEL 5.7 + Oracle 10.2.0.5 RAC 需求:实验在Oracle 10g环境使用amdu抽取数据库文件 本文主要目的是介绍3个知识点: 1.使amdu可以在oracle 10 ...

  4. 记录一则完整的SPA(10g->11g)测试过程

    生产端:Windows 2008 + Oracle 10.2.0.5 测试端:RHEL 6.5 + Oracle 11.2.0.4 需求:因为Oracle跨越大版本,优化器.新特性变动较多,需要进行S ...

  5. LeetCode28.实现strStr()

    实现 strStr() 函数. 给定一个 haystack 字符串和一个 needle 字符串,在 haystack 字符串中找出 needle 字符串出现的第一个位置 (从0开始).如果不存在,则返 ...

  6. 记在Archlinux中安装python的pymssql模块过程中遇到的问题

    为什么要安装这个模块?因为要连接SQLServer数据库. 看到可以使用pyodbc这个模块进行连接,但对odbc不熟悉,所以选用了看起来更简单的 pymssql. 直接执行: pip install ...

  7. 在caffe-ssd的环境搭建中遇到报错信息:Makefile:588: recipe for target '.build_release/cuda/src/caffe/layers/softmax_loss_layer.o' failed

    错误原因: 1.计算机没有安装GPU 2.有GPU但是NVCCFLAGS设置错误 解决方法: 1.对没有GPU的计算机,需要将Makefile中的CPU之前的#注释去掉,是的caffe运行的处理器进行 ...

  8. java中二维数组的复制克隆

    https://blog.csdn.net/qq_37232304/article/details/79950022

  9. QT5中QByteArray转QString中文乱码

    1.添加头文件 #include <QTextCodec> 2.用QTextCodec 设置格式转换 QByteArray barr; barr.insert(0,(char*)(pMsg ...

  10. [7] Windows内核情景分析---线程同步

    基于同步对象的等待.唤醒机制: 一个线程可以等待一个对象或多个对象而进入等待状态(也叫睡眠状态),另一个线程可以触发那个等待对象,唤醒在那个对象上等待的所有线程. 一个线程可以等待一个对象或多个对象, ...