#!/bin/bash
. /home/oracle/.bash_profile
sqlplus -S / as sysdba < test1.sql
set heading off pagesize 0 echo off linesize 200 feedback off trimspool on
select 'rollback force ''' || LOCAL_TRAN_ID || ''';' || chr(10) || 'execute DBMS_TRANSACTION.PURGE_LOST_DB_ENTRY(''' || LOCAL_TRAN_
ID || ''');' || chr(10) || 'commit;' from DBA_2PC_PENDING;
exit;
EOF


2012-12-17_125552.jpg