误drop tablespace后使用flashback database闪回异常处理
有朋友夜间打电话请求技术支持,数据库表空间被删除,然后使用flashback database 无法正常恢复。通过分析alert日志发现,创建表空间(xifenfei 别名),发现已经存在,就删除了该表空间(其实是业务核心表空间,误删除了,是否是连接错了数据库?) Sat Jul 05 17:10
有朋友夜间打电话请求技术支持,数据库表空间被删除,然后使用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修改四个文件头信息和其他文件相同即可使得数据库恢复正常
温馨提示:数据库操作需要慎重,备份重于一切
- 记录一次ORA-600 3004 恢复过程和处理思路
- 数据文件的三个创建SCN一点点探讨
- 记录一次ORA-00600[kdxlin:psno out of range]/ORA-00600[3020]/ORA-00600[4000]/ORA-00600[4193]的数据库恢复
- 使用flashback database找回被误删除表空间
- 记录一次ORA-00316 ORA-00312 redo异常恢复
- ORA-00600[kcrf_resilver_log_1]异常恢复
- 又一起存储故障导致ORA-00333 ORA-00312恢复
- Oracle安全警示录:加错裸设备导致redo异常
原文地址:误drop tablespace后使用flashback database闪回异常处理, 感谢原作者分享。

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics



Magnet link is a link method for downloading resources, which is more convenient and efficient than traditional download methods. Magnet links allow you to download resources in a peer-to-peer manner without relying on an intermediary server. This article will introduce how to use magnet links and what to pay attention to. 1. What is a magnet link? A magnet link is a download method based on the P2P (Peer-to-Peer) protocol. Through magnet links, users can directly connect to the publisher of the resource to complete resource sharing and downloading. Compared with traditional downloading methods, magnetic

How to use mdf files and mds files With the continuous advancement of computer technology, we can store and share data in a variety of ways. In the field of digital media, we often encounter some special file formats. In this article, we will discuss a common file format - mdf and mds files, and introduce how to use them. First, we need to understand the meaning of mdf files and mds files. mdf is the extension of the CD/DVD image file, and the mds file is the metadata file of the mdf file.

CrystalDiskMark is a small HDD benchmark tool for hard drives that quickly measures sequential and random read/write speeds. Next, let the editor introduce CrystalDiskMark to you and how to use crystaldiskmark~ 1. Introduction to CrystalDiskMark CrystalDiskMark is a widely used disk performance testing tool used to evaluate the read and write speed and performance of mechanical hard drives and solid-state drives (SSD). Random I/O performance. It is a free Windows application and provides a user-friendly interface and various test modes to evaluate different aspects of hard drive performance and is widely used in hardware reviews

foobar2000 is a software that can listen to music resources at any time. It brings you all kinds of music with lossless sound quality. The enhanced version of the music player allows you to get a more comprehensive and comfortable music experience. Its design concept is to play the advanced audio on the computer The device is transplanted to mobile phones to provide a more convenient and efficient music playback experience. The interface design is simple, clear and easy to use. It adopts a minimalist design style without too many decorations and cumbersome operations to get started quickly. It also supports a variety of skins and Theme, personalize settings according to your own preferences, and create an exclusive music player that supports the playback of multiple audio formats. It also supports the audio gain function to adjust the volume according to your own hearing conditions to avoid hearing damage caused by excessive volume. Next, let me help you

Cloud storage has become an indispensable part of our daily life and work nowadays. As one of the leading cloud storage services in China, Baidu Netdisk has won the favor of a large number of users with its powerful storage functions, efficient transmission speed and convenient operation experience. And whether you want to back up important files, share information, watch videos online, or listen to music, Baidu Cloud Disk can meet your needs. However, many users may not understand the specific use method of Baidu Netdisk app, so this tutorial will introduce in detail how to use Baidu Netdisk app. Users who are still confused can follow this article to learn more. ! How to use Baidu Cloud Network Disk: 1. Installation First, when downloading and installing Baidu Cloud software, please select the custom installation option.

NetEase Mailbox, as an email address widely used by Chinese netizens, has always won the trust of users with its stable and efficient services. NetEase Mailbox Master is an email software specially created for mobile phone users. It greatly simplifies the process of sending and receiving emails and makes our email processing more convenient. So how to use NetEase Mailbox Master, and what specific functions it has. Below, the editor of this site will give you a detailed introduction, hoping to help you! First, you can search and download the NetEase Mailbox Master app in the mobile app store. Search for "NetEase Mailbox Master" in App Store or Baidu Mobile Assistant, and then follow the prompts to install it. After the download and installation is completed, we open the NetEase email account and log in. The login interface is as shown below

MetaMask (also called Little Fox Wallet in Chinese) is a free and well-received encryption wallet software. Currently, BTCC supports binding to the MetaMask wallet. After binding, you can use the MetaMask wallet to quickly log in, store value, buy coins, etc., and you can also get 20 USDT trial bonus for the first time binding. In the BTCCMetaMask wallet tutorial, we will introduce in detail how to register and use MetaMask, and how to bind and use the Little Fox wallet in BTCC. What is MetaMask wallet? With over 30 million users, MetaMask Little Fox Wallet is one of the most popular cryptocurrency wallets today. It is free to use and can be installed on the network as an extension

After long pressing the play button of the speaker, connect to wifi in the software and you can use it. Tutorial Applicable Model: Xiaomi 12 System: EMUI11.0 Version: Xiaoai Classmate 2.4.21 Analysis 1 First find the play button of the speaker, and press and hold to enter the network distribution mode. 2 Log in to your Xiaomi account in the Xiaoai Speaker software on your phone and click to add a new Xiaoai Speaker. 3. After entering the name and password of the wifi, you can call Xiao Ai to use it. Supplement: What functions does Xiaoai Speaker have? 1 Xiaoai Speaker has system functions, social functions, entertainment functions, knowledge functions, life functions, smart home, and training plans. Summary/Notes: The Xiao Ai App must be installed on your mobile phone in advance for easy connection and use.
