ORA-12840: 在并行/插入直接加载 txn 之后无法访问远程表

在通过跨库同义词CAST导数据测试时,报ORA-12840: cannot access a remote table after parallel/insert direct load txn错误:

SQL> alter table dcustCREDITbalance_new nologging;

Table altered.

Elapsed: 00:00:00.09
SQL> insert /*+ append */ into dcustCREDITbalance_new select * from dcustCREDITbalance;

1742678 rows created.

Elapsed: 00:00:19.12
SQL> /
insert /*+ append */ into dcustCREDITbalance_new select * from dcustCREDITbalance
*
ERROR at line 1:
ORA-12840: cannot access a remote table after parallel/insert direct load txn


Elapsed: 00:00:00.02

经查询,为并行/插入直接加载导致,以上为/*+ append */ 引起,解决办法:rollback或者commit

12840, 00000, "cannot access a remote table after parallel/insert direct load txn"
// *Cause: Within a transaction, an attempt was made to perform. distributed
// access after a PDML or insert direct statement had been issued.
// *Action: Commit/rollback the PDML transaction first, and then perform.
// the distributed access, or perform. the distributed access before the
// first PDML statement in the transaction.

commit提交一下就正常了:

SQL> commit;

Commit complete.

Elapsed: 00:00:00.04


SQL> insert /*+ append */ into dcustCREDITbalance_new select * from dcustCREDITbalance
2 ;

1742678 rows created.

Elapsed: 00:00:18.95

再次insert append,统计表中记录时又出现新的错误:ORA-12838: cannot read/modify an object after modifying it in parallel

SQL> select count(*) from dcustCREDITbalance_new;
select count(*) from dcustCREDITbalance_new
*
ERROR at line 1:
ORA-12838: cannot read/modify an object after modifying it in parallel


Elapsed: 00:00:00.01

12838, 00000, "cannot read/modify an object after modifying it in parallel"
// *Cause: Within the same transaction, an attempt was made to add read or
// modification statements on a table after it had been modified in parallel
// or with direct load. This is not permitted.
// *Action: Rewrite the transaction, or break it up into two transactions:
// one containing the initial modification and the second containing the
// parallel modification operation.

我直接再commit提交,恢复正常
SQL> commit;

Commit complete.

Elapsed: 00:00:00.02
SQL> select count(*) from dcustCREDITbalance_new;

COUNT(*)
----------
10456068

Elapsed: 00:00:09.50
SQL> insert /*+ append */ into dcustCREDITbalance_new select * from dcustCREDITbalance;

1742678 rows created.

Elapsed: 00:00:18.21

  • 1
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
根据您提供的错误信息"ORA-01017: invalid username/password; logon denied",这是Oracle数据库登录验证失败的错误。这种错误通常是由于输入的用户名或密码不正确导致的。 要解决这个问题,您可以按照以下步骤进行操作: 1. 首先,确认您输入的用户名和密码是否正确。请确保用户名和密码的大小写正确,并且没有多余的空格或特殊字符。您可以尝试重新输入用户名和密码,确保没有输入错误。 2. 如果您确定用户名和密码是正确的,那么可能是由于数据库账户被锁定或过期导致的登录失败。您可以尝试联系数据库管理员,确认账户是否被锁定或过期,并请求管理员解锁或重置密码。 3. 另外,还有可能是由于网络连接问题导致的登录失败。请确保您的网络连接正常,并且可以正常连接到数据库服务器。如果您使用的是远程连接,请确保网络连接稳定,并且可以访问到数据库服务器。 总结一下,要解决"ORA-01017: invalid username/password; logon denied"错误,您可以按照以下步骤进行操作:确认用户名和密码是否正确、联系数据库管理员解锁或重置密码、确保网络连接正常。希望对您有所帮助。 :ORA-01017: invalid username/password; logon denied Oracle数据库报错解决方案一-附件资源 :人工智能AI:Keras PyTorch MXNet TensorFlow PaddlePaddle 深度学习实战(不定时更新)

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值