从RAC恢复到单实例数据库操作步骤(二)

2014-11-24 17:02:13 · 作者: · 浏览: 1
stance_number=2
csora1.instance_number=1
csora2.local_listener='LISTENER_CSORA2'
csora1.local_listener='LISTENER_CSORA1'
*.log_archive_dest_1='location=+DG1/'
*.log_archive_format='%t_%s_%r.arch'
*.memory_max_target=12884901888
*.memory_target=12884901888
*.open_cursors=300
*.optimizer_features_enable='9.2.0'
*.processes=300
*.remote_listener='LISTENERS_CSORA'
*.remote_login_passwordfile='exclusive'
*.sessions=335
*.sga_max_size=10737418240
csora2.thread=2
csora1.thread=1
csora1.undo_tablespace='UNDOTBS1'
csora2.undo_tablespace='UNDOTBS2'
修改后的 pfile 文件内容
[oracle@RHEL5 dbs]$ more pfilecsora.ora
*.audit_file_dest='/u01/app/admin/csora/adump'
*.audit_trail='db'
*.compatible='11.1.0.0.0'
*.control_files='/u01/app/oradata/csora/control01.ctl','/u01/app/oradat
a/csora/control02.ctl'
*.db_block_size=8192
*.db_domain=''
*.db_name='csora'
*.db_recovery_file_dest='/u01/app/flash_recovery_area'
*.db_recovery_file_dest_size=2147483648
*.dispatchers='(PROTOCOL=TCP) (SERVICE=csoraXDB)'
*.instance_number=1
*.log_archive_dest_1='location=db_recovery_file_dest'
*.log_archive_format='%t_%s_%r.arch'
*.memory_max_target=8884901888
*.memory_target=8884901888
*.open_cursors=300
*.optimizer_features_enable='9.2.0'
*.processes=300
*.remote_login_passwordfile='exclusive'
*.sessions=335
*.sga_max_size=6737418240
*.undo_tablespace='UNDOTBS1'
5、恢复控制文件,切记设置DBID
[oracle@RHEL5 ~]$ rman target /
Recovery Manager: Release 11.1.0.7.0 - Production on Tue Sep 4 17:58:42 2012
Copyright (c) 1982, 2007, Oracle. All rights reserved.
connected to target database: CSORA (not mounted)
RMAN> set DBID=3232208281
executing command: SET DBID
RMAN> restore controlfile from "/mnt/rmanbak/csora_rmanbackup/ctl_c-
3232208281-20120825-0e";
Starting restore at 04-SEP-12
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=317 device type=DISK
channel ORA_DISK_1: restoring control file
channel ORA_DISK_1: restore complete, elapsed time: 00:00:03
output file name=/u01/app/oradata/csora/control01.ctl
output file name=/u01/app/oradata/csora/control02.ctl
Finished restore at 04-SEP-12
6、启动数据库到mount状态
RMAN> alter database mount;
database mounted
released channel: ORA_DISK_1
7、查看控制文件中rman备份信息是否为最新备份
A、查看全库备份集
RMAN> list backup of database;
List of Backup Sets
===================
BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
31710 Full 15.21G DISK 00:45:25 05-AUG-12
BP Key: 31779 Status: AVAILABLE Compressed: YES Tag: TAG20120805T040034
Piece Name: /mnt/rmanbak/csora_rmanbackup/dbfull_31103_1_790488035
List of Datafiles in backup set 31710
File LV Type Ckp SCN Ckp Time Name
---- -- ---- ---------- --------- ----
1 Full 1292469329 05-AUG-12 +DG1/csora/datafile/system.262.702839009
2 Full 1292469329 05-AUG-12 +DG1/csora/datafile/sysaux.263.702839013
3 Full 1292469329 05-AUG-12 +DG1/csora/datafile/undotbs1.264.702839015
4 Full 1292469329 05-AUG-12 +DG1/csor