ORA-16123: transaction string string string is waiting for commit approval ORACLE 报错 故障修复 远程处理
文档解释
ORA-16123: transaction string string string is waiting for commit approval
Cause: The apply process is waiting for approval to commit a transaction. This transaction may depend on another or other synchronization activity may delay the committing of a transaction.
Action: No action necessary, this informational statement is provided to record the event for diagnostic purposes.
ORA-16123 错误表示有一个显式的事务需要提交前的确认。这在执行跨多个表的复杂操作时可能会发生,例如从一个数据库表移动大量数据到另一个数据库表中。
官方解释
ORA-16123 表示发出方正请求提交一个显式事务,但该事务太复杂,超出系统能处理的范围,需要 DBA 预先确认,即该事务安全可以提交。
常见案例
常见的发生案例是在执行更新数据的操作时,事务太复杂,涉及多张表,超出系统能处理的范围,这时需要 DBA 预先确认,才能够将其提交。
一般处理方法及步骤
1.确认是哪个用户提交了此事务,使用下面的语句:
select session_id, serial#, distinct client_process, username from v$session;
2.将查询结果里username 为此用户,会话 ID (session_id) 及序列 (serial#) 锁住:
alter system kill session ‘session_id, serial#’;
3.将此用户的锁解开:
alter system unlock session ‘session_id, serial#’
4.使用授权的启用和禁用功能,让用户可以提交事务:
alter user user_name identified by 设置密码; grant select, update, delete, insert on table_name to user_name; grant commit to user_name;
5.用户提交事务后,再禁用该用户的权限:
revoke select, update, delete, insert on table_name from user_name; revoke commit from user_name; alter user user_name identified by 空;