源庫 | 目標庫 | |
---|---|---|
操做系統 | WIN7 | WIN SVR 2012 R2 |
IP | x.x.x.216 | x.x.x.112 |
數據庫版本 | 10.2.0.4.0 - 64bi | 10.2.0.4.0 - 64bi |
存儲方式 | 單實例 | 單實例 |
ORACLE_HOME | D:\oracle\product\10.2.0\db_1 | D:\oracle\product\10.2.0\db_1 |
ORACLE_SID | ORCL | ORCL |
驗證結果java
rman target / sql'alter system switch logfile'; sql'alter system checkpoint'; shutdown immediate; startup mount;
sqlplus / as sysdba select dbid from v$database;
run{ allocate channel d1 type disk; allocate channel d2 type disk; backup as compressed backupset database; release channel d1; release channel d2; report obsolete; crosscheck backup; delete noprompt expired backup; delete noprompt obsolete; }
backup spfile; backup current controlfile;
db_name=ORCL java_pool_size=4194304 large_pool_size=4194304 shared_pool_size=96468992
startup pfile='D:\oracle\product\10.2.0\db_1\database\FAKESPFILEORCL.ORA' nomount;
set dbid=1526707455;
restore spfile from 'D:\oracle\product\10.2.0\flash_recovery_area\ORCL\BACKUPSET\2019_01_30\O1_MF_NNSNF_TAG20190130T171134_G52TL81Y_.BKP';
shutdown immediate; startup nomount;
restore controlfile from 'D:\oracle\product\10.2.0\flash_recovery_area\ORCL\BACKUPSET\2019_01_30\O1_MF_NCNNF_TAG20190130T171148_G52TLNS2_.BKP';
shutdown immediate; startup mount;
report schema;
run{ set newname for datafile 8 to 'D:\ORACLEDATA1\INFO_LOB'; restore database; switch datafile all; }
alter database open resetlogs;
select sid,SERIAL# ,CONTEXT,SOFAR,TOTALWORK,round(SOFAR/TOTALWORK*100,2) "_%" from v$session_longops where OPNAME like 'RMAN%' and SOFAR<>TOTALWORK and TOTALWORK<>0;