FILE_ID FILE_NAME
---------- --------------------------------------------------
1 /u01/oradata/orcl/temp01.dbf
二. Auxiliary库准备工作:
由于我是在同一台机器上做测试,所以将所有target库相关的文件全部清除。
SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
[oracle@rhel133 orcl]$ ls
control01.ctl control02.ctl control03.ctl redo01.log redo02.log redo03.log temp01.dbf
[oracle@rhel133 orcl]$ pwd
/u01/oradata/orcl
[oracle@rhel133 orcl]$ rm -rf *
[oracle@rhel133 orcl]$ cd /u02/oradata/orcl/
[oracle@rhel133 orcl]$ ls
DEALSPACE_001.dbf DTSPACE_001.dbf RCFSPACE_001.dbf sysaux01.dbf undotbs01.dbf
DEALSPACE_002.dbf l5mspace01.dbf RCFSPACE_002.dbf system01.dbf
[oracle@rhel133 orcl]$ rm *
[oracle@rhel133 dbs]$ ls
cntrlorcl.dbf hc_orcl.dat initorcl.ora lkDUMMY lkORCL snapcf_orcl.f spfileorcl.ora
[oracle@rhel133 dbs]$ rm *
1. 创建口令文件
[oracle@rhel133 dbs]$ orapwd file= /dbs/orapworcl password=oracle
2. 创建相关的目录
[oracle@rhel133 u01]$ mkdir oradata
[oracle@rhel133 oradata]$ pwd
/u01/oradata
3. 创建初始化参数
[oracle@rhel133 dbs]$ export ORACLE_SID=orcl
[oracle@rhel133 dbs]$ rman target /
Recovery Manager: Release 10.2.0.4.0 - Production on Tue Apr 9 15:01:01 2013
Copyright (c) 1982, 2007,
Oracle. All rights reserved.
connected to target database (not started)
RMAN> startup nomount;
Oracle instance started
Total System Global Area 1224736768 bytes
Fixed Size 1266416 bytes
Variable Size 683674896 bytes
Database Buffers 524288000 bytes
Redo Buffers 15507456 bytes
RMAN> restore spfile to pfile '/u01/app/oracle/product/10201/dbs/initorcl.ora' from '/u03/RMAN/ORCL_spfile_0so6lccp_1_1_20130409';
Starting restore at 09-APR-13
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=541 devtype=DISK
channel ORA_DISK_1: autobackup found: /u03/RMAN/ORCL_spfile_0so6lccp_1_1_20130409
channel ORA_DISK_1: SPFILE restore from autobackup complete
Finished restore at 09-APR-13
4. 将用pfile将Auxiliary库启动到nomout 状态
SQL> startup nomount pfile= /dbs/initorcl.ora
ORACLE instance started.
Total System Global Area 1325400064 bytes
Fixed Size 1267236 bytes
Variable Size 1256196572 bytes
Database Buffers 52428800 bytes
Redo Buffers 15507456 bytes
5. 恢复控制文件
RMAN> restore controlfile from '/u03/RMAN/auto_c_c-1230508166-20130409-04';
Starting restore at 09-APR-13
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=101 devtype=DISK
channel ORA_DISK_1: restoring control file
channel ORA_DISK_1: restore complete, elapsed time: 00:00:02
output filename=/u01/oradata/orcl/control01.ctl
output filename=/u01/oradata/orcl/control02.ctl
output filename=/u01/oradata/orcl/control03.ctl
Finished restore at 09-APR-13
6. 将DB 启动到