溫馨提示×

溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊×
其他方式登錄
點擊 登錄注冊 即表示同意《億速云用戶服務條款》

rman怎么恢復spfile

發布時間:2021-11-12 14:26:58 來源:億速云 閱讀:179 作者:柒染 欄目:關系型數據庫

rman怎么恢復spfile,相信很多沒有經驗的人對此束手無策,為此本文總結了問題出現的原因和解決方法,通過這篇文章希望你能解決這個問題。

實驗準備

OGG (DBID=3068169019)

spfile:/u01/app/oracle/fast_recovery_area/OGG/backupset/2018_03_26/o1_mf_ncsnf_TAG20180326T162759_fckd47yp_.bkp

我們分兩種情況

1.不知道DBID,知道備份路徑

2.知道DBID

(1).模擬刪除spfile

[oracle@ogg-80 dbs]$ cd /u01/app/oracle/product/11.2.0/dbhome_1/dbs

[oracle@ogg-80 dbs]$ mv spfileogg.ora spfileogg.ora.bak

(2).啟動數據庫報錯

SYS@ogg> startup force;

ORA-01078: failure in processing system parameters

LRM-00109: could not open parameter file '/u01/app/oracle/product/11.2.0/dbhome_1/dbs/initogg.ora'

針對第一種情況

1.不知道DBID,知道備份路徑

[oracle@ogg-80 ~]$ rman target /

RMAN> startup nomount;  ------啟動到mount

startup failed: ORA-01078: failure in processing system parameters

LRM-00109: could not open parameter file '/u01/app/oracle/product/11.2.0/dbhome_1/dbs/initogg.ora'

starting Oracle instance without parameter file for retrieval of spfile

Oracle instance started

Total System Global Area    1068937216 bytes

Fixed Size                     2260088 bytes

Variable Size                281019272 bytes

Database Buffers             780140544 bytes

Redo Buffers                   5517312 bytes

RMAN> restore spfile to '/u01/app/oracle/product/11.2.0/dbhome_1/dbs/spfileogg.ora' from '/u01/app/oracle/fast_recovery_area/OGG/backupset/2018_03_26/o1_mf_ncsnf_TAG20180326T162759_fckd47yp_.bkp';

Starting restore at 26-MAR-18

using channel ORA_DISK_1

channel ORA_DISK_1: restoring spfile from AUTOBACKUP /u01/app/oracle/fast_recovery_area/OGG/backupset/2018_03_26/o1_mf_ncsnf_TAG20180326T162759_fckd47yp_.bkp

channel ORA_DISK_1: SPFILE restore from AUTOBACKUP complete

Finished restore at 26-MAR-18

針對第二種情況

2.知道DBID

[oracle@ogg-80 ~]$ rman target /

RMAN> set dbid=3068169019

executing command: SET DBID

RMAN> startup nomount;

startup failed: ORA-01078: failure in processing system parameters

LRM-00109: could not open parameter file '/u01/app/oracle/product/11.2.0/dbhome_1/dbs/initogg.ora'

starting Oracle instance without parameter file for retrieval of spfile

Oracle instance started

Total System Global Area    1068937216 bytes

Fixed Size                     2260088 bytes

Variable Size                281019272 bytes

Database Buffers             780140544 bytes

Redo Buffers                   5517312 bytes

方法一:利用自動備份

RMAN> restore  spfile from autobackup;

自動備份這里會報錯,因為我們沒有設置自動備份

方法二:利用手動備份

RMAN> restore spfile to '/u01/app/oracle/product/11.2.0/dbhome_1/dbs/spfileogg.ora' from '/u01/app/oracle/fast_recovery_area/OGG/backupset/2018_03_26/o1_mf_ncsnf_TAG20180326T162759_fckd47yp_.bkp';

看完上述內容,你們掌握rman怎么恢復spfile的方法了嗎?如果還想學到更多技能或想了解更多相關內容,歡迎關注億速云行業資訊頻道,感謝各位的閱讀!

向AI問一下細節

免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。

AI

亚洲午夜精品一区二区_中文无码日韩欧免_久久香蕉精品视频_欧美主播一区二区三区美女