Environment:
Source environment: System LINUX-32 Oracle: 10.2.0.4
Target environment: System LINUX-64 ORACLE: 10.2.0.4
Preparations: COPY controlfile and spfile backup set. Full database backup set. Archivelog backup set.
I. restore SPFILE
Use RMAN to access other instances to restore the spfile.
RMAN> restore spfile to '/u01/MICSPROD. spfile' from'/u01/MICSPRODBAK/2012_09_06/o1_mf_s_793317938_84kcflvf _. bkp ';
Based on the recovered SPFILE, run the strings command in LINUX, copy it to vi, comment out the controlfile, and edit it to PFILE.
SQL> startup nomount pfile = '/u01/MICSPROD. pfile ';
SQL> create spfile from pfile = '/u01/MICSPROD. pfile ';
SQL> shutdown immediate
SQL> startup nomount
Ii. restore controlfile
[Oracle @ micsgmm ~] $ Rman target/
RMAN> restore controlfile from '/u01/MICSPRODBAK/2012_09_06/o1_mf_s_793317938_84kcflvf _. bkp ';
SQL> alter database mount;
SQL> show parameter control
NAME TYPE VALUE
-----------------------------------------------------------------------------
Control_file_record_keep_time integer 7
Control_files string/u01/app/oracle/oradata/MICSPR
OD/controlfile/o1_mf_85lf9xxp _
. Ctl,/u01/app/oracle/flash_re
Covery_area/MICSPROD/controlfi
Le/o1_mf_85lf9yjz _. ctl
3. restore datafiles
Because the backup set and target have different paths, you must register the backup set and the path strength after the specified recovery.
RMAN> catalog start with '/u01/MICSPRODBAK/2012_09_06_1/o1_mf_nnnd0_LEVEL0_060912_84k09py2 _. bkp'; (register a backup set)
(Specify the path strength after recovery)
RUN
{Set newname for datafile 1 to '/u01/app/oracle/oradata/MICSPROD/datafile/o1_mf_system_4s1qt2g2 _. dbf ';
Set newname for datafile 2 to '/u01/app/oracle/oradata/MICSPROD/datafile/o1_mf_undotbs1_4s1qt2jf _. dbf ';
Set newname for datafile 3 to '/u01/app/oracle/oradata/MICSPROD/datafile/o1_mf_sysaux_4s1qt2g7 _. dbf ';
Set newname for datafile 4 to '/u01/app/oracle/oradata/MICSPROD/datafile/o1_mf_users_4s1qt2jn _. dbf ';
Set newname for datafile 5 to '/u01/app/oracle/oradata/MICSPROD/datafile/o1_mf_tbsp_emp_4swx1w4s _. dbf ';
Set newname for datafile 6 to '/u01/app/oracle/oradata/MICSPROD/datafile/o1_mf_tbsp_ttk_4swx1wp0 _. dbf ';
Set newname for datafile 7 to '/u01/app/oracle/oradata/MICSPROD/datafile/o1_mf_tbsp_pre_4swx1xh0 _. dbf ';
Set newname for datafile 8 to '/u01/app/oracle/oradata/MICSPROD/datafile/o1_mf_tbsp_enr_4swx1yk8 _. dbf ';
Set newname for datafile 9 to '/u01/app/oracle/oradata/MICSPROD/datafile/o1_mf_tbsp_cla_4swx1zcf _. dbf ';
Set newname for datafile 10 to '/u01/app/oracle/oradata/MICSPROD/datafile/o1_mf_tbsp_fin_4swx212s _. dbf ';
Set newname for datafile 11 to '/u01/app/oracle/oradata/MICSPROD/datafile/o1_mf_tbsp_sta_4swx21vr _. dbf ';
Set newname for datafile 12 to '/u01/app/oracle/oradata/MICSPROD/datafile/o1_mf_tbsp_cla_4swx2305 _. dbf ';
Set newname for datafile 13 to '/u01/app/oracle/oradata/MICSPROD/datafile/o1_mf_tbsp_ind_4swx24gn _. dbf ';
Set newname for datafile 14 to '/u01/app/oracle/oradata/MICSPROD/datafile/o1_mf_tbsp_cal_4swx25q9 _. dbf ';
Set newname for datafile 15 to '/u01/app/oracle/oradata/MICSPROD/datafile/o1_mf_tbsp_xml_4swx29t3 _. dbf ';
Set newname for datafile 16 to '/u01/app/oracle/oradata/MICSPROD/datafile/o1_mf_tbsp_ttk_4swx2bxy _. dbf ';
Set newname for datafile 17 to '/u01/app/oracle/oradata/MICSPROD/datafile/o1_mf_tbsp_med_4swx2d7r _. dbf ';
Set newname for datafile 18 to '/u01/app/oracle/oradata/MICSPROD/datafile/o1_mf_tbsp_mic_56tddh9m _. dbf ';
Restore database;
Switch datafile all; -- modify the path strength of the Control File
}