前提:
1.连接到catalog数据库
1.连接catalog目录
[oracle@bonda1 dbs]$ rman target / catalog rman/rman@catalog
Recovery Manager: Release 11.2.0.4.0 - Production on Sun Sep 9 09:37:45 2018
Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.
connected to target database (not started)
connected to recovery catalog database
2.启动到nomount状态
RMAN> startup nomount
startup failed: ORA-01078: failure in processing system parameters
LRM-00109: could not open parameter file '/u01/app/oracle/product/11.2.0/db_1/dbs/initocp.ora'starting Oracle instance without parameter file for retrieval of spfile
Oracle instance startedTotal System Global Area 1068937216 bytes
Fixed Size 2260088 bytes
Variable Size 281019272 bytesDatabase Buffers 780140544 bytesRedo Buffers 5517312 bytes
3.恢复参数文件
RMAN> restore spfile;
Starting restore at 09-SEP-18
allocated channel: ORA_DISK_1channel ORA_DISK_1: SID=171 device type=DISKchannel ORA_DISK_1: starting datafile backup set restore
channel ORA_DISK_1: restoring SPFILEoutput file name=/u01/app/oracle/product/11.2.0/db_1/dbs/spfileocp.orachannel ORA_DISK_1: reading from backup piece /u01/testc-2866727024-20180909-01channel ORA_DISK_1: piece handle=/u01/testc-2866727024-20180909-01 tag=TAG20180909T065517channel ORA_DISK_1: restored backup piece 1channel ORA_DISK_1: restore complete, elapsed time: 00:00:01Finished restore at 09-SEP-18
4.打开数据库
RMAN> startup force
Oracle instance started
database mounteddatabase opened