标签云
asm恢复 bbed bootstrap$ dul In Memory kcbzib_kcrsds_1 kccpb_sanity_check_2 MySQL恢复 ORA-00312 ORA-00607 ORA-00704 ORA-00742 ORA-01110 ORA-01555 ORA-01578 ORA-01595 ORA-08103 ORA-600 2131 ORA-600 2662 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-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 勒索恢复 比特币加密文章分类
- Others (2)
- 中间件 (2)
- WebLogic (2)
- 操作系统 (103)
- 数据库 (1,763)
- DB2 (22)
- MySQL (76)
- Oracle (1,605)
- Data Guard (52)
- EXADATA (8)
- GoldenGate (24)
- ORA-xxxxx (166)
- ORACLE 12C (72)
- ORACLE 18C (6)
- ORACLE 19C (15)
- ORACLE 21C (3)
- Oracle 23ai (8)
- Oracle ASM (69)
- Oracle Bug (8)
- Oracle RAC (54)
- Oracle 安全 (6)
- Oracle 开发 (28)
- Oracle 监听 (28)
- Oracle备份恢复 (588)
- Oracle安装升级 (97)
- Oracle性能优化 (62)
- 专题索引 (5)
- 勒索恢复 (86)
- PostgreSQL (30)
- pdu工具 (6)
- PostgreSQL恢复 (9)
- SQL Server (32)
- SQL Server恢复 (13)
- TimesTen (7)
- 达梦数据库 (3)
- 达梦恢复 (1)
- 生活娱乐 (2)
- 至理名言 (11)
- 虚拟化 (2)
- VMware (2)
- 软件开发 (39)
- Asp.Net (9)
- JavaScript (12)
- PHP (2)
- 小工具 (22)
-
最近发表
- .sstop勒索加密数据库恢复
- 解决一次硬件恢复之后数据文件0kb的故障恢复case
- Error in invoking target ‘libasmclntsh19.ohso libasmperl19.ohso client_sharedlib’问题处理
- ORA-01171: datafile N going offline due to error advancing checkpoint
- linux环境oracle数据库被文件系统勒索加密为.babyk扩展名溯源
- ORA-600 ksvworkmsgalloc: bad reaper
- ORA-600 krccfl_chunk故障处理
- Oracle Recovery Tools恢复案例总结—202505
- ORA-600 kddummy_blkchk 数据库循环重启
- 记录一次asm disk加入到vg通过恢复直接open库的案例
- CHECKDB 发现了 N 个分配错误和 M 个一致性错误
- 达梦数据库dm.ctl文件异常恢复
- Oracle Recovery Tools修复ORA-00742、ORA-600 ktbair2: illegal inheritance故障
- 可能是 tempdb 空间用尽或某个系统表不一致故障处理
- 11.2.0.4库中遇到ORA-600 kcratr_nab_less_than_odr报错
- [MY-013183] [InnoDB] Assertion failure故障处理
- Oracle 19c 202504补丁(RUs+OJVM)-19.27
- Oracle Recovery Tools修复ORA-600 6101/kdxlin:psno out of range故障
- pdu完美支持金仓数据库恢复(KingbaseES)
- 虚拟机故障引起ORA-00310 ORA-00334故障处理
分类目录归档:Oracle备份恢复
impdp报ORA-00904: “ORIGINAL_OBJECT_NAME”: invalid identifier
发现问题
impdp导入数据库不成功,一直在报ORA-00904: “ORIGINAL_OBJECT_NAME”: invalid identifier错误
[oracle@back1 backup]$ impdp username/password schemas=center_admin dumpfile=center_admin20120427.dmp > logfile=center_admin20120427.log directory=impdir parallel=10 job_name=center_admin08; Import: Release 11.1.0.6.0 - 64bit Production on Friday, 27 April, 2012 21:35:06 Copyright (c) 2003, 2007, Oracle. All rights reserved. Connected to: Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - 64bit Production With the Partitioning, OLAP, Data Mining and Real Application Testing options ORA-39002: invalid operation ORA-31694: master table "USERNAME"."CENTER_ADMIN08" failed to load/unload ORA-02354: error in exporting/importing data ORA-02373: Error parsing insert statement for table "USERNAME"."CENTER_ADMIN08". ORA-00904: "ORIGINAL_OBJECT_NAME": invalid identifier
分析问题
看到这个错误,我第一个感觉根据ORA-31694,怀疑是没有创建相关用户,或者是该用户无权限权限CENTER_ADMIN08表.等我登陆目标数据库查看时候发现该用户存在,并且已经授予了DBA权限,所以不存在是用户相关问题导致.ORA-02354错误我怀疑是expdp导出来的文件在传输过程中发生意外(如使用ftp传输未使用二进制模式),当我使用md5sum命令检查发现两边一致,证明该文件传输正常.目标端不能检查明显故障,怀疑导出文件本身存在问题检查导出文件日志
[oracle@fcdb2 backup]$ more center_admin20120427.log ;;; Export: Release 11.1.0.7.0 - 64bit Production on Friday, 27 April, 2012 17:32:30 Copyright (c) 2003, 2007, Oracle. All rights reserved. ;;; Connected to: Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - 64bit Production With the Partitioning, Real Application Clusters, OLAP, Data Mining and Real Application Testing options Starting "USERNAME"."CENTER_ADMIN08":USERNAME/**** schemas=center_admin directory=expdir dumpfile=center_admin20120427.dmp er_admin20120427.log parallel=10 job_name=center_admin08 Estimate in progress using BLOCKS method... Processing object type SCHEMA_EXPORT/TABLE/TABLE_DATA Total estimation using BLOCKS method: 158.2 GB
发现新大陆,两边的数据库版本不一致,源端版本是11.1.0.7,目标端版本是11.1.0.6.这个时候我对问题的定位是可能版本兼用问题(毕竟是高版本到低版本)或者是bug.先查询datapump版本之间兼容性列表
Version Written by Can be imported into Target: Data Pump database with 10gR1 10gR2 11gR1 11gR2 Dumpfile Set compatibility 10.1.0.x 10.2.0.x 11.1.0.x 11.2.0.x ------------ --------------- ---------- ---------- ---------- ---------- 0.1 10.1.x supported supported supported supported 1.1 10.2.x no supported supported supported 2.1 11.1.x no no supported supported 3.1 11.2.x no no no supported
这里可以看出11.1.0.7和11.1.0.6之间是相互兼容的,不应该会存在上述问题,那么现在对于该问题的解释很可能是bug导致,继续查询资料发现[ID 752374.1]描述的正是该问题.
解决问题
1. Apply 11.1.0.7 Patch:6890831 on the target database. 2. Workaround this issue by re-running an expdp from the 11.1.0.7 database with an additional parameter VERSION=10.2. This will create a new dump file compatible to be imported into 10gR2, which will also import successfully into 11.1.0.6. Unfortunately, please be aware that the new 11g specific features will not be exported if expdp is run from 11.1.0.7 with the parameter VERSION=10.2. If only normal objects and features are involved, this could be a good workaround.
恢复备份控制文件避免resetlogs方式打开数据库
在很多时候,我们需要使用备份控制文件恢复数据库,在恢复完成后,准备打开库,很多人知道这个时候如果要打开这个库,需要使用resetlogs操作,虽然在oracle 10g及其以后版本中在恢复的时候可以跨越resetlogs操作,但是很多时候大家还是希望使用备份的控制文件能够正常的open一个库,而不是resetlogs.这里通过实验展示使用备份控制文件正常open库的过程,整体思路是:先使用备份控制文件正常恢复数据库,然后重建该控制文件,继而可以正常open库
SQL> select * from v$version; BANNER -------------------------------------------------------------------------------- Oracle9i Enterprise Edition Release 9.2.0.4.0 - Production PL/SQL Release 9.2.0.4.0 - Production CORE 9.2.0.3.0 Production TNS for Linux: Version 9.2.0.4.0 - Production NLSRTL Version 9.2.0.4.0 - Production SQL> alter database backup controlfile to '/tmp/controlfile.bak'; Database altered. SQL> alter system switch logfile; System altered. SQL> / System altered. SQL> / System altered. SQL> shutdown immediate; Database closed. Database dismounted. ORACLE instance shut down. --替换备份的控制文件 SQL> startup mount; ORACLE instance started. Total System Global Area 353441008 bytes Fixed Size 451824 bytes Variable Size 184549376 bytes Database Buffers 167772160 bytes Redo Buffers 667648 bytes Database mounted. SQL> recover database using backup controlfile; ORA-00279: change 12286827844770 generated at 04/12/2012 00:21:54 needed for thread 1 ORA-00289: suggestion : /u01/oracle/oradata/xifenfei/archive/1_4.dbf ORA-00280: change 12286827844770 for thread 1 is in sequence #4 Specify log: {<RET>=suggested | filename | AUTO | CANCEL} auto ORA-00279: change 12286827844772 generated at 04/12/2012 00:21:55 needed for thread 1 ORA-00289: suggestion : /u01/oracle/oradata/xifenfei/archive/1_5.dbf ORA-00280: change 12286827844772 for thread 1 is in sequence #5 ORA-00278: log file '/u01/oracle/oradata/xifenfei/archive/1_4.dbf' no longer needed for this recovery ORA-00279: change 12286827844776 generated at 04/12/2012 00:21:58 needed for thread 1 ORA-00289: suggestion : /u01/oracle/oradata/xifenfei/archive/1_6.dbf ORA-00280: change 12286827844776 for thread 1 is in sequence #6 ORA-00278: log file '/u01/oracle/oradata/xifenfei/archive/1_5.dbf' no longer needed for this recovery ORA-00308: cannot open archived log '/u01/oracle/oradata/xifenfei/archive/1_6.dbf' ORA-27037: unable to obtain file status Linux Error: 2: No such file or directory Additional information: 3 SQL> recover database using backup controlfile; ORA-00279: change 12286827844776 generated at 04/12/2012 00:21:58 needed for thread 1 ORA-00289: suggestion : /u01/oracle/oradata/xifenfei/archive/1_6.dbf ORA-00280: change 12286827844776 for thread 1 is in sequence #6 Specify log: {<RET>=suggested | filename | AUTO | CANCEL} /u01/oracle/oradata/xifenfei/redo02.log ORA-00310: archived log contains sequence 3; sequence 6 required ORA-00334: archived log: '/u01/oracle/oradata/xifenfei/redo02.log' SQL> recover database using backup controlfile; ORA-00279: change 12286827844776 generated at 04/12/2012 00:21:58 needed for thread 1 ORA-00289: suggestion : /u01/oracle/oradata/xifenfei/archive/1_6.dbf ORA-00280: change 12286827844776 for thread 1 is in sequence #6 Specify log: {<RET>=suggested | filename | AUTO | CANCEL} /u01/oracle/oradata/xifenfei/redo03.log Log applied. Media recovery complete. SQL> alter database open; alter database open * ERROR at line 1: ORA-01589: must use RESETLOGS or NORESETLOGS option for database open --提示需要resetlogs SQL> alter database backup controlfile to trace as '/tmp/1.txt'; Database altered. SQL> shutdown immediate; ORA-01109: database not open Database dismounted. ORACLE instance shut down. SQL> STARTUP NOMOUNT Total System Global Area 353441008 bytes Fixed Size 451824 bytes Variable Size 184549376 bytes Database Buffers 167772160 bytes Redo Buffers 667648 bytes --重建控制文件 --自动启动到mount状态 --数据库直接open成功 SQL> alter database open; Database altered.
发表在 Oracle备份恢复
5 条评论
重建 Datapump Utility EXPDP/IMPDP
因为数据库内部错误,数据字典不一致等原因导致 DataPump不能被正常使用,这个时候可以尝试着通过重建 DataPump来解决问题
sysdba登录数据库
SQL> connect / as sysdba
For Oracle version 10.1
1. Catdp.sql orders the installation of all its components including the Metadata API which was previously installed separately. By default catproc.sql invoke this script. SQL >@ $ORACLE_HOME/rdbms/admin/catdp.sql 2. dbmspump.sql will create DBMS procedures for dataPUMP SQL >@ $ORACLE_HOME/rdbms/admin/dbmspump.sql
For Oracle version 10.2
1. Catdph.sql will Re-Install DataPump types and views SQL >@ $ORACLE_HOME/rdbms/admin/catdph.sql Use this code to verify if XDB is installed: SQL> select substr(comp_name,1,30) comp_name, substr(comp_id,1,10) comp_id,substr(version,1,12) version,status from dba_registry where comp_id='XDB'; Sample output if XDB installed, Oracle XML Database XDB -version- VALID Note: If XDB is installed, then it is required to run "catmetx.sql" script also. SQL> @ $ORACLE_HOME/rdbms/admin/catmetx.sql 2. prvtdtde.plb will Re-Install tde_library packages SQL >@ $ORACLE_HOME/rdbms/admin/prvtdtde.plb 3. Catdpb.sql will Re-Install DataPump packages SQL >@ $ORACLE_HOME/rdbms/admin/catdpb.sql 4.Dbmspump.sql will Re-Install DBMS DataPump objects SQL >@ $ORACLE_HOME/rdbms/admin/dbmspump.sql 5. To recompile invalid objects, if any SQL >@ $ORACLE_HOME/rdbms/admin/utlrp.sql
For Oracle version 11g
1. Catproc.sql SQL >@ $ORACLE_HOME/rdbms/admin/catproc.sql 2. To recompile invalid objects, if any SQL >@ $ORACLE_HOME/rdbms/admin/utlrp.sql
参考:How To Reload Datapump Utility EXPDP/IMPDP [ID 430221.1]
发表在 逻辑备份/恢复
评论关闭