自拍偷在线精品自拍偷,亚洲欧美中文日韩v在线观看不卡

Oracle數(shù)據(jù)庫(kù)RMAN恢復(fù)之表空間和數(shù)據(jù)塊介質(zhì)的恢復(fù)

數(shù)據(jù)庫(kù) Oracle
本文我們主要介紹了Oracle數(shù)據(jù)庫(kù)RMAN恢復(fù)之表空間和數(shù)據(jù)塊介質(zhì)的恢復(fù)方法,并以實(shí)際的示例對(duì)其加以說(shuō)明,希望能夠?qū)δ兴鶐椭?/div>

之前我們介紹過(guò):Oracle數(shù)據(jù)庫(kù)RMAN恢復(fù)之?dāng)?shù)據(jù)文件的恢復(fù)詳解,本文我們介紹一下Oracle數(shù)據(jù)庫(kù)REMAN恢復(fù)之表空間數(shù)據(jù)塊介質(zhì)的恢復(fù),接下來(lái)我們就開(kāi)始介紹一下這部分內(nèi)容,首先我們先介紹一下恢復(fù)非系統(tǒng)表空間的示例。

示例一:表空間的數(shù)據(jù)文件被誤刪除

open狀態(tài)下刪除表空間對(duì)應(yīng)的所有數(shù)據(jù)文件。

在open狀態(tài)下使用alter tablespace ... offline for recover 脫機(jī)表空間。

使用restore tablespace ...轉(zhuǎn)儲(chǔ)表空間所有的數(shù)據(jù)文件。

使用recover tablespace ...應(yīng)用歸檔日志。

最后使用alter tablespace ... online使表空間聯(lián)機(jī)。

--open狀態(tài)下刪除表空間對(duì)應(yīng)的所有數(shù)據(jù)文件。   

[oracle@localhost ~]$ rm /oracle/10g/oracle/product/10.2.0/oradatabak/users01.dbf;  

--恢復(fù)表空間   

  1. [oracle@localhost ~]$ rman target sys/oracle@oralife nocatalog     
  2. RMAN> run {    
  3. 2> sql 'alter tablespace users offline for recover';    
  4. 3> restore tablespace users;    
  5. 4> recover tablespace users;    
  6. 5> sql 'alter tablespace users online';    
  7. 6> }   

示例二:表空間的數(shù)據(jù)文件所在磁盤出現(xiàn)故障

open狀態(tài)下刪除表空間對(duì)應(yīng)的所有數(shù)據(jù)文件。

在open狀態(tài)下使用alter tablespace ... offline for recover 脫機(jī)表空間。

執(zhí)行set newname為數(shù)據(jù)文件指定新的位置。

使用restore tablespace ...轉(zhuǎn)儲(chǔ)表空間所有的數(shù)據(jù)文件。

執(zhí)行switch datafile改變控制文件中數(shù)據(jù)文件位置和名稱。

使用recover tablespace ...應(yīng)用歸檔日志。

最后使用alter tablespace ... online使表空間聯(lián)機(jī)。

--open狀態(tài)下刪除表空間對(duì)應(yīng)的所有數(shù)據(jù)文件。   

  1. [oracle@localhost ~]$ rm /oracle/10g/oracle/product/10.2.0/oradatabak/users01.dbf;    
  2. SQL> select * from t_user;    
  3. select * from t_user    
  4. *    
  5. ERROR at line 1:    
  6. ORA-00376: file 4 cannot be read at this time    
  7. ORA-01110: data file 4:    
  8. '/oracle/10g/oracle/product/10.2.0/oradatabak/users01.dbf'    
  9. SQL> select file#,error from v$recover_file;    
  10. FILE# ERROR    
  11. ---------- -----------------------------------------------------------------     
  12. 4 FILE NOT FOUND    
  13. --恢復(fù)表空間     
  14. [oracle@localhost ~]$ rman target sys/oracle@oralife nocatalog    
  15. run {    
  16. sql 'alter tablespace users offline for recover';    
  17. set newname for datafile 4 to '$ORACLE_BASE/product/10.2.0/oradata/oralife/user01.dbf';    
  18. restore tablespace users;    
  19. switch datafile all;    
  20. recover tablespace users;    
  21. sql 'alter tablespace users online';    
  22. }    
  23. --已恢復(fù)     
  24. SQL> select * from t_user;    
  25. TEXT    
  26. --------------------     
  27. java_    
  28. SQL> select name from v$datafile where file# = 4;    
  29. NAME    
  30. --------------------------------------------------------------------------------     
  31. /oracle/10g/oracle/product/10.2.0/oradata/oralife/user01.dbf 

數(shù)據(jù)塊介質(zhì)恢復(fù)

如果數(shù)據(jù)文件部分?jǐn)?shù)據(jù)塊出現(xiàn)損壞,可以使用blockrecover 命令恢復(fù)損壞數(shù)據(jù)塊。

如:

  1. RMAN> blockrecover device type disk   
  2. 2>datafile 5 block 2,7,88; 

關(guān)于Oracle數(shù)據(jù)庫(kù)RMAN恢復(fù)之表空間和數(shù)據(jù)塊介質(zhì)的恢復(fù)方法就介紹到這里了,希望本次的介紹能夠?qū)δ兴鶐椭?/p>

【編輯推薦】

  1. Oracle數(shù)據(jù)庫(kù)PL/SQL快捷鍵設(shè)置詳解
  2. Oracle數(shù)據(jù)庫(kù)診斷工具RDA的安裝與使用詳解
  3. Oracle數(shù)據(jù)庫(kù)GLOBAL_NAMES參數(shù)的詳細(xì)研究
  4. Oracle數(shù)據(jù)庫(kù)歸檔模式的切換及其相關(guān)操作詳解
  5. Oracle 10g UNDO表空間過(guò)大導(dǎo)致磁盤空間不足的解決
責(zé)任編輯:趙鵬 來(lái)源: CSDN博客
相關(guān)推薦

2011-08-23 11:09:36

Oraclerman恢復(fù)system表空間恢復(fù)

2011-08-29 16:41:14

OracleRMAN恢復(fù)數(shù)據(jù)文件的恢復(fù)

2011-08-30 09:50:22

OracleRMAN不完全恢復(fù)基于SCN恢復(fù)

2011-08-30 09:35:10

OracleRMAN不完全恢復(fù)基于時(shí)間恢復(fù)

2011-08-30 10:02:18

OracleRMAN不完全恢復(fù)基于日志序列號(hào)恢復(fù)

2010-03-31 10:39:40

RMANOracle

2009-05-15 13:43:30

Oracle數(shù)據(jù)塊損壞數(shù)據(jù)塊恢復(fù)

2011-03-25 10:26:34

Oracle數(shù)據(jù)庫(kù)管理表空間

2009-11-20 13:29:59

Oracle數(shù)據(jù)庫(kù)恢復(fù)

2011-05-26 09:36:07

Oracle數(shù)據(jù)庫(kù)Redo故障

2011-02-28 13:31:17

Oracle數(shù)據(jù)庫(kù)

2011-05-11 13:25:57

Oracle數(shù)據(jù)庫(kù)后備恢復(fù)

2009-10-23 15:30:17

Oracle表空間恢復(fù)

2011-03-24 17:21:42

Oracle數(shù)據(jù)庫(kù)Redo故障

2009-11-18 09:39:06

Oracle介質(zhì)恢復(fù)

2011-08-03 18:42:21

Oracle數(shù)據(jù)庫(kù)重做日志

2011-03-04 14:59:16

Raidoracle數(shù)據(jù)庫(kù)

2011-05-26 10:01:16

Oracle數(shù)據(jù)庫(kù)ODU

2011-04-12 15:44:08

Oracle數(shù)據(jù)庫(kù)

2010-04-12 10:40:49

Oracle數(shù)據(jù)庫(kù)
點(diǎn)贊
收藏

51CTO技術(shù)棧公眾號(hào)