oracle asm 异机挂载,oracle 异机恢复 从asm到文件系统成功实例
1.1???確實(shí) 源數(shù)據(jù)庫(kù)與目標(biāo)庫(kù)版本一致
語(yǔ)句:select * from v$version;
源庫(kù):
1.2???確認(rèn)源數(shù)據(jù)庫(kù)名與目標(biāo)庫(kù)數(shù)據(jù)庫(kù)名一致
查詢數(shù)據(jù)庫(kù)名語(yǔ)句:select name fromv$database;
如果不一致通過(guò)恢復(fù)spfile文件再把spfile文件轉(zhuǎn)為為pfile文件修改數(shù)據(jù)庫(kù)名;
恢復(fù)spfile:
restore spfile from '/home/oracle/backup/spfile_20171103_0hsijpo8_1_1.bak';
根據(jù)spfile創(chuàng)建pfile:
createpfile from spfile;
1.3???查詢?cè)磶?kù)dbid
語(yǔ)句:select dbid fromv$database;
1.4???登錄sqlplus 創(chuàng)建pfile
1.5???關(guān)閉數(shù)據(jù)庫(kù)
1.6???進(jìn)入rman
1.7???由pfile啟動(dòng)數(shù)據(jù)庫(kù)到nomount狀態(tài)
語(yǔ)句:startup pfile ='$ORACLE_HOME/dbs/initauth.ora' nomount;
1.8???恢復(fù)控制文件
命令:restorecontrolfile from '/home/oracle/backup/ctl_20171109_1usj3jvs_1_1.ctl'
1.9????mount數(shù)據(jù)庫(kù)
命令: alterdatabase mount;
1.10?????重新注冊(cè)備份集
命令:catalogstart with '/home/oracle/backup/';
1.11??????恢復(fù)數(shù)據(jù)文件
腳本如下:
run{
allocate channel t1 type DISK FORMAT'/home/oracle/backup/%U';
allocate channel t2 type DISK FORMAT'/home/oracle/backup/%U';
allocate channel t3 type DISK FORMAT'/home/oracle/backup/%U';
set newname for datafile 1 to'/u01/app/oracle/oradata/AUTH/system.259.856237927';
set newname for datafile 2 to'/u01/app/oracle/oradata/AUTH/sysaux.260.856237941';
set newname for datafile 3 to'/u01/app/oracle/oradata/AUTH/undotbs1.261.856237955';
set newname for datafile 4 to'/u01/app/oracle/oradata/AUTH/undotbs2.263.856237975';
set newname for datafile 5 to'/u01/app/oracle/oradata/AUTH/users.264.856237981';
set newname for datafile 6 to'/u01/app/oracle/oradata/AUTH/auth.268.856243549';
set newname for datafile 7 to'/u01/app/oracle/oradata/AUTH/auth.269.856243795';
set newname for datafile 8 to'/u01/app/oracle/oradata/AUTH/sysaux02.dbf';
set newname for datafile 9 to'/u01/app/oracle/oradata/AUTH/system02.dbf';
restore database;
switch datafile all;
release channel t1;
release channel t2;
release channel t3;
}
等待。。。。
1.12?????recover 數(shù)據(jù)庫(kù)
腳本如下:
run {
allocate channel t1 type DISK FORMAT'/home/oracle/backup/%U';
allocate channel t2 type DISK FORMAT'/home/oracle/backup/%U';
allocate channel t3 type DISK FORMAT'/home/oracle/backup/%U';
recover database;
release channel t1;
release channel t2;
release channel t3;
}
1.12.1???????????更改數(shù)據(jù)庫(kù),歸檔日志的存檔終點(diǎn)。
刪除選中兩行
alter system setlog_archive_dest='/u01/app/oracle/oradata/arch_log';
1.13?????用resetlogs方式打開(kāi)數(shù)據(jù)庫(kù)
命令: alterdatabase open resetlogs;
1.14?????修改redo 日志文件位置:
在sqlplusz中
通過(guò) select memberfrom V$logfile;?查詢
通過(guò) alterdatabase rename file ‘原路徑’ to ‘新路徑’? 全部修改完畢
再次嘗試resetlog方式打開(kāi)數(shù)據(jù)庫(kù)
刪除 log 10;
再次嘗試resetlog方式打開(kāi)數(shù)據(jù)庫(kù)
1.15?????重建臨時(shí)表空間
由于rman備份的時(shí)候并不備temporarytablespaces,所以恢復(fù)完畢后,要重新創(chuàng)建它們。如:
$sqlplus /nolog
SQL>conn /as sysdba
SQL> altertablespace temp add tempfile '/u01/app/oracle/oradata/AUTH/temp01.dbf' size1024m;
總結(jié)
以上是生活随笔為你收集整理的oracle asm 异机挂载,oracle 异机恢复 从asm到文件系统成功实例的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。
- 上一篇: oracle xml文件是什么文件,介绍
- 下一篇: 苹果ios鸿蒙,苹果iOS界面一直都很美