kill rebuilt index

脚本内容
cnsz081302:cch > more cch_rebuild_index01.s*
::::::::::::::
cch_rebuild_index01.sh
::::::::::::::
cd $HOME/wc
sqlplus /nolog @$HOME/wc/cch_rebuild_index01.sql
::::::::::::::
cch_rebuild_index01.sql
::::::::::::::
conn / as sysdba
spool cch_rebuild_index01.log
set timing on
set time on
set echo on
alter index cchlogtmp.IDX_MAIN_INFO_T_SYSID_SMS_3 rebuild online parallel 8;
alter index cchlogtmp.IDX_MAIN_INFO_T_SYSID_SMS_3 noparallel;
spool off
exit
 
日志信息:
cnsz081302:cch > more nohup.out
 
SQL*Plus: Release 11.2.0.4.0 Production on Wed Nov 21 21:23:15 2018
 
Copyright (c) 1982, 2013, Oracle.  All rights reserved.
 
Connected.
21:23:15 sys@cch>alter index cchlogtmp.IDX_MAIN_INFO_T_SYSID_SMS_3 rebuild online parallel 8;
alter index cchlogtmp.IDX_MAIN_INFO_T_SYSID_SMS_3 rebuild online parallel 8
*
ERROR at line 1:
ORA-08104: this index object 837231 is being online built or rebuilt
 
 
Elapsed: 00:00:00.03
21:23:15 sys@cch>alter index cchlogtmp.IDX_MAIN_INFO_T_SYSID_SMS_3 noparallel;
alter index cchlogtmp.IDX_MAIN_INFO_T_SYSID_SMS_3 noparallel
*
ERROR at line 1:
ORA-08104: this index object 837231 is being online built or rebuilt
 
 
Elapsed: 00:00:00.01
21:23:15 sys@cch>spool off
21:23:15 sys@cch>exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Data Mining and Real Application Testing options
 
官方解释:
cnsz081302:cch > oerr ora 08104
08104, 00000, "this index object %s is being online built or rebuilt"
// *Cause:  the index is being created or rebuild or waited for recovering
//          from the online (re)build
// *Action: wait the online index build or recovery to complete
cnsz081302:cch >
 
 
清理方法:
declare
isClean boolean;
object_id binary_integer;
wait_for_lock binary_integer;
begin
object_id:=837231;
wait_for_lock:=null;
isClean := sys.dbms_repair.online_index_clean();
commit;
end;
/

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值