标签云
asm恢复 bbed bootstrap$ dul kcbzib_kcrsds_1 kccpb_sanity_check_2 kcratr_nab_less_than_odr MySQL恢复 obet ORA-00312 ORA-00704 ORA-00742 ORA-01110 ORA-01200 ORA-01555 ORA-01578 ORA-01595 ORA-600 2662 ORA-600 2663 ORA-600 3020 ORA-600 4000 ORA-600 4137 ORA-600 4193 ORA-600 4194 ORA-600 16703 ORA-600 kcbzib_kcrsds_1 ORA-600 KCLCHKBLK_4 ORA-600 kcratr_nab_less_than_odr ORA-15042 ORA-15196 ORACLE 12C oracle dul ORACLE PATCH Oracle Recovery Tools oracle加密恢复 oracle勒索 oracle勒索恢复 oracle异常恢复 ORACLE恢复 Oracle 恢复 ORACLE数据库恢复 oracle碎片 OSD-04016 YOUR FILES ARE ENCRYPTED 比特币加密文章分类
- MongoDB (1)
- MongoDB恢复 (1)
- Others (2)
- 中间件 (2)
- WebLogic (2)
- 操作系统 (112)
- 数据库 (1,882)
- DB2 (22)
- MySQL (82)
- Oracle (1,707)
- Data Guard (53)
- EXADATA (8)
- GoldenGate (24)
- ORA-xxxxx (168)
- ORACLE 12C (72)
- ORACLE 18C (6)
- ORACLE 19C (15)
- ORACLE 21C (3)
- Oracle 23ai (8)
- Oracle ASM (72)
- Oracle Bug (8)
- Oracle RAC (56)
- Oracle 安全 (6)
- Oracle 开发 (28)
- Oracle 监听 (29)
- Oracle备份恢复 (661)
- Oracle安装升级 (108)
- Oracle性能优化 (62)
- 专题索引 (5)
- 勒索恢复 (91)
- PostgreSQL (37)
- pdu工具 (7)
- PostgreSQL恢复 (13)
- SQL Server (34)
- SQL Server恢复 (14)
- TimesTen (7)
- 达梦数据库 (5)
- 达梦恢复 (3)
- 生活娱乐 (2)
- 至理名言 (11)
- 虚拟化 (2)
- VMware (2)
- 软件开发 (51)
- Asp.Net (9)
- JavaScript (12)
- PHP (2)
- 小工具 (34)
- MongoDB (1)
-
最近发表
- 断电引起ORA-600 3005故障处理
- 记录一次云存储资源到期之后引起的数据库恢复
- Firebird 损坏数据库数据抢救工具—firebirdext
- Oracle 19c 202610补丁(RUs+OJVM)-19.33
- 由于con$.con#值达到极限,触发数据库增加约束报ORA-600 12807错误
- MongoDB 离线提取工具—mongoext
- .bres勒索病毒加密数据库dmp文件可恢复
- ORA-600 krsm_mrp_rebuild_lf_list.lno_mismatch
- 记录一次0丢失的ORA-00354: 损坏重做日志块标头故障恢复
- 不当数据库恢复操作导致一个月数据丢失
- obet快速修复oracle 位图损坏块
- 不太常见的10.2.0.1的oracle redo损坏恢复
- obet forcecopy功能抢救硬件故障中的数据文件
- kcratr_nab_less_than_odr和system坏块故障处理
- 通过obet 恢复system坏块,打开数据库
- obet dbv功能完整说明
- 分享一例运行在aix上的sap系统数据库恢复过程
- OBET-Oracle Block Editor Tool使用说明
- 几乎动用了所有手段的Oracle故障恢复
- Oracle Block Edit Tool (obet) 功能增强–2026.07
分类目录归档:Oracle
exp dmp文件损坏(坏块/corruption)恢复—跳过dmp坏块
在有些情况下,大家都知道通过dul可以恢复损坏的dmp文件的表的数据,但是该方法有很多问题,特别是对很多数据类型的支持不够完美,比如lob,long raw类型等,而且还有可能恢复出来数据大量丢失,本人通过对dmp结构的分析,使用使用一些特殊的技巧方法,可以实现对于损坏的dmp文件,通过跳过异常坏块所在表,继续恢复后续表,从而最大程度减少损坏
创建测试表
SQL> conn xifenfei/"www.xifenfei.com"
Connected.
SQL> create table t_xifenfei1 as select * from dba_objects;
Table created.
SQL> create table t_xifenfei2 as select * from v$sql;
Table created.
SQL> create table t_xifenfei3 as select * from dba_tables;
Table created.
SQL> select * from tab;
TNAME TABTYPE CLUSTERID
------------------------------ ------- ----------
T_XIFENFEI1 TABLE
T_XIFENFEI2 TABLE
T_XIFENFEI3 TABLE
SQL> select count(*) from t_xifenfei1;
COUNT(*)
----------
86275
SQL> select count(*) from t_xifenfei2;
COUNT(*)
----------
3387
SQL> select count(*) from t_xifenfei3;
COUNT(*)
----------
2800
导出来dmp文件
[oracle@web103 ~]$ exp "'/ as sysdba'" owner=xifenfei file=/data/temp/t_xifenfei.dmp log=/data/temp/exp_t_xifenfei.log Export: Release 11.2.0.4.0 - Production on Tue Aug 18 22:08:30 2015 Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved. Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production With the Partitioning, OLAP, Data Mining and Real Application Testing options Export done in ZHS16GBK character set and AL16UTF16 NCHAR character set About to export specified users ... . exporting pre-schema procedural objects and actions . exporting foreign function library names for user XIFENFEI . exporting PUBLIC type synonyms . exporting private type synonyms . exporting object type definitions for user XIFENFEI About to export XIFENFEI's objects ... . exporting database links . exporting sequence numbers . exporting cluster definitions . about to export XIFENFEI's tables via Conventional Path ... . . exporting table T_XIFENFEI1 86275 rows exported . . exporting table T_XIFENFEI2 3387 rows exported . . exporting table T_XIFENFEI3 2800 rows exported . exporting synonyms . exporting views . exporting stored procedures . exporting operators . exporting referential integrity constraints . exporting triggers . exporting indextypes . exporting bitmap, functional and extensible indexes . exporting posttables actions . exporting materialized views . exporting snapshot logs . exporting job queues . exporting refresh groups and children . exporting dimensions . exporting post-schema procedural objects and actions . exporting statistics Export terminated successfully without warnings.
获取dmp file中的T_XIFENFEI2所在位置
计划在该表上通过dd进行破坏,因此需要事先知道该表所在的dmp文件位置范围
CPFL> SEARCH TABLE T_XIFENFEI2 FROM EXPFILE /tmp/t_xifenfei.dmp 9980561: TABLE "T_XIFENFEI2" 9980581: CREATE TABLE "T_XIFENFEI2" (表定义忽略) 9985356: BIND information for 87 columns col[ 1] type 1 max length 1000 cset 852 (ZHS16GBK) form 1 col[ 2] type 112 max length 86 cset 852 (ZHS16GBK) form 1 col[ 3] type 1 max length 13 cset 852 (ZHS16GBK) form 1 col[ 4] type 2 max length 22 col[ 5] type 2 max length 22 col[ 6] type 2 max length 22 col[ 7] type 2 max length 22 col[ 8] type 2 max length 22 col[ 9] type 2 max length 22 col[ 10] type 2 max length 22 col[ 11] type 2 max length 22 col[ 12] type 2 max length 22 col[ 13] type 2 max length 22 col[ 14] type 2 max length 22 col[ 15] type 2 max length 22 col[ 16] type 2 max length 22 col[ 17] type 1 max length 38 cset 852 (ZHS16GBK) form 1 col[ 18] type 2 max length 22 col[ 19] type 2 max length 22 col[ 20] type 2 max length 22 col[ 21] type 2 max length 22 col[ 22] type 2 max length 22 col[ 23] type 2 max length 22 col[ 24] type 2 max length 22 col[ 25] type 2 max length 22 col[ 26] type 2 max length 22 col[ 27] type 2 max length 22 col[ 28] type 2 max length 22 col[ 29] type 2 max length 22 col[ 30] type 2 max length 22 col[ 31] type 1 max length 10 cset 852 (ZHS16GBK) form 1 col[ 32] type 2 max length 22 col[ 33] type 23 max length 2000 col[ 34] type 2 max length 22 col[ 35] type 2 max length 22 col[ 36] type 2 max length 22 col[ 37] type 1 max length 30 cset 852 (ZHS16GBK) form 1 col[ 38] type 2 max length 22 col[ 39] type 23 max length 8 col[ 40] type 23 max length 8 col[ 41] type 2 max length 22 col[ 42] type 2 max length 22 col[ 43] type 2 max length 22 col[ 44] type 2 max length 22 col[ 45] type 1 max length 64 cset 852 (ZHS16GBK) form 1 col[ 46] type 2 max length 22 col[ 47] type 1 max length 64 cset 852 (ZHS16GBK) form 1 col[ 48] type 2 max length 22 col[ 49] type 1 max length 64 cset 852 (ZHS16GBK) form 1 col[ 50] type 2 max length 22 col[ 51] type 2 max length 22 col[ 52] type 1 max length 64 cset 852 (ZHS16GBK) form 1 col[ 53] type 2 max length 22 col[ 54] type 2 max length 22 col[ 55] type 2 max length 22 col[ 56] type 23 max length 8 col[ 57] type 2 max length 22 col[ 58] type 1 max length 1 cset 852 (ZHS16GBK) form 1 col[ 59] type 1 max length 19 cset 852 (ZHS16GBK) form 1 col[ 60] type 2 max length 22 col[ 61] type 1 max length 38 cset 852 (ZHS16GBK) form 1 col[ 62] type 1 max length 1 cset 852 (ZHS16GBK) form 1 col[ 63] type 1 max length 1 cset 852 (ZHS16GBK) form 1 col[ 64] type 1 max length 1 cset 852 (ZHS16GBK) form 1 col[ 65] type 1 max length 1 cset 852 (ZHS16GBK) form 1 col[ 66] type 2 max length 22 col[ 67] type 1 max length 64 cset 852 (ZHS16GBK) form 1 col[ 68] type 1 max length 30 cset 852 (ZHS16GBK) form 1 col[ 69] type 1 max length 30 cset 852 (ZHS16GBK) form 1 col[ 70] type 2 max length 22 col[ 71] type 2 max length 22 col[ 72] type 2 max length 22 col[ 73] type 2 max length 22 col[ 74] type 12 max length 7 col[ 75] type 23 max length 2000 col[ 76] type 2 max length 22 col[ 77] type 2 max length 22 col[ 78] type 2 max length 22 col[ 79] type 2 max length 22 col[ 80] type 2 max length 22 col[ 81] type 2 max length 22 col[ 82] type 2 max length 22 col[ 83] type 2 max length 22 col[ 84] type 2 max length 22 col[ 85] type 2 max length 22 col[ 86] type 2 max length 22 col[ 87] type 2 max length 22 Conventional export 9986063: start of table data 19675141: TABLE "T_XIFENFEI3"
使用dd命令破坏T_XIFENFEI2所在位置的dmp文件
[oracle@web103 ~]$ dd if=/dev/zero of=/data/temp/t_xifenfei.dmp bs=1024 count=2 conv=notrunc seek=9747 2+0 records in 2+0 records out 2048 bytes (2.0 kB) copied, 1.6e-05 seconds, 128 MB/s
尝试imp导入被破坏的dmp文件数据
[oracle@web103 ~]$ imp "'/ as sysdba'" fromuser=xifenfei touser=xifenfeinew
>file=/data/temp/t_xifenfei.dmp log=/data/temp/imp_t_xifenfei.log
Import: Release 11.2.0.4.0 - Production on Tue Aug 18 22:35:09 2015
Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.
Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
Export file created by EXPORT:V11.02.00 via conventional path
import done in ZHS16GBK character set and AL16UTF16 NCHAR character set
. importing XIFENFEI's objects into XIFENFEINEW
. . importing table "T_XIFENFEI1" 86275 rows imported
IMP-00017: following statement failed with ORACLE error 1740:
"CREATE TABLE "T_XIFENFEI2" ("SQL_TEXT" VARCHAR2(1000), "SQL_FULLTEXT" CLOB,"
" "SQL_ID" VARCHAR2(13), "SHARABLE_MEM" NUMBER, "PERSISTENT_MEM" NUMBER, "RU"
"NTIME_MEM" NUMBER, "SORTS" NUMBER, "LOADED_VERSIONS" NUMBER, "OPEN_VERSIONS"
"" NUMBER, "USERS_OPENING" NUMBER, "FETCHES" NUMBER, "EXECUTIONS" NUMBER, "P"
"X_SERVERS_EXECUTIONS" NUMBER, "END_OF_FETCH_COU"
IMP-00003: ORACLE error 1740 encountered
ORA-01740: missing double quote in identifier
IMP-00008: unrecognized statement in the export file:
IMP-00008: unrecognized statement in the export file:
导入报IMP-00003 ORA-01740 IMP-00008,由于dmp文件被dd破坏(而且破坏位置是T_XIFENFEI2所在之处),因此imp导入到T_XIFENFEI2之时,抛出大量异常,imp终止
检查导入表情况
SQL> conn xifenfeinew/"www.xifenfei.com"
Connected.
SQL> select * from tab;
TNAME TABTYPE CLUSTERID
------------------------------ ------- ----------
T_XIFENFEI1 TABLE
SQL> select count(*) from t_xifenfei1;
COUNT(*)
----------
86275
和预期相符,表t_xifenfei1导入进去,但是t_xifenfei2由于坏块原因未导入,由于t_xifenfei3在t_xifenfei2之后,因此也未导入
使用CPFL程序抽取正常dmp文件
CPFL>getdmp '/data/temp/t_xifenfei.dmp' skip table 'T_XIFENFEI2' >/data/temp/t_xifenfeinew.dmp
重新导入dmp文件
[oracle@web103 ~]$ imp "'/ as sysdba'" fromuser=xifenfei touser=xifenfeinew >file=/data/temp/t_xifenfeinew.dmp log=/data/temp/imp_t_xifenfeinew.log Import: Release 11.2.0.4.0 - Production on Tue Aug 18 22:41:04 2015 Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved. Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production With the Partitioning, OLAP, Data Mining and Real Application Testing options Export file created by EXPORT:V11.02.00 via conventional path import done in ZHS16GBK character set and AL16UTF16 NCHAR character set . importing XIFENFEI's objects into XIFENFEINEW . . importing table "T_XIFENFEI1" 86275 rows imported . . importing table "T_XIFENFEI3" 2800 rows imported Import terminated successfully no warnings.
导入了t_xifenfei1,t_xifenfei3,果然t_xifenfei2被跳过
验证导入数据
[oracle@web103 ~]$ sqlplus xifenfeinew/"www.xifenfei.com"
SQL*Plus: Release 11.2.0.4.0 Production on Tue Aug 18 22:41:32 2015
Copyright (c) 1982, 2013, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> select * from tab;
TNAME TABTYPE CLUSTERID
------------------------------ ------- ----------
T_XIFENFEI1 TABLE
T_XIFENFEI3 TABLE
SQL> select count(*) from t_xifenfei1;
COUNT(*)
----------
86275
SQL> select count(*) from t_xifenfei3;
COUNT(*)
----------
2800
SQL>
通过验证数据证明,通过CPFL完美跳过了坏块所在表,实现后续数据完美恢复
使用dml语句删除index测试(取代ddl)
在有些极端情况下,数据库由于某种原因无法执行ddl操作,但是可以执行dml语句,我们可以通过dml语句来替代ddl操作(非官方支持,纯属个人闲着无聊中的测试,请勿模仿,否则后果自负)
创建测试用户xifenfei
[oracle@web103 ~]$ sqlplus / as sysdba SQL*Plus: Release 11.2.0.4.0 Production on Sun Aug 16 23:04:25 2015 Copyright (c) 1982, 2013, Oracle. All rights reserved. Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production With the Partitioning, OLAP, Data Mining and Real Application Testing options SQL> create user xifenfei identified by "www.xifenfei.com"; User created. SQL> grant dba to xifenfei; Grant succeeded.
创建测试index,并使用10046跟踪
SQL> conn xifenfei/"www.xifenfei.com" Connected. SQL> create table t_xifenfei as select * from dba_objects; Table created. SQL> alter session set events '10046 trace name context forever, level 12'; Session altered. SQL> select value from v$diag_info where name='Default Trace File'; VALUE -------------------------------------------------------------------------------- /u01/app/oracle/diag/rdbms/test/test/trace/test_ora_18838.trc SQL> create index ind_xifenfei_1 on t_xifenfei(object_id,data_object_id); Index created. SQL> exit SQL> exit Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production With the Partitioning, OLAP, Data Mining and Real Application Testing options
分析trace文件,找出来核心操作步骤
--插入创建index的记录到obj$中 insert into obj$(owner#,name,namespace,obj#,type#,ctime,mtime,stime,status, remoteowner,linkname,subname,dataobj#,flags,oid$,spare1,spare2,spare3) values (:1,:2,:3,:4,:5,:6,:7,:8,:9,:10,:11,:12,:13,:14,:15,:16,:17,:18) --插入index的信息到seg$中 insert into seg$ (file#,block#,type#,ts#,blocks,extents,minexts,maxexts, extsize,extpct,user#,iniexts,lists,groups,cachehint,hwmincr, spare1, scanhint, bitmapranges) values (:1,:2,:3,:4,:5,:6,:7,:8,:9,:10,:11,:12,:13,:14,:15,:16,DECODE(:17,0,NULL, :17),:18,:19) --继续分配index的空间 update seg$ set type#=:4,blocks=:5,extents=:6,minexts=:7,maxexts=:8,extsize= :9,extpct=:10,user#=:11,iniexts=:12,lists=decode(:13, 65535, NULL, :13), groups=decode(:14, 65535, NULL, :14), cachehint=:15, hwmincr=:16, spare1= DECODE(:17,0,NULL,:17),scanhint=:18, bitmapranges=:19 where ts#=:1 and file#=:2 and block#=:3 --插入index对应的列信息到icol$中 insert into icol$(obj#,bo#,intcol#,pos#,segcol#,segcollength,offset,col#, spare1,spare2,spare3) values (:1,:2,:3,:4,0,0,0,:5,:6,:7,:8) --插入index信息到ind$中 insert into ind$(bo#,obj#,ts#,file#,block#,intcols,type#,flags,property, pctfree$,initrans,maxtrans,blevel,leafcnt,distkey,lblkkey,dblkkey,clufac, cols,analyzetime,samplesize,dataobj#,degree,instances,rowcnt,pctthres$, indmethod#,trunccnt,spare1,spare4,spare2,spare6) values (:1,:2,:3,:4,:5,:6,:7,:8,:9,:10,:11,:12,:13,:14,:15,:16,:17,:18,:19,:20,:21, :22,decode(:23,1,null,:23),decode(:24,1,null,:24),:25, :32*256+:26,:27,:28, :29,:30,:31,:33)
通过这里我们基本上可以整体概况出来创建index主要操作了obj$,seg$,icol$,ind$几张基表,那么如果我们想通过dml语句删除index,那可以尝试人工删除这些新增记录
分析人工dml语句删除index
[oracle@web103 ~]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.4.0 Production on Sun Aug 16 23:31:49 2015
Copyright (c) 1982, 2013, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> conn xifenfei/"www.xifenfei.com"
Connected.
SQL> select object_id,data_object_id from user_objects where object_name='IND_XIFENFEI_1';
OBJECT_ID DATA_OBJECT_ID
---------- --------------
114642 114642
SQL> select object_id,data_object_id from user_objects where object_name='T_XIFENFEI';
OBJECT_ID DATA_OBJECT_ID
---------- --------------
114641 114641
SQL> SELECT OBJ#,DATAOBJ# FROM SYS.OBJ$ WHERE NAME='IND_XIFENFEI_1';
OBJ# DATAOBJ#
---------- ----------
114642 114642
--通过上面语句我们可以确定,IND_XIFENFEI_1 index的obj#和dataobj#都是为114642,而且可以直接查询obj$基表获得
SQL> SELECT OBJ#,DATAOBJ#,TS#,FILE#,BLOCK# FROM SYS.IND$ WHERE OBJ#=114642;
OBJ# DATAOBJ# TS# FILE# BLOCK#
---------- ---------- ---------- ---------- ----------
114642 114642 4 4 323994
--ind$结合obj$.obj#的信息,可以获得ts#,file#,block#
SQL> SELECT TABLESPACE_NAME,HEADER_FILE,HEADER_BLOCK FROM DBA_SEGMENTS WHERE SEGMENT_NAME='IND_XIFENFEI_1';
TABLESPACE_NAME HEADER_FILE HEADER_BLOCK
------------------------------ ----------- ------------
USERS 4 323994
SQL> SELECT TS# FROM V$TABLESPACE WHERE NAME='USERS';
TS#
----------
4
--这里证明ind$中的相关ts#,file#,block#和seg#中存储一致
SQL> SELECT COL#,POS# FROM SYS.icol$ WHERE OBJ#=114642;
COL# POS#
---------- ----------
4 1
5 2
SQL> SELECT COL#,NAME from SYS.COL$ where OBJ# =114641;
COL# NAME
---------- ------------------------------
1 OWNER
2 OBJECT_NAME
3 SUBOBJECT_NAME
4 OBJECT_ID
5 DATA_OBJECT_ID
6 OBJECT_TYPE
7 CREATED
8 LAST_DDL_TIME
9 TIMESTAMP
10 STATUS
11 TEMPORARY
12 GENERATED
13 SECONDARY
14 NAMESPACE
15 EDITION_NAME
15 rows selected.
--这里证明icol$中存储的列,正好和我们创建index指定列一致
人工dml删除index
SQL> conn / as sysdba Connected. SQL> delete from obj$ where obj#=114642 and dataobj#=114642; 1 row deleted. SQL> delete from sys.seg$ where file#=4 and ts#=4 and block#=323994; 1 row deleted. SQL> delete from icol$ where obj#=114642; 2 rows deleted. SQL> delete from ind$ where obj#=114642 and file#=4 and ts#=4 and block#=323994; 1 row deleted. SQL> commit; Commit complete.
检查dml语句删除index效果
SQL> select object_id,data_object_id from user_objects where object_name='IND_XIFENFEI_1'; no rows selected SQL> SELECT TABLESPACE_NAME,HEADER_FILE,HEADER_BLOCK FROM DBA_SEGMENTS WHERE SEGMENT_NAME='IND_XIFENFEI_1'; no rows selected SQL> select * from dba_indexes where index_name='IND_XIFENFEI_1'; no rows selected
从数据字典层面看,index IND_XIFENFEI_1确实已经被删除
尝试重建同名index
从数据字典层面查询,该index已经被删除,但是创建报ORA-00955: name is already used by an existing object错误
SQL> create index xifenfei.ind_xifenfei_1 on xifenfei.t_xifenfei(object_id,data_object_id);
create index xifenfei.ind_xifenfei_1 on xifenfei.t_xifenfei(object_id,data_object_id)
*
ERROR at line 1:
ORA-00955: name is already used by an existing object
解决重建同名index报ORA-00955错误
SQL> ALTER SESSION SET EVENTS '955 trace name errorstack level 3';
Session altered.
SQL> create index xifenfei.ind_xifenfei_1 on xifenfei.t_xifenfei(object_id,data_object_id);
create index xifenfei.ind_xifenfei_1 on xifenfei.t_xifenfei(object_id,data_object_id)
*
ERROR at line 1:
ORA-00955: name is already used by an existing object
SQL> select value from v$diag_info where name='Default Trace File';
VALUE
--------------------------------------------------------------------------------
/u01/app/oracle/diag/rdbms/test/test/trace/test_ora_20277.trc
--分析trace文件发现创建index执行计划部分
============
Plan Table
============
------------------------------------------------+-----------------------------------+
| Id | Operation | Name | Rows | Bytes | Cost | Time |
------------------------------------------------+-----------------------------------+
| 0 | CREATE INDEX STATEMENT | | | | 548 | |
| 1 | INDEX BUILD NON UNIQUE | IND_XIFENFEI_1| | | | |
| 2 | SORT CREATE INDEX | | 127K | 3302K | | |
| 3 | INDEX FAST FULL SCAN | IND_XIFENFEI_1| | | | |
------------------------------------------------+-----------------------------------+
--从这里大概知道原因了,创建index之时,由于shared pool里面依旧记录了老的index信息,因此再次创建index之时,
--直接从老index读取信息,而且明确也依旧是在shared pool里面检查未通过,从而出现了ORA-00955错误
SQL> alter system flush shared_pool;
System altered.
SQL> create index xifenfei.ind_xifenfei_1 on xifenfei.t_xifenfei(object_id,data_object_id);
Index created.
SQL> select obj#,dataobj# from SYS.obj$ where name='IND_XIFENFEI_1';
OBJ# DATAOBJ#
---------- ----------
114643 114643
SQL> select object_type,object_name from dba_objects where object_id=114643;
OBJECT_TYPE
-------------------
OBJECT_NAME
--------------------------------------------------------------------------------
INDEX
IND_XIFENFEI_1
SQL> select index_name from dba_indexes where table_name='T_XIFENFEI' AND OWNER='XIFENFEI';
INDEX_NAME
------------------------------
IND_XIFENFEI_1
补充说明
1.在不同的数据库版本,不同的平台可能操作语句以后一定的出入,依据你测试为准
2.在dml删除index操作中,可能还涉及到一些其他外围表处理,比如统计信息等
3.切勿在生产库中测试,否则可能导致数据库数据字典混乱,后果非常严重
在win 64位平台上运行bbed(支持ORACLE 10g 11g 12c)
很多朋友反馈在win 64位操作系统之上无法使用bbed(包括9i,10g,11g,12c数据库版本),以前写过一篇文章,完美实现了在win平台的各个版本的数据库版本之上实现使用bbed(在win中运行bbed程序),可惜很遗憾没有注明平台信息,留下了不少疑问,今天在自己的电脑上再次实现此功能,用来证明win 64位的平台之上也可以运行bbed程序(数据库版本包括10g,11g,12c,在10g之前x86架构中无win 64位版本数据库,因此我也无能为力).
****最近研发的Oracle数据块编辑工具( Oracle Block Editor Tool)-obet可以完美代替bbed****
操作系统版本64位
本机测试为win 7 64位操作系统

数据库版本64位
本机测试数据库版本为12.1.0.2 64位版本(因为12c都支持,那对于10g/11g更是不在话下)
bbed运行情况
这里的bbed只是运行起来,并未加载数据文件,因此这里看到的FILENAME为空,但是不妨碍证明bbed可以在win平台,64位的数据库中运行
整体证明win 64位平台,64位数据库运行bbed
一图抵上千言万语,让我们使用一幅完整截图来说明,bbed是可以运行在win 64位平台的64位版本的数据库之上(而且这里使用了目前最新的12.1.0.2版本)

加我微信(17813235971)
加我QQ(107644445)

