#*.log_archive_dest_1='LOCATION=+RECOVERY'
*.log_archive_dest_1='LOCATION=/u01/archivelog'
*.log_archive_format='%t_%s_%r.dbf'
*.open_cursors=300
*.pga_aggregate_target=402653184
*.processes=200
#*.remote_listener='LISTENERS_ORCL'
*.remote_login_passwordfile='exclusive'
*.sessions=225
*.sga_target=1210056704
#orcl2.thread=2
#orcl1.thread=1
*.undo_management='AUTO'
#orcl2.undo_tablespace='UNDOTBS2'
#orcl1.undo_tablespace='UNDOTBS1'
*.undo_tablespace='UNDOTBS1'
*.user_dump_dest='/u01/app/oracle/admin/orcl/udump'
4. 通过修改的pfile重新创建spfile文件
$ sqlplus /nolog
SQL> conn / as sysdba;
SQL> shutdown immediate;
SQL> create spfile from pfile;
# 重新通spfile参数启动
SQL> startup nomount;
SQL> quit
5. 恢复控制文件
说明1: 通过RMAN自动备份的参数与控制文件进行恢复,这个是标准恢复方式,在恢复过程中控制文件通常是比较新的。
说明2: 另一方式是没有自动备份的情况下,通过备份集中的控制文件进行恢复,最后的一个备份集中包含控制文件。
(1) 通过指定备份集恢复控制文件
$ rman target /
Recovery Manager: Release 10.2.0.5.0 - Production on l 7 19 12:58:26 2013
Copyright (c) 1982, 2007, Oracle. All rights reserved.
connected to target database: orcl (not mounted)
RMAN> restore controlfile from '/u01/rman_bak/data/data.ORCL.level.0.11of2jae_1_1_20130718';
Starting restore at 19-7 -13
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=211 devtype=DISK
channel ORA_DISK_1: restoring control file
channel ORA_DISK_1: restore complete, elapsed time: 00:00:01
output filename=/u01/app/oracle/oradata/orcl/control01.ctl
output filename=/u01/app/oracle/oradata/orcl/control02.ctl
output filename=/u01/app/oracle/oradata/orcl/control03.ctl
Finished restore at 19-7 -13
(2) mount数据库
RMAN>
RMAN> mount database;
database mounted
released channel: ORA_DISK_1
RMAN> quit
6. 将备份集注册进控制文件里
RMAN> catalog start with '/u01/rman_bak/data/';
searching for all files that match the pattern /u01/rman_bak/data/
List of Files Unknown to the Database
=====================================
File Name: /u01/rman_bak/data/archlog.ORCL.level.0.0rof2j8q_1_1_20130718
File Name: /u01/rman_bak/data/data.ORCL.level.0.0vof2j9v_1_1_20130718
File Name: /u01/rman_bak/data/archlog.ORCL.level.0.0sof2j8n_1_1_20130718
File Name: /u01/rman_bak/data/spfile_12of2jah_1_1_20130718
File Name: /u01/rman_bak/data/data.ORCL.level.0.11of2jae_1_1_20130718
File Name: /u01/rman_bak/data/data.ORCL.level.0.10of2j9s_1_1_20130718
File Name: /u01/rman_bak/data/archlog.ORCL.level.0.0tof2j9l_1_1_20130718
Do you really want to catalog the above files (enter YES or NO) yes
cataloging files...
cataloging done
List of Cataloged Files
=======================
File Name: /u01/rman_bak/data/archlog.ORCL.level.0.0rof2j8q_1_1_20130718
File Name: /u01/rman_bak/data/data.ORCL.level.0.0vof2j9v_1_1_20130718
File Name: /u01/rman_bak/data/archlog.ORCL.level.0.0sof2j8n_1_1_20130718
File Name: /u01/rman_bak/data/spfile_12of2jah_1_1_20130718
File Name: /u01/rman_bak/data/data.ORCL.level.0.11of2jae_1_1_20130718
File Name: /u01/rman_bak/data/data.ORCL.level.0.10of2j9s_1_1_20130718
File Name: /u01/rman_bak/data/archlog.ORCL.level.0.0tof2j9l_1_1_20130718
RMAN> quit