环境:
数据库版本:10201
1.源端数据库:oracle 10g RAC ASM datbase
2.目标数据库:oracle 10g single datbase
1参数文件的恢复
1.1.恢复参数文件
[oracle@ora10g ~]$ rman target /
Recovery Manager: Release 10.2.0.1.0 - Production on Mon Mar 11 00:17:30 2013
Copyright (c) 1982, 2005, Oracle. All rights reserved.
connected to target database (not started)
RMAN> startup nomount;
startup failed: ORA-01078: failure in processing system parameters
LRM-00109: could not open parameter file '/u01/oracle/product/10.2/dbs/initoradb.ora'
starting Oracle instance without parameter file for retrival of spfile
Oracle instance started
Total System Global Area 159383552 bytes
Fixed Size 1218244 bytes
Variable Size 58722620 bytes
Database Buffers 92274688 bytes
Redo Buffers 7168000 bytes
RMAN> restore spfile to pfile "/u01/oracle/yd.ora" from "/u01/rmanbak/c-2562551067-20130310-00";
Starting restore at 11-MAR-13
using channel ORA_DISK_1
channel ORA_DISK_1: autobackup found: /u01/rmanbak/c-2562551067-20130310-00
channel ORA_DISK_1: SPFILE restore from autobackup complete
Finished restore at 11-MAR-13
RMAN>
1.2.修改参数文件
more yd.ora
*.audit_file_dest='/u01/oracle/admin/oradb/adump'
*.background_dump_dest='/u01/oracle/admin/oradb/bdump'
*.compatible='10.2.0.1.0'
*.control_files='/u01/oracle/oradata/oradb/control01.ctl','/u01/oracle/oradata/oradb/control02.ctl','/u01/oracle/o
radata/oradb/control03.ctl'
*.core_dump_dest='/u01/oracle/admin/oradb/cdump'
*.db_block_size=8192
*.db_domain=''
*.db_file_multiblock_read_count=16
*.db_name='oradb'
*.job_queue_processes=10
*.open_cursors=300
*.pga_aggregate_target=54371840
*.processes=150
*.remote_login_passwordfile='exclusive'
*.sga_target=185212672
*.undo_management='AUTO'
*.undo_tablespace='UNDOTBS1'
*.user_dump_dest='/u01/oracle/admin/oradb/udump'
1.3.创建相关目录
[oracle@ora10g admin]$ mkdir -p /u01/oracle/admin/oradb/udump
[oracle@ora10g admin]$ mkdir -p /u01/oracle/admin/oradb/cdump
[oracle@ora10g admin]$ mkdir -p /u01/oracle/admin/oradb/bdump
[oracle@ora10g admin]$ mkdir -p /u01/oracle/admin/oradb/adump
[oracle@ora10g admin]$ mkdir -p /u01/oracle/admin/oradb/pfile
[oracle@ora10g admin]$ mkdir -p /u01/oracle/oradb
1.4.创建spfile文件
[oracle@ora10g oracle]$ sqlplus "/as sysdba"
SQL*Plus: Release 10.2.0.1.0 - Production on Mon Mar 11 00:25:10 2013
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
SQL> create spfile from pfile='/u01/oracle/yd.ora';
File created.
SQL>
SQL> create pfile from spfile;
File created.
SQL>
2.恢复控制文件
2.1.从备份集中恢复controlfile
[oracle@ora10g oracle]$ sqlplus "/as sysdba"
SQL*Plus: Release 10.2.0.1.0 - Production on Mon Mar 11 00:26:12 2013
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to an idle instance.
SQL> startup nomount;
ORACLE instance started.
Total System Global Area 188743680 bytes
Fixed Size 1218412 bytes
Variable Size 62916756 bytes
Database Buffers 117440512 bytes
Redo Buffers 7168000 bytes
SQL>
SQL>
oracle@ora10g ~]$ rman target /
Recovery Manager: Release 10.2.0.1.0 - Production on Mon Mar 11 00:26:36 2013
Copyright (c) 1982, 2005, Oracle. All rights reserved.
connected to target database: oradb (not mounted)
RMAN> set dbid=2562551067
executing command: SET DBID
RMAN>
restore controlfile from '/u01/rmanbak/c-2562551067-20130310-00';
RMAN> restore controlfile from '/u01/rmanbak/c-2562551067-20130310-00';
Starting restore at 11-MAR-13
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel