标签云
asm恢复 bbed bootstrap$ dul In Memory kcbzib_kcrsds_1 kccpb_sanity_check_2 kfed MySQL恢复 ORA-00312 ORA-00607 ORA-00704 ORA-01110 ORA-01555 ORA-01578 ORA-08103 ORA-600 2131 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-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)
- 操作系统 (102)
- 数据库 (1,670)
- DB2 (22)
- MySQL (73)
- Oracle (1,532)
- Data Guard (52)
- EXADATA (8)
- GoldenGate (21)
- ORA-xxxxx (159)
- ORACLE 12C (72)
- ORACLE 18C (6)
- ORACLE 19C (14)
- ORACLE 21C (3)
- Oracle 23ai (7)
- Oracle ASM (65)
- Oracle Bug (8)
- Oracle RAC (52)
- Oracle 安全 (6)
- Oracle 开发 (28)
- Oracle 监听 (28)
- Oracle备份恢复 (560)
- Oracle安装升级 (91)
- Oracle性能优化 (62)
- 专题索引 (5)
- 勒索恢复 (78)
- PostgreSQL (18)
- PostgreSQL恢复 (6)
- SQL Server (27)
- SQL Server恢复 (8)
- TimesTen (7)
- 达梦数据库 (2)
- 生活娱乐 (2)
- 至理名言 (11)
- 虚拟化 (2)
- VMware (2)
- 软件开发 (37)
- Asp.Net (9)
- JavaScript (12)
- PHP (2)
- 小工具 (20)
-
最近发表
- ORA-600 krse_arc_complete.4
- Oracle 19c 202410补丁(RUs+OJVM)
- ntfs MFT损坏(ntfs文件系统故障)导致oracle异常恢复
- .mkp扩展名oracle数据文件加密恢复
- 清空redo,导致ORA-27048: skgfifi: file header information is invalid
- A_H_README_TO_RECOVER勒索恢复
- 通过alert日志分析客户自行对一个数据库恢复的来龙去脉和点评
- ORA-12514: TNS: 监听进程不能解析在连接描述符中给出的SERVICE_NAME
- ORA-01092 ORA-00604 ORA-01558故障处理
- ORA-65088: database open should be retried
- Oracle 19c异常恢复—ORA-01209/ORA-65088
- ORA-600 16703故障再现
- 数据库启动报ORA-27102 OSD-00026 O/S-Error: (OS 1455)
- .[metro777@cock.li].Elbie勒索病毒加密数据库恢复
- 应用连接错误,初始化mysql数据库恢复
- RAC默认服务配置优先节点
- Oracle 19c RAC 替换私网操作
- 监听报TNS-12541 TNS-12560 TNS-00511错误
- drop tablespace xxx including contents恢复
- Linux 8 修改网卡名称
标签归档:Oracle Recovery Tools
Oracle Recovery Tools更新—202304
最近对Oracle Recovery Tools工具进行了升级,增加了在某些恢复情况下对于单个文件的CheckPoint Time的显示,便于判断文件的有效性(便于历史文件区分),该软件是一个恢复小工具,主要定位:
1. 对于某些恢复场景的快速判断,便于问题定位和后续恢复
2. 实现图形化快速修复损坏的oracle数据块和构造块
3. 实现图形化快速修改文件头信息,代替bbed解决文件头的各种scn等问题
4. 快速修改内存中记录,在某些强制拉库的过程中提供便利,特别是在win平台后续版本中无法通过oradebug等方式修改的情况下使用
把对Oracle内存修改功能集成到该软件中
增加了一些可能使用到的小功能
软件下载地址:OraRecovery下载
可以处理常见的oracle故障案例:
Oracle Recovery Tools修复空闲坏块
Oracle Recovery Tools实战批量坏块修复
Oracle Recovery Tools快速恢复ORA-19909
Oracle Recovery Tools 解决ORA-600 3020故障
Oracle Recovery Tools恢复MISSING00000文件故障
一键恢复ORA-01113 ORA-01110—Oracle Recovery Tools
Oracle Recovery Tools快速解决sysaux文件不能online问题
Oracle Recovery Tools恢复—ORA-00704 ORA-01555故障
Oracle Recovery Tools 解决ORA-01190 ORA-01248等故障
Oracle Recovery Tools解决ORA-00279 ORA-00289 ORA-00280故障
Oracle Recovery Tools快速恢复重建ctl遗漏数据文件故障
数据库被强制打开,由于重建ctl把部分文件没有列入其中导致数据库在resetlogs打开之后部分文件异常
Dictionary check beginning Tablespace 'TEMP' #3 found in data dictionary, but not in the controlfile. Adding to controlfile. Tablespace 'TEMP_HRP' #21 found in data dictionary, but not in the controlfile. Adding to controlfile. File #19 found in data dictionary but not in controlfile. Creating OFFLINE file 'MISSING00019' in the controlfile. This file can no longer be recovered so it must be dropped. File #25 found in data dictionary but not in controlfile. Creating OFFLINE file 'MISSING00025' in the controlfile. This file can no longer be recovered so it must be dropped. File #26 found in data dictionary but not in controlfile. Creating OFFLINE file 'MISSING00026' in the controlfile. This file can no longer be recovered so it must be dropped. File #27 found in data dictionary but not in controlfile. Creating OFFLINE file 'MISSING00027' in the controlfile. This file can no longer be recovered so it must be dropped. File #66 found in data dictionary but not in controlfile. Creating OFFLINE file 'MISSING00066' in the controlfile. This file can no longer be recovered so it must be dropped. File #67 found in data dictionary but not in controlfile. Creating OFFLINE file 'MISSING00067' in the controlfile. This file can no longer be recovered so it must be dropped. File #68 found in data dictionary but not in controlfile. Creating OFFLINE file 'MISSING00068' in the controlfile. This file can no longer be recovered so it must be dropped. File #69 found in data dictionary but not in controlfile. Creating OFFLINE file 'MISSING00069' in the controlfile. This file can no longer be recovered so it must be dropped. File #70 found in data dictionary but not in controlfile. Creating OFFLINE file 'MISSING00070' in the controlfile. This file can no longer be recovered so it must be dropped. File #91 found in data dictionary but not in controlfile. Creating OFFLINE file 'MISSING00091' in the controlfile. This file can no longer be recovered so it must be dropped. File #92 found in data dictionary but not in controlfile. Creating OFFLINE file 'MISSING00092' in the controlfile. This file can no longer be recovered so it must be dropped. File #93 found in data dictionary but not in controlfile. Creating OFFLINE file 'MISSING00093' in the controlfile. This file can no longer be recovered so it must be dropped. File #94 found in data dictionary but not in controlfile. Creating OFFLINE file 'MISSING00094' in the controlfile. This file can no longer be recovered so it must be dropped. File #95 found in data dictionary but not in controlfile. Creating OFFLINE file 'MISSING00095' in the controlfile. This file can no longer be recovered so it must be dropped. File #96 found in data dictionary but not in controlfile. Creating OFFLINE file 'MISSING00096' in the controlfile. This file can no longer be recovered so it must be dropped. File #97 found in data dictionary but not in controlfile. Creating OFFLINE file 'MISSING00097' in the controlfile. This file can no longer be recovered so it must be dropped. File #98 found in data dictionary but not in controlfile. Creating OFFLINE file 'MISSING00098' in the controlfile. This file can no longer be recovered so it must be dropped. File #99 found in data dictionary but not in controlfile. Creating OFFLINE file 'MISSING00099' in the controlfile. This file can no longer be recovered so it must be dropped. File #100 found in data dictionary but not in controlfile. Creating OFFLINE file 'MISSING00100' in the controlfile. This file can no longer be recovered so it must be dropped. File #102 found in data dictionary but not in controlfile. Creating OFFLINE file 'MISSING00102' in the controlfile. This file can no longer be recovered so it must be dropped.
通过查询恢复之后的v$datafile发现
SQL> select name from v$datafile where status='RECOVER'; NAME -------------------------------------------------------------------------------- C:\APP\ADMINISTRATOR\PRODUCT\11.2.0\DBHOME_1\DATABASE\MISSING00019 C:\APP\ADMINISTRATOR\PRODUCT\11.2.0\DBHOME_1\DATABASE\MISSING00025 C:\APP\ADMINISTRATOR\PRODUCT\11.2.0\DBHOME_1\DATABASE\MISSING00026 C:\APP\ADMINISTRATOR\PRODUCT\11.2.0\DBHOME_1\DATABASE\MISSING00027 C:\APP\ADMINISTRATOR\PRODUCT\11.2.0\DBHOME_1\DATABASE\MISSING00066 C:\APP\ADMINISTRATOR\PRODUCT\11.2.0\DBHOME_1\DATABASE\MISSING00067 C:\APP\ADMINISTRATOR\PRODUCT\11.2.0\DBHOME_1\DATABASE\MISSING00068 C:\APP\ADMINISTRATOR\PRODUCT\11.2.0\DBHOME_1\DATABASE\MISSING00069 C:\APP\ADMINISTRATOR\PRODUCT\11.2.0\DBHOME_1\DATABASE\MISSING00070 C:\APP\ADMINISTRATOR\PRODUCT\11.2.0\DBHOME_1\DATABASE\MISSING00091 C:\APP\ADMINISTRATOR\PRODUCT\11.2.0\DBHOME_1\DATABASE\MISSING00092 C:\APP\ADMINISTRATOR\PRODUCT\11.2.0\DBHOME_1\DATABASE\MISSING00093 C:\APP\ADMINISTRATOR\PRODUCT\11.2.0\DBHOME_1\DATABASE\MISSING00094 C:\APP\ADMINISTRATOR\PRODUCT\11.2.0\DBHOME_1\DATABASE\MISSING00095 C:\APP\ADMINISTRATOR\PRODUCT\11.2.0\DBHOME_1\DATABASE\MISSING00096 C:\APP\ADMINISTRATOR\PRODUCT\11.2.0\DBHOME_1\DATABASE\MISSING00097 C:\APP\ADMINISTRATOR\PRODUCT\11.2.0\DBHOME_1\DATABASE\MISSING00098 C:\APP\ADMINISTRATOR\PRODUCT\11.2.0\DBHOME_1\DATABASE\MISSING00099 C:\APP\ADMINISTRATOR\PRODUCT\11.2.0\DBHOME_1\DATABASE\MISSING00100 C:\APP\ADMINISTRATOR\PRODUCT\11.2.0\DBHOME_1\DATABASE\MISSING00102 20 rows selected.
对于这种情况,使用OraRecovery工具,可以快速修复
修复之前个文件头信息
修复之后和库中其他文件一致
然后批量重命名数据文件,recover datafile,online datafile一气呵成
Sun Oct 23 23:27:36 2022 alter database rename file 'C:\APP\ADMINISTRATOR\PRODUCT\11.2.0\DBHOME_1\DATABASE\MISSING00019' to 'E:\oradata\datafile\xifenfei.287.948643517' Completed: alter database rename file 'C:\APP\ADMINISTRATOR\PRODUCT\11.2.0\DBHOME_1\DATABASE\MISSING00019' to 'E:\oradata\datafile\xifenfei.287.948643517' alter database rename file 'C:\APP\ADMINISTRATOR\PRODUCT\11.2.0\DBHOME_1\DATABASE\MISSING00025' to 'E:\oradata\datafile\xifenfei.293.968102781' Completed: alter database rename file 'C:\APP\ADMINISTRATOR\PRODUCT\11.2.0\DBHOME_1\DATABASE\MISSING00025' to 'E:\oradata\datafile\xifenfei.293.968102781' alter database rename file 'C:\APP\ADMINISTRATOR\PRODUCT\11.2.0\DBHOME_1\DATABASE\MISSING00026' to 'E:\oradata\datafile\xifenfei.294.968102903' Completed: alter database rename file 'C:\APP\ADMINISTRATOR\PRODUCT\11.2.0\DBHOME_1\DATABASE\MISSING00026' to 'E:\oradata\datafile\xifenfei.294.968102903' alter database rename file 'C:\APP\ADMINISTRATOR\PRODUCT\11.2.0\DBHOME_1\DATABASE\MISSING00027' to 'E:\oradata\datafile\xifenfei.295.968103023' Completed: alter database rename file 'C:\APP\ADMINISTRATOR\PRODUCT\11.2.0\DBHOME_1\DATABASE\MISSING00027' to 'E:\oradata\datafile\xifenfei.295.968103023' alter database rename file 'C:\APP\ADMINISTRATOR\PRODUCT\11.2.0\DBHOME_1\DATABASE\MISSING00066' to 'E:\oradata\datafile\xifenfei.346.1050578857' Completed: alter database rename file 'C:\APP\ADMINISTRATOR\PRODUCT\11.2.0\DBHOME_1\DATABASE\MISSING00066' to 'E:\oradata\datafile\xifenfei.346.1050578857' alter database rename file 'C:\APP\ADMINISTRATOR\PRODUCT\11.2.0\DBHOME_1\DATABASE\MISSING00067' to 'E:\oradata\datafile\xifenfei.347.1050578871' Completed: alter database rename file 'C:\APP\ADMINISTRATOR\PRODUCT\11.2.0\DBHOME_1\DATABASE\MISSING00067' to 'E:\oradata\datafile\xifenfei.347.1050578871' alter database rename file 'C:\APP\ADMINISTRATOR\PRODUCT\11.2.0\DBHOME_1\DATABASE\MISSING00068' to 'E:\oradata\datafile\xifenfei.348.1050578873' Completed: alter database rename file 'C:\APP\ADMINISTRATOR\PRODUCT\11.2.0\DBHOME_1\DATABASE\MISSING00068' to 'E:\oradata\datafile\xifenfei.348.1050578873' alter database rename file 'C:\APP\ADMINISTRATOR\PRODUCT\11.2.0\DBHOME_1\DATABASE\MISSING00069' to 'E:\oradata\datafile\xifenfei.349.1050578875' Completed: alter database rename file 'C:\APP\ADMINISTRATOR\PRODUCT\11.2.0\DBHOME_1\DATABASE\MISSING00069' to 'E:\oradata\datafile\xifenfei.349.1050578875' alter database rename file 'C:\APP\ADMINISTRATOR\PRODUCT\11.2.0\DBHOME_1\DATABASE\MISSING00070' to 'E:\oradata\datafile\xifenfei.350.1050578877' Completed: alter database rename file 'C:\APP\ADMINISTRATOR\PRODUCT\11.2.0\DBHOME_1\DATABASE\MISSING00070' to 'E:\oradata\datafile\xifenfei.350.1050578877' alter database rename file 'C:\APP\ADMINISTRATOR\PRODUCT\11.2.0\DBHOME_1\DATABASE\MISSING00091' to 'E:\oradata\datafile\xifenfei.371.1081159403' Completed: alter database rename file 'C:\APP\ADMINISTRATOR\PRODUCT\11.2.0\DBHOME_1\DATABASE\MISSING00091' to 'E:\oradata\datafile\xifenfei.371.1081159403' alter database rename file 'C:\APP\ADMINISTRATOR\PRODUCT\11.2.0\DBHOME_1\DATABASE\MISSING00092' to 'E:\oradata\datafile\xifenfei.372.1081159409' Completed: alter database rename file 'C:\APP\ADMINISTRATOR\PRODUCT\11.2.0\DBHOME_1\DATABASE\MISSING00092' to 'E:\oradata\datafile\xifenfei.372.1081159409' alter database rename file 'C:\APP\ADMINISTRATOR\PRODUCT\11.2.0\DBHOME_1\DATABASE\MISSING00093' to 'E:\oradata\datafile\xifenfei.373.1081159425' Completed: alter database rename file 'C:\APP\ADMINISTRATOR\PRODUCT\11.2.0\DBHOME_1\DATABASE\MISSING00093' to 'E:\oradata\datafile\xifenfei.373.1081159425' alter database rename file 'C:\APP\ADMINISTRATOR\PRODUCT\11.2.0\DBHOME_1\DATABASE\MISSING00094' to 'E:\oradata\datafile\xifenfei.374.1081159427' Completed: alter database rename file 'C:\APP\ADMINISTRATOR\PRODUCT\11.2.0\DBHOME_1\DATABASE\MISSING00094' to 'E:\oradata\datafile\xifenfei.374.1081159427' alter database rename file 'C:\APP\ADMINISTRATOR\PRODUCT\11.2.0\DBHOME_1\DATABASE\MISSING00095' to 'E:\oradata\datafile\xifenfei.375.1088945947' Completed: alter database rename file 'C:\APP\ADMINISTRATOR\PRODUCT\11.2.0\DBHOME_1\DATABASE\MISSING00095' to 'E:\oradata\datafile\xifenfei.375.1088945947' alter database rename file 'C:\APP\ADMINISTRATOR\PRODUCT\11.2.0\DBHOME_1\DATABASE\MISSING00096' to 'E:\oradata\datafile\xifenfei.376.1088945949' Completed: alter database rename file 'C:\APP\ADMINISTRATOR\PRODUCT\11.2.0\DBHOME_1\DATABASE\MISSING00096' to 'E:\oradata\datafile\xifenfei.376.1088945949' alter database rename file 'C:\APP\ADMINISTRATOR\PRODUCT\11.2.0\DBHOME_1\DATABASE\MISSING00097' to 'E:\oradata\datafile\xifenfei.377.1088945953' Completed: alter database rename file 'C:\APP\ADMINISTRATOR\PRODUCT\11.2.0\DBHOME_1\DATABASE\MISSING00097' to 'E:\oradata\datafile\xifenfei.377.1088945953' alter database rename file 'C:\APP\ADMINISTRATOR\PRODUCT\11.2.0\DBHOME_1\DATABASE\MISSING00098' to 'E:\oradata\datafile\xifenfei.378.1088945955' Completed: alter database rename file 'C:\APP\ADMINISTRATOR\PRODUCT\11.2.0\DBHOME_1\DATABASE\MISSING00098' to 'E:\oradata\datafile\xifenfei.378.1088945955' alter database rename file 'C:\APP\ADMINISTRATOR\PRODUCT\11.2.0\DBHOME_1\DATABASE\MISSING00099' to 'E:\oradata\datafile\xifenfei.379.1088945957' Completed: alter database rename file 'C:\APP\ADMINISTRATOR\PRODUCT\11.2.0\DBHOME_1\DATABASE\MISSING00099' to 'E:\oradata\datafile\xifenfei.379.1088945957' alter database rename file 'C:\APP\ADMINISTRATOR\PRODUCT\11.2.0\DBHOME_1\DATABASE\MISSING00100' to 'E:\oradata\datafile\xifenfei.380.1100595805' Completed: alter database rename file 'C:\APP\ADMINISTRATOR\PRODUCT\11.2.0\DBHOME_1\DATABASE\MISSING00100' to 'E:\oradata\datafile\xifenfei.380.1100595805' alter database rename file 'C:\APP\ADMINISTRATOR\PRODUCT\11.2.0\DBHOME_1\DATABASE\MISSING00102' to 'E:\oradata\datafile\xifenfei.382.1100595821' Completed: alter database rename file 'C:\APP\ADMINISTRATOR\PRODUCT\11.2.0\DBHOME_1\DATABASE\MISSING00102' to 'E:\oradata\datafile\xifenfei.382.1100595821' Sun Oct 23 23:30:54 2022 ALTER DATABASE RECOVER datafile 19,25,26,27,66,67,68,69,70,91,92,93,94,95,96,97,98,99,100,102 Media Recovery Start Serial Media Recovery started Completed: ALTER DATABASE RECOVER datafile 19,25,26,27,66,67,68,69,70,91,92,93,94,95,96,97,98,99,100,102 Sun Oct 23 23:31:30 2022 alter database datafile 19,25,26,27,66,67,68,69,70,91,92,93,94,95,96,97,98,99,100,102 online Completed: alter database datafile 19,25,26,27,66,67,68,69,70,91,92,93,94,95,96,97,98,99,100,102 online
通过OraRecovery工具快速实现MISSING数据文件恢复
软件下载:OraRecovery下载
使用说明:使用说明
Oracle Recovery Tools快速解决sysaux文件不能online问题
又一客户sysaux表空间对应的数据文件离线(file 6 为测试表空间数据可以不要)
Tue Jul 26 11:33:41 2022 alter database datafile 2 offline drop Completed: alter database datafile 2 offline drop Tue Jul 26 11:35:26 2022 alter database datafile 6 offline drop Completed: alter database datafile 6 offline drop Tue Jul 26 11:36:04 2022 ALTER DATABASE OPEN Beginning crash recovery of 1 threads parallel recovery started with 19 processes Started redo scan Completed redo scan read 14595 KB redo, 954 data blocks need recovery Started redo application at Thread 1: logseq 52560, block 31365 Recovery of Online Redo Log: Thread 1 Group 3 Seq 52560 Reading mem 0 Mem# 0: D:\XXXX\DATAS\ORADATA\XXXX\REDO03.LOG Completed redo application of 6.50MB Completed crash recovery at Thread 1: logseq 52560, block 60555, scn 4397986801 954 data blocks read, 954 data blocks written, 14595 redo k-bytes read Tue Jul 26 11:36:11 2022 Thread 1 advanced to log sequence 52561 (thread open) Thread 1 opened at log sequence 52561 Current log# 1 seq# 52561 mem# 0: D:\XXXX\DATAS\ORADATA\XXXX\REDO01.LOG Successful open of redo thread 1 MTTR advisory is disabled because FAST_START_MTTR_TARGET is not set Tue Jul 26 11:36:11 2022 SMON: enabling cache recovery Successfully onlined Undo Tablespace 2. Verifying file header compatibility for 11g tablespace encryption.. Verifying 11g file header compatibility for tablespace encryption completed SMON: enabling tx recovery Database Characterset is ZHS16GBK Tue Jul 26 11:36:14 2022 No Resource Manager plan active replication_dependency_tracking turned off (no async multimaster replication found) Errors in file d:\XXXX\datas\diag\rdbms\XXXX\XXXX\trace\XXXX_ora_8476.trc (incident=275156): ORA-25319: 队列表重新分区已中止 Incident details in: d:\XXXX\datas\diag\rdbms\XXXX\XXXX\incident\incdir_275156\XXXX_ora_8476_i275156.trc error 25319 happened during Queue table repartitioning Starting background process QMNC Tue Jul 26 11:36:23 2022 QMNC started with pid=50, OS id=11200 Tue Jul 26 11:36:23 2022 Trace dumping is performing id=[cdmp_20220726113623] XDB UNINITIALIZED: XDB$SCHEMA not accessible Tue Jul 26 11:36:27 2022 Completed: ALTER DATABASE OPEN
SQL> select file#,status from v$datafile; FILE# STATUS ---------- ------- 1 SYSTEM 2 OFFLINE 3 ONLINE 4 ONLINE 5 ONLINE 6 OFFLINE
7月份offline datafile 2,然后open数据库一直运行至今,数据库一直无法进行备份,需要我们进行解决
SQL> archive log list; 数据库日志模式 非存档模式 自动存档 禁用 存档终点 D:\APP\DATAS\product\11.2.0.4\dbhome_1\RDBMS 最早的联机日志序列 55557 当前日志序列 55559 SQL> recover datafile 2; ORA-00279: 更改 4397905894 (在 07/25/2022 18:26:58 生成) 对于线程 1 是必需的 ORA-00289: 建议: D:\XXXX\DATAS\FLASH_RECOVERY_AREA\XXXX\ARCHIVELOG\2022_08_29\O1_MF_1_52560_%U_.ARC ORA-00280: 更改 4397905894 (用于线程 1) 在序列 #52560 中 指定日志: {<RET>=suggested | filename | AUTO | CANCEL}
数据库为非归档,常规方法无法直接online datafile 2,对于这样的情况,使用Oracle Recovery Tools工具,进行快速修改文件头信息
查询文件头信息
SQL> set pages 1000 SQL> set linesize 150 SQL> select ts#,file#,TABLESPACE_NAME,status, 2 to_char(CREATION_TIME,'yyyy-mm-dd hh24:mi:ss') CREATE_TIME, 3 to_char(checkpoint_change#,'9999999999999999') "SCN", 4 to_char(RESETLOGS_CHANGE#,'9999999999999999') "RESETLOGS SCN",FUZZY 5 from v$datafile_header; TS# FILE# TABLESPACE_NAME STATUS CREATE_TIME SCN RESETLOGS SCN FUZ ---------- ---------- ------------------------------ ------- ------------------- ----------------- ----------------- --- 0 1 SYSTEM ONLINE 2010-03-30 10:07:48 4599488977 947455 NO 1 2 SYSAUX ONLINE 2010-03-30 10:07:52 4599488977 947455 YES 2 3 UNDOTBS1 ONLINE 2010-03-30 11:07:21 4599488977 947455 NO 4 4 USERS ONLINE 2010-03-30 10:08:04 4599488977 947455 NO 6 5 XXXX ONLINE 2020-05-29 09:45:48 4599488977 947455 NO
并且尝试online datafile 2
SQL> recover datafile 2; ORA-00283: 恢复会话因错误而取消 ORA-01122: 数据库文件 2 验证失败 ORA-01110: 数据文件 2: 'D:\XXXX\DATAS\ORADATA\XXXX\SYSAUX01.DBF' ORA-01207: 文件比控制文件更新 - 旧的控制文件
由于ctl中的关于datafile2 的信息没有更新,因此数据文件的信息比ctl中的新,无法正常recover,需要重建ctl
SQL> startup nomount; ORACLE 例程已经启动。 Total System Global Area 1.3195E+10 bytes Fixed Size 2188168 bytes Variable Size 1.0301E+10 bytes Database Buffers 2885681152 bytes Redo Buffers 5738496 bytes SQL> CREATE CONTROLFILE REUSE DATABASE "XXXX" NORESETLOGS NOARCHIVELOG 2 MAXLOGFILES 16 3 MAXLOGMEMBERS 3 4 MAXDATAFILES 100 5 MAXINSTANCES 8 6 MAXLOGHISTORY 2336 7 LOGFILE 8 GROUP 1 'D:\XXXX\DATAS\ORADATA\XXXX\REDO01.LOG' SIZE 50M BLOCKSIZE 512, 9 GROUP 2 'D:\XXXX\DATAS\ORADATA\XXXX\REDO02.LOG' SIZE 50M BLOCKSIZE 512, 10 GROUP 3 'D:\XXXX\DATAS\ORADATA\XXXX\REDO03.LOG' SIZE 50M BLOCKSIZE 512 11 DATAFILE 12 'D:\XXXX\DATAS\ORADATA\XXXX\SYSTEM01.DBF', 13 'D:\XXXX\DATAS\ORADATA\XXXX\SYSAUX01.DBF', 14 'D:\XXXX\DATAS\ORADATA\XXXX\UNDOTBS01.DBF', 15 'D:\XXXX\DATAS\ORADATA\XXXX\USERS01.DBF', 16 'D:\XXXX\DATAS\ZYSPACE\XXXX.DBF', 17 'E:\XXXX\DATAS\BACKUP\XXXXX.DBF' 18 CHARACTER SET ZHS16GBK 19 ; CREATE CONTROLFILE REUSE DATABASE "XXXX" NORESETLOGS NOARCHIVELOG * 第 1 行出现错误: ORA-01503: CREATE CONTROLFILE ?? ORA-01229: ???? 2 ?????? ORA-01110: ???? 2: 'D:\XXXX\DATAS\ORADATA\XXXX\SYSAUX01.DBF'
由于redo中信息也不对,重建需要使用resetlogs方式进行
SQL> CREATE CONTROLFILE REUSE DATABASE "XXXX" RESETLOGS NOARCHIVELOG 2 MAXLOGFILES 16 3 MAXLOGMEMBERS 3 4 MAXDATAFILES 100 5 MAXINSTANCES 8 6 MAXLOGHISTORY 2336 7 LOGFILE 8 GROUP 1 'D:\XXXX\DATAS\ORADATA\XXXX\REDO01.LOG' SIZE 50M BLOCKSIZE 512, 9 GROUP 2 'D:\XXXX\DATAS\ORADATA\XXXX\REDO02.LOG' SIZE 50M BLOCKSIZE 512, 10 GROUP 3 'D:\XXXX\DATAS\ORADATA\XXXX\REDO03.LOG' SIZE 50M BLOCKSIZE 512 11 DATAFILE 12 'D:\XXXX\DATAS\ORADATA\XXXX\SYSTEM01.DBF', 13 'D:\XXXX\DATAS\ORADATA\XXXX\SYSAUX01.DBF', 14 'D:\XXXX\DATAS\ORADATA\XXXX\UNDOTBS01.DBF', 15 'D:\XXXX\DATAS\ORADATA\XXXX\USERS01.DBF', 16 'D:\XXXX\DATAS\ZYSPACE\XXXX.DBF', 17 'E:\XXXX\DATAS\BACKUP\XXXXX.DBF' 18 CHARACTER SET ZHS16GBK 19 ; 控制文件已创建。
后续处理
SQL> alter database datafile 6 offline drop; 数据库已更改。 SQL> recover database using backup controlfile; ORA-00279: ?? 4599488977 (? 08/29/2022 20:59:25 ??) ???? 1 ???? ORA-00289: ??: D:\XXXX\DATAS\FLASH_RECOVERY_AREA\XXXX\ARCHIVELOG\2022_08_29\O1_MF_1_55279_%U_.ARC ORA-00280: ?? 4599488977 (???? 1) ??? #55279 ? 指定日志: {<RET>=suggested | filename | AUTO | CANCEL} D:\XXXX\DATAS\ORADATA\XXXX\REDO01.LOG 已应用的日志。 完成介质恢复。 SQL> alter database open resetlogs; 数据库已更改。 SQL> ALTER TABLESPACE TEMP ADD TEMPFILE 'D:\XXXX\DATAS\ORADATA\XXXX\TEMP01.DBF' REUSE; 表空间已更改。