来源:
select local_tran_id,
nvl(global_oracle_id, global_tran_fmt||'.'||global_foreign_id),
state, decode(status,'D','yes','no'), heuristic_dflt, tran_comment,
fail_time, heuristic_time, reco_time,
top_os_user, top_os_terminal, top_os_host, top_db_user, global_commit#
from sys.pending_trans$
sqlplus "/as sysdba"
set feedback off
set serveroutput off
set pagesize 0
set linesize 500
spool ss
select LOCAL_TRAN_ID from dba_2pc_pending;
spool off
!
cat ss.lst |awk '{printf "sqlplus \"/as sysdba\"
sh ttt
1、查找
select GLOBAL_TRAN_ID from DBA_2PC_PENDING;
2、强制提交或回滚
ROLLBACK FORCE '&GLOBAL_TRAN_ID';
commit froce &GLOBAL_TRAN_ID';
如:
rollback