您好,登錄后才能下訂單哦!
mkdir -p /u01/app/oracle/admin/hk/{adump,bdump,cdump,dpdump,udump,pfile}
mkdir -p /u01/app/oracle/oradata/hk
mkdir -p /u01/app/oracle/fast_recovery_area/hk
echo 'db_name=hk' > $ORACLE_HOME/dbs/inithk.ora
more $ORACLE_HOME/dbs/inithk.ora
export ORACLE_SID=hk
rman target /
set dbid 3515046639 --原始數據庫dbid
startup nomount; --啟動到nomount
-----恢復spfile文件
restore spfile from '/u01/app/oracle/oradata/hk/hk_spfile_81t2a2gm_1_1.bak';
startup nomount force;-----重啟實例到nomount狀態
查看spfile文件中控制文件路徑,并創建或者如下
restore controlfile from '/u01/app/oracle/oradata/hk/hk_Controlfile_c-3278571708-20180506-01';
ORA-19870: error while restoring backup piece /u01/app/oracle/oradata/hk/hk_Controlfile_c-3278571708-20180506-01
ORA-19504: failed to create file "/oradata/hk/control01.ctl"
ORA-27040: file create error, unable to create file
Linux-x86_64 Error: 2: No such file or directory
mkdir -p /oradata/hk
restore controlfile from '/u01/app/oracle/oradata/hk/hk_Controlfile_c-3278571708-20180506-01';
alter database mount;啟動實例到mount狀態
restore database; //還原數據文件
channel ORA_DISK_1: ORA-19870: error while restoring backup piece /backup/database/hk_full_6mt1jcvt_1_1
ORA-19505: failed to identify file "/backup/database/hk_full_6mt1jcvt_1_1"
ORA-27037: unable to obtain file status
-------檢查/backup/database權限和路徑,
restore database;
recover database;
archived log thread=1 sequence=1735
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of recover command at 05/07/2018 01:02:08
RMAN-06054: media recovery requesting unknown archived log for thread 1 with sequence 1735 and starting SCN of 34275591
recover database until scn 34275591;
alter database open resetlogs;------至此恢復完畢
RMAN> quit
驗證:
sqlplus / as sysdba
select name,OPEN_MODE from v$database;
免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。