undo表空間檔案丟失恢復(1)--有備份
undo表空間的資料檔案丟失,如果有備份的情況下,恢復非常簡單,下邊給出一個例子:
[oracle@rhel6_lhr ~]$ sqlplus / as sysdba
SQL*Plus: Release 10.2.0.4.0 - Production on Thu Mar 12 18:02:13 2015
Copyright (c) 1982, 2007, Oracle. All Rights Reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> archive log list;
Database log mode Archive Mode
Automatic archival Enabled
Archive destination USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence 1
Next log sequence to archive 2
Current log sequence 2
SQL> exit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
[oracle@rhel6_lhr ~]$ rman target /
Recovery Manager: Release 10.2.0.4.0 - Production on Thu Mar 12 18:02:23 2015
Copyright (c) 1982, 2007, Oracle. All rights reserved.
connected to target database: ORA1024G (DBID=2698093861)
RMAN> backup database;
Starting backup at 2015-03-12 18:02:30
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=144 devtype=DISK
channel ORA_DISK_1: starting full datafile backupset
channel ORA_DISK_1: specifying datafile(s) in backupset
input datafile fno=00001 name=/u03/app/oracle/oradata/ora1024g/system01.dbf
input datafile fno=00003 name=/u03/app/oracle/oradata/ora1024g/sysaux01.dbf
input datafile fno=00005 name=/u03/app/oracle/oradata/ora1024g/example01.dbf
input datafile fno=00002 name=/u03/app/oracle/oradata/ora1024g/undotbs01.dbf
input datafile fno=00004 name=/u03/app/oracle/oradata/ora1024g/users01.dbf
channel ORA_DISK_1: starting piece 1 at 2015-03-12 18:02:31
channel ORA_DISK_1: finished piece 1 at 2015-03-12 18:03:49
piece handle=/u03/app/oracle/flash_recovery_area/ORA1024G/backupset/2015_03_12/o1_mf_nnndf_TAG20150312T180231_bj2s1vh3_.bkp tag=TAG20150312T180231 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:01:19
channel ORA_DISK_1: starting full datafile backupset
channel ORA_DISK_1: specifying datafile(s) in backupset
including current control file in backupset
including current SPFILE in backupset
channel ORA_DISK_1: starting piece 1 at 2015-03-12 18:03:53
channel ORA_DISK_1: finished piece 1 at 2015-03-12 18:03:54
piece handle=/u03/app/oracle/flash_recovery_area/ORA1024G/backupset/2015_03_12/o1_mf_ncsnf_TAG20150312T180231_bj2s49dm_.bkp tag=TAG20150312T180231 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:03
Finished backup at 2015-03-12 18:03:54
RMAN> report schema;
Report of database schema
List of Permanent Datafiles
===========================
File Size(MB) Tablespace RB segs Datafile Name
---- -------- -------------------- ------- ------------------------
1 480 SYSTEM *** /u03/app/oracle/oradata/ora1024g/system01.dbf
2 30 UNDOTBS1 *** /u03/app/oracle/oradata/ora1024g/undotbs01.dbf
3 250 SYSAUX *** /u03/app/oracle/oradata/ora1024g/sysaux01.dbf
4 5 USERS *** /u03/app/oracle/oradata/ora1024g/users01.dbf
5 100 EXAMPLE *** /u03/app/oracle/oradata/ora1024g/example01.dbf
List of Temporary Files
=======================
File Size(MB) Tablespace Maxsize(MB) Tempfile Name
---- -------- -------------------- ----------- --------------------
1 20 TEMP 32767 /u03/app/oracle/oradata/ora1024g/temp01.dbf
RMAN> exit
Recovery Manager complete.
[oracle@rhel6_lhr ~]$ rm /u03/app/oracle/oradata/ora1024g/undotbs01.dbf
[oracle@rhel6_lhr ~]$ sqlplus / as sysdba
SQL*Plus: Release 10.2.0.4.0 - Production on Thu Mar 12 18:05:00 2015
Copyright (c) 1982, 2007, Oracle. All Rights Reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> startup force;
ORACLE instance started.
Total System Global Area 448790528 bytes
Fixed Size 2084616 bytes
Variable Size 130023672 bytes
Database Buffers 310378496 bytes
Redo Buffers 6303744 bytes
Database mounted.
ORA-01157: cannot identify/lock data file 2 - see DBWR trace file
ORA-01110: data file 2: '/u03/app/oracle/oradata/ora1024g/undotbs01.dbf'
SQL> exit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
[oracle@rhel6_lhr ~]$ rman target /
Recovery Manager: Release 10.2.0.4.0 - Production on Thu Mar 12 18:05:37 2015
Copyright (c) 1982, 2007, Oracle. All rights reserved.
connected to target database: ORA1024G (DBID=2698093861, not open)
RMAN> restore tablespace undotbs1;
Starting restore at 2015-03-12 18:05:56
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=156 devtype=DISK
channel ORA_DISK_1: starting datafile backupset restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
restoring datafile 00002 to /u03/app/oracle/oradata/ora1024g/undotbs01.dbf
channel ORA_DISK_1: reading from backup piece /u03/app/oracle/flash_recovery_area/ORA1024G/backupset/2015_03_12/o1_mf_nnndf_TAG20150312T180231_bj2s1vh3_.bkp
channel ORA_DISK_1: restored backup piece 1
piece handle=/u03/app/oracle/flash_recovery_area/ORA1024G/backupset/2015_03_12/o1_mf_nnndf_TAG20150312T180231_bj2s1vh3_.bkp tag=TAG20150312T180231
channel ORA_DISK_1: restore complete, elapsed time: 00:00:06
Finished restore at 2015-03-12 18:06:03
RMAN> recover tablespace undotbs1;
Starting recover at 2015-03-12 18:06:17
using channel ORA_DISK_1
starting media recovery
media recovery complete, elapsed time: 00:00:02
Finished recover at 2015-03-12 18:06:19
RMAN> alter database open;
database opened
--注意這裡一定要讓undo線上
RMAN> sql 'alter database datafile 2 online';
using target database control file instead of recovery catalog
sql statement: alter database datafile 2 online
RMAN> exit
RMAN> report schema;
Report of database schema
List of Permanent Datafiles
===========================
File Size(MB) Tablespace RB segs Datafile Name
---- -------- -------------------- ------- ------------------------
1 480 SYSTEM *** /u03/app/oracle/oradata/ora1024g/system01.dbf
2 30 UNDOTBS1 *** /u03/app/oracle/oradata/ora1024g/undotbs01.dbf
3 250 SYSAUX *** /u03/app/oracle/oradata/ora1024g/sysaux01.dbf
4 5 USERS *** /u03/app/oracle/oradata/ora1024g/users01.dbf
5 100 EXAMPLE *** /u03/app/oracle/oradata/ora1024g/example01.dbf
List of Temporary Files
=======================
File Size(MB) Tablespace Maxsize(MB) Tempfile Name
---- -------- -------------------- ----------- --------------------
1 20 TEMP 32767 /u03/app/oracle/oradata/ora1024g/temp01.dbf
RMAN>
RMAN>
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/28628435/viewspace-1984476/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- undo表空間檔案丟失恢復(2)--無備份有redo的情況下恢復
- undo表空間檔案丟失恢復(3)--無備份無redo的情況下恢復
- undo表空間檔案丟失恢復(4)--無備份無recover的情況下恢復
- 備份與恢復系列 九 丟失表空間資料檔案的還原與恢復
- 撤消表空間資料檔案丟失的恢復.
- 備份恢復實驗(1)丟失部分控制檔案
- rman恢復--歸檔模式有備份,丟失資料檔案的恢復模式
- 歸檔模式有備份丟失資料檔案後恢復模式
- INDEX表空間檔案丟失或者損壞的恢復Index
- 備份恢復之資料檔案丟失
- UNDO 表空間檔案損壞的恢復
- 系統表空間檔案丟失無備份用控制程式碼的辦法恢復
- 【備份恢復】恢復 丟失已歸檔重做日誌檔案
- UNDO表空間資料檔案丟失處理(一)預備知識
- 【RMAN】SYSTEM表空間資料檔案丟失恢復模擬
- 【備份恢復】 丟失一個控制檔案 之恢復操作
- Oracle備份與恢復【丟失資料檔案的恢復】Oracle
- TEMP表空間的檔案丟失或損壞後的恢復
- REDO檔案丟失的恢復__沒有任何備份的情況
- 只有rman備份集,控制檔案丟失的恢復
- rman恢復--歸檔模式無備份,丟失資料檔案的恢復模式
- 恢復案例:歸檔模式下丟失非系統表空間資料檔案的恢復模式
- 【備份恢復】所有控制檔案丟失後 利用trace中的控制檔案備份執行恢復
- 系統表空間資料檔案丟失,無備份,無重啟,通過控制程式碼恢復
- 表空間不完全恢復(全備--備份控制檔案--刪除表空間andy--日誌檔案)
- 非歸檔無備份下控制檔案丟失的恢復
- 歸檔模式無備份丟失資料檔案後恢復模式
- 【備份恢復】非歸檔模式下丟失任意資料檔案 恢復操作模式
- RMAN資料庫恢復 之歸檔模式有(無)備份-丟失資料檔案的恢復資料庫模式
- 【管理篇備份恢復】rman恢復測試(一) 表空間資料檔案
- 備份與恢復--資料檔案損壞或丟失
- 【備份恢復】歸檔模式下丟失系統關鍵資料檔案 利用RMAN備份恢復模式
- 【物理熱備】(下)備份恢復系統表空間 手工備份恢復
- 恢復之丟失全部控制檔案以及備份中的控制檔案
- 無備份丟失部分資料檔案和控制檔案恢復 [轉]
- 不完全恢復(資料檔案備份--新建表空間--控制檔案備份--日誌歸檔檔案)
- dg丟失歸檔,使用rman增量備份恢復
- 利用增量備份恢復gap歸檔丟失DG