标签云
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 修改网卡名称
标签归档:flashback database
误drop tablespace后使用flashback database闪回异常处理
有朋友夜间打电话请求技术支持,数据库表空间被删除,然后使用flashback database 无法正常恢复。通过分析alert日志发现,创建表空间(xifenfei 别名),发现已经存在,就删除了该表空间(其实是业务核心表空间,误删除了,是否是连接错了数据库?)
Sat Jul 05 17:10:06 2014 create tablespace XIFENFEI datafile 'D:\Oracle\oradata\orcl\HANDBB.DBF' size 50M autoextend on next 50M maxsize 1536M extent management local Sat Jul 05 17:10:06 2014 ORA-1543 signalled during: create tablespace XIFENFEI datafile 'D:\Oracle\oradata\orcl\HANDBB.DBF' size 50M autoextend on next 50M maxsize 1536M extent management local ... Sat Jul 05 17:10:59 2014 drop tablespace XIFENFEI Sat Jul 05 17:10:59 2014 ORA-1549 signalled during: drop tablespace XIFENFEI ... Sat Jul 05 17:11:05 2014 drop tablespace XIFENFEI ORA-1549 signalled during: drop tablespace XIFENFEI ... Sat Jul 05 17:11:24 2014 drop tablespace XIFENFEI including contents Sat Jul 05 17:11:36 2014 Thread 1 advanced to log sequence 186895 (LGWR switch) Current log# 1 seq# 186895 mem# 0: D:\ORACLE\PRODUCT\10.2.0\ORADATA\GZSERVER\REDO01.LOG Sat Jul 05 17:11:36 2014 ARC3: Warning. Log sequence in archive filename wrapped to fix length as indicated by %S in LOG_ARCHIVE_FORMAT. Old log archive with same name might be overwritten. Sat Jul 05 17:11:43 2014 LNS: Standby redo logfile selected for thread 1 sequence 186895 for destination LOG_ARCHIVE_DEST_4 Sat Jul 05 17:11:49 2014 LNS: Standby redo logfile selected for thread 1 sequence 186895 for destination LOG_ARCHIVE_DEST_2 Sat Jul 05 17:12:09 2014 Starting control autobackup Control autobackup written to DISK device handle 'D:\FULLBACK\C-1342406147-20140705-00' Completed: drop tablespace XIFENFEI including contents
通过这里可以发现删除表空间时间点为2014年7月5日17:12:09
闪回数据库到删除之前时间点
Sat Jul 05 18:16:54 2014 Database mounted in Exclusive Mode Completed: ALTER DATABASE MOUNT Sat Jul 05 18:19:23 2014 FLASHBACK DATABASE TO TIMESTAMP TO_TIMESTAMP('2014-07-05 17:09:00','YYYY-MM-DD HH24:MI:SS') Sat Jul 05 18:19:25 2014 Flashback Restore Start Sat Jul 05 18:20:52 2014 --闪回时的控制文件中无表空间XIFENFEI信息(因为已经被删除), --但是由于闪回的system 数据字典里面有相关文件信息,因此数据库在控制文件里面创建相关文件信息 Flashback: created tablespace #6: 'XIFENFEI' in the controlfile. Flashback: created OFFLINE file 'UNNAMED00012' for tablespace #6 in the controlfile. Filename was: 'D:\ORACLE\PRODUCT\10.2.0\ORADATA\GZSERVER\XIFENFEI4.DBF' when dropped. File will have to be restored from a backup and recovered. Flashback: created OFFLINE file 'UNNAMED00010' for tablespace #6 in the controlfile. Filename was: 'D:\ORACLE\PRODUCT\10.2.0\ORADATA\GZSERVER\XIFENFEI3.DBF' when dropped. File will have to be restored from a backup and recovered. Flashback: created OFFLINE file 'UNNAMED00008' for tablespace #6 in the controlfile. Filename was: 'D:\ORACLE\PRODUCT\10.2.0\ORADATA\GZSERVER\XIFENFEI2.DBF' when dropped. File will have to be restored from a backup and recovered. Flashback: created OFFLINE file 'UNNAMED00005' for tablespace #6 in the controlfile. Filename was: 'D:\ORACLE\PRODUCT\10.2.0\ORADATA\GZSERVER\XIFENFEI.DBF' when dropped. File will have to be restored from a backup and recovered. Flashback Restore Complete Flashback Media Recovery Start parallel recovery started with 15 processes Flashback Media Recovery Log D:\ORACLE\PRODUCT\10.2.0\ORADATA\ARCHIVE\ARC\ARC86891_0766797318.001 Flashback Media Recovery Log D:\ORACLE\PRODUCT\10.2.0\ORADATA\ARCHIVE\ARC\ARC86892_0766797318.001 Sat Jul 05 18:21:40 2014 Flashback Media Recovery Log D:\ORACLE\PRODUCT\10.2.0\ORADATA\ARCHIVE\ARC\ARC86893_0766797318.001 Sat Jul 05 18:21:47 2014 WARNING: inbound connection timed out (ORA-3136) Sat Jul 05 18:22:11 2014 Recovery of Online Redo Log: Thread 1 Group 3 Seq 186894 Reading mem 0 Mem# 0: D:\ORACLE\PRODUCT\10.2.0\ORADATA\GZSERVER\REDO03.LOG Sat Jul 05 18:22:39 2014 Incomplete Recovery applied until change 9078991241 Flashback Media Recovery Complete ORA-38795 signalled during: FLASHBACK DATABASE TO TIMESTAMP TO_TIMESTAMP('2014-07-05 17:09:00','YYYY-MM-DD HH24:MI:SS')... Sat Jul 05 18:30:11 2014 ALTER DATABASE OPEN RESETLOGS Sat Jul 05 18:30:11 2014 ORA-1245 signalled during: ALTER DATABASE OPEN RESETLOGS... --重命名相关UNNAMExxxxx文件名到硬盘上被删除表空间文件 Sat Jul 05 18:39:31 2014 alter database rename file 'D:\ORACLE\PRODUCT\10.2.0\DB_1\DATABASE\UNNAMED00005' to 'D:\oracle\product\10.2.0\oradata\gzserver\XIFENFEI.DBF' Sat Jul 05 18:39:31 2014 Completed: alter database rename file 'D:\ORACLE\PRODUCT\10.2.0\DB_1\DATABASE\UNNAMED00005' to 'D:\oracle\product\10.2.0\oradata\gzserver\XIFENFEI.DBF' Sat Jul 05 18:39:47 2014 alter database rename file 'D:\ORACLE\PRODUCT\10.2.0\DB_1\DATABASE\UNNAMED00008' to 'D:\oracle\product\10.2.0\oradata\gzserver\XIFENFEI2.DBF' Sat Jul 05 18:39:47 2014 Completed: alter database rename file 'D:\ORACLE\PRODUCT\10.2.0\DB_1\DATABASE\UNNAMED00008' to 'D:\oracle\product\10.2.0\oradata\gzserver\XIFENFEI2.DBF' Sat Jul 05 18:39:59 2014 alter database rename file 'D:\ORACLE\PRODUCT\10.2.0\DB_1\DATABASE\UNNAMED00010' to 'D:\oracle\product\10.2.0\oradata\gzserver\XIFENFEI3.DBF' Sat Jul 05 18:39:59 2014 Completed: alter database rename file 'D:\ORACLE\PRODUCT\10.2.0\DB_1\DATABASE\UNNAMED00010' to 'D:\oracle\product\10.2.0\oradata\gzserver\XIFENFEI3.DBF' Sat Jul 05 18:40:12 2014 alter database rename file 'D:\ORACLE\PRODUCT\10.2.0\DB_1\DATABASE\UNNAMED00012' to 'D:\oracle\product\10.2.0\oradata\gzserver\XIFENFEI4.DBF' Sat Jul 05 18:40:12 2014 Completed: alter database rename file 'D:\ORACLE\PRODUCT\10.2.0\DB_1\DATABASE\UNNAMED00012' to 'D:\oracle\product\10.2.0\oradata\gzserver\XIFENFEI4.DBF' Sat Jul 05 18:41:25 2014 ALTER DATABASE OPEN RESETLOGS Sat Jul 05 18:41:25 2014 ORA-1245 signalled during: ALTER DATABASE OPEN RESETLOGS...
到这里,可以看出来,因为数据库整体已经闪回,但是被drop 表空间的四个数据文件未被正常闪回,因此该四个文件的scn可能异常,通过数据库恢复检查脚本(Oracle Database Recovery Check)检查结果如下
这里很明显控制文件中的scn信息混乱不做过多参考,数据文件头信息看到只有ts# 6中的四个文件(就是被删除的表空间文件)scn过大,其他文件scn都处于正常状态(处于干净状态),到这里很明显,数据库闪回成功,但是被drop tablespace的数据文件未被闪回,因此该故障可以通过bbed修改四个文件头信息和其他文件相同即可使得数据库恢复正常
温馨提示:数据库操作需要慎重,备份重于一切