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

Oracle數(shù)據(jù)庫(kù)rman恢復(fù)之system表空間恢復(fù)詳解

數(shù)據(jù)庫(kù) Oracle
本文我們主要介紹了Oracle數(shù)據(jù)庫(kù)rman恢復(fù)之system表空間恢復(fù)的過(guò)程,并給出了兩個(gè)示例來(lái)詳細(xì)地描述了rman恢復(fù)system表空間的方法,希望能夠?qū)δ兴鶐椭?/div>

Oracle數(shù)據(jù)庫(kù)rman恢復(fù)system表空間恢復(fù)是本文我們主要要介紹的內(nèi)容,system表空間存放著數(shù)據(jù)字典的信息。當(dāng)數(shù)據(jù)庫(kù)處于open狀態(tài),如果system表空間所對(duì)應(yīng)的數(shù)據(jù)文件出現(xiàn)介質(zhì)失敗,那么當(dāng)在其數(shù)據(jù)文件上執(zhí)行I/O操作時(shí),數(shù)據(jù)庫(kù)會(huì)自動(dòng)關(guān)閉;當(dāng)數(shù)據(jù)庫(kù)處于關(guān)閉狀態(tài)時(shí),如果system表空間所對(duì)應(yīng)的數(shù)據(jù)文件出現(xiàn)介質(zhì)失敗,數(shù)據(jù)庫(kù)將不能打開(kāi)。恢復(fù)system表空間必須在mount狀態(tài)下進(jìn)行。

示例一:system表空間的數(shù)據(jù)文件被誤刪除備份數(shù)據(jù)庫(kù)。

刪除system表空間對(duì)應(yīng)的數(shù)據(jù)文件。啟動(dòng)數(shù)據(jù)庫(kù)到mount狀態(tài)。使用restore datafile轉(zhuǎn)儲(chǔ)數(shù)據(jù)文件,并使用recover datafile命令應(yīng)用歸檔日志,***使用alter database open打開(kāi)數(shù)據(jù)庫(kù)。

--備份數(shù)據(jù)庫(kù)(略)   

--刪除system表空間對(duì)應(yīng)的數(shù)據(jù)文件   

  1. RMAN> host rm $ORACLE_BASE/product/10.2.0/oradatabak/system01.dbf    
  2. RMAN> startup    
  3. connected to target database (not started)    
  4. Oracle instance started    
  5. database mounted    
  6. RMAN-00571: ===========================================================    
  7. RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============    
  8. RMAN-00571: ===========================================================    
  9. RMAN-03002: failure of startup command at 08/22/2011 21:56:39    
  10. ORA-01157: cannot identify/lock data file 1 - see DBWR trace file    
  11. ORA-01110: data file 1: '/oracle/10g/oracle/product/10.2.0/oradatabak/system01.dbf'    
  12. SQL> select file#,error from v$recover_file;    
  13. FILE# ERROR    
  14. ---------- -----------------------------------------------------------------     
  15. 1 FILE NOT FOUND    
  16. SQL> select file#,name from v$datafile where file#=1;    
  17. FILE# NAME    
  18. ---------- ------------------------------------------------------------------------------------------------------------------------     
  19. 1 /oracle/10g/oracle/product/10.2.0/oradatabak/system01.dbf   

--啟動(dòng)數(shù)據(jù)庫(kù)到mount狀態(tài)并進(jìn)行恢復(fù)   

  1. RMAN> run {    
  2. 2> startup force mount;    
  3. 3> restore datafile 1;    
  4. 4> recover datafile 1;    
  5. 5> sql 'alter database open';    
  6. 6> }   

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

備份數(shù)據(jù)庫(kù)(略)刪除system表空間對(duì)應(yīng)的數(shù)據(jù)文件。啟動(dòng)數(shù)據(jù)庫(kù)到mount狀態(tài)。在restore database之前,執(zhí)行set newname為數(shù)據(jù)文件指定新的位置。在restore database之后,執(zhí)行switch datafile改變控制文件中數(shù)據(jù)文件位置和名稱(chēng)。之后通過(guò)執(zhí)行recover database應(yīng)用歸檔日志。***執(zhí)行alter database open打開(kāi)數(shù)據(jù)庫(kù)。

--備份數(shù)據(jù)庫(kù)(略)   

--刪除system表空間對(duì)應(yīng)的數(shù)據(jù)文件   

  1. RMAN> host 'rm /oracle/10g/oracle/product/10.2.0/oradatabak/system01.dbf'    
  2. 2> ;   

--啟動(dòng)數(shù)據(jù)庫(kù)到mount狀態(tài)并進(jìn)行恢復(fù)(為數(shù)據(jù)文件指定新位置,轉(zhuǎn)儲(chǔ)數(shù)據(jù)文件,恢復(fù)數(shù)據(jù)文件,打開(kāi)數(shù)據(jù)庫(kù))   

  1. RMAN> run {    
  2. 2> startup force mount;    
  3. 3> set newname for datafile 1 to '/oracle/10g/oracle/product/10.2.0/oradata/oralife/system01.dbf';    
  4. 4> restore datafile 1;    
  5. 5> switch datafile 1;    
  6. 6> recover datafile 1;    
  7. 7> sql 'alter database open';    
  8. 8> }   

關(guān)于Oracle數(shù)據(jù)庫(kù)rman恢復(fù)之system表空間恢復(fù)的相關(guān)知識(shí)就介紹到這里了,希望本次的介紹能夠?qū)δ兴斋@!

【編輯推薦】

  1. SSIS工程師為您揭秘SQL Server數(shù)據(jù)流
  2. SQL Server 2008 MDX學(xué)習(xí)筆記之理解元數(shù)組
  3. SQL Server數(shù)據(jù)庫(kù)DataRelation的應(yīng)用示例詳解
  4. SQL Server 2005/2008中的CTE應(yīng)用之遞歸查詢(xún)
  5. SQL Server 2008數(shù)據(jù)庫(kù)學(xué)習(xí)筆記之MDX查詢(xún)示例
責(zé)任編輯:趙鵬 來(lái)源: CSDN博客
相關(guān)推薦

2011-08-29 17:00:47

Oracle數(shù)據(jù)庫(kù)RM表空間數(shù)據(jù)塊介質(zhì)

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ù)

2010-03-31 10:39:40

RMANOracle

2011-08-30 10:02:18

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

2009-10-23 15:30:17

Oracle表空間恢復(fù)

2011-04-11 13:46:17

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

2019-06-12 08:57:43

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

2009-11-20 13:29:59

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

2011-02-28 13:31:17

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

2011-05-26 09:36:07

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

2011-08-15 23:14:34

Oraclerman環(huán)境配置

2011-08-03 18:42:21

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

2011-03-04 14:59:16

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

2009-04-03 10:54:49

Oracle備份恢復(fù)

2011-03-24 17:21:42

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

2011-05-11 13:25:57

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

2015-10-29 15:06:36

DB2重定向恢復(fù)數(shù)據(jù)

2011-05-26 10:01:16

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

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