1. 首页
  2. IT资讯

rollback_dist_lock.sh 回滚分布式锁

#!/bin/bash
#Author:chipengfei#Date: 2013-02-23#Mail: chipengfei@7500.com.cn#Desc: rollback force the abnormal distribute locks#Usage: bash rollback_dist_lock.sh
. /home/oracle/.profile
sqlplus -S / as sysdba < roll.sqlset heading off pagesize 0 echo off linesize 200 feedback off trimspool onselect ‘rollback force ”’ || LOCAL_TRAN_ID || ”’;’ || chr(10) ||’execute DBMS_TRANSACTION.PURGE_LOST_DB_ENTRY(”’ || LOCAL_TRAN_ID|| ”’);’ || chr(10) || ‘commit;’ from DBA_2PC_PENDING;select ‘exit;’ from dual;exit;EOF
sqlplus -S / as sysdba @roll.sql

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/27042095/viewspace-754626/,如需转载,请注明出处,否则将追究法律责任。

主题测试文章,只做测试使用。发布者:布吉卡,转转请注明出处:http://www.cxybcw.com/196111.html

联系我们

13687733322

在线咨询:点击这里给我发消息

邮件:1877088071@qq.com

工作时间:周一至周五,9:30-18:30,节假日休息

QR code