direct加载之ora-39782一例

近日,我们有个环境在数据加载到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

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值