探索Oracle 11gR2 DataGuard_02配置(二)
i DBSoft]$ ls
admin cfgtoollogs checkpoints diag flash_recovery_area oraInventory Product
[oracle@pri DBSoft]$ scp -r admin/ diag/admin/ flash_recovery_area/ sty:$ORACLE_BASE
六、修改sty端pfile参数文件,添加和修改如下内容
[plain]
vi /DBSoft/Product/11.2.0/db_1/dbs/initWoo.ora
*.db_unique_name=sty
*.log_archive_config='DG_CONFIG=(pri,dg)'
*.log_archive_dest_1='LOCATION=/DBBackup/Archiveva lID_FOR=(ALL_LOGFILES,ALL_ROLES) DB_UNIQUE_NAME=sty'
*.log_archive_dest_2='SERVICE=pri LGWR SYNCVALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=pri'
*.fal_server=pri
*.fal_client=sty
*.standby_file_management=AUTO
#*.db_file_name_convert='pri','pri'
#*.log_file_name_convert='pri','pri'
*.control_files='/DBBackup/Phycal/control01.ctl'
[plain]
SQL> startup mountpfile='/DBSoft/Product/11.2.0/db_1/dbs/initWoo.ora';
ORACLE instance started.
Total System Global Area 839282688 bytes
Fixed Size 2217992 bytes
Variable Size 507512824 bytes
Database Buffers 327155712 bytes
Redo Buffers 2396160 bytes
Database mounted.
SQL> exit
[oracle@sty Phycal]$ export ORACLE_SID=Woo
[oracle@sty Phycal]$ rman target / --进入rman开始恢复数据库
Recovery Manager: Release 11.2.0.1.0 -Production on Tue May 14 03:22:47 2013
Copyright (c) 1982, 2009, Oracle and/or itsaffiliates. All rights reserved.
connected to target database: WOO(DBID=4154863782, not open)
RMAN> catalog start with'/DBBackup/Phycal/';
Starting implicit crosscheck backup at14-MAY-13
using target database control file insteadof recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=25 device type=DISK
Finished implicit crosscheck backup at14-MAY-13
Starting implicit crosscheck copy at14-MAY-13
using channel ORA_DISK_1
Finished implicit crosscheck copy at14-MAY-13
searching for all files in the recoveryarea
cataloging files...
no files cataloged
searching for all files that match thepattern /DBBackup/Phycal/
List of Files Unknown to the Database
=====================================
File Name:/DBBackup/Phycal/full_db_01o9j16h_1_1
File Name:/DBBackup/Phycal/full_db_02o9j17b_1_1
Do you really want to catalog the abovefiles (enter YES or NO) yes
cataloging files...
cataloging done
List of Cataloged Files
=======================
File Name:/DBBackup/Phycal/full_db_01o9j16h_1_1
File Name:/DBBackup/Phycal/full_db_02o9j17b_1_1
RMAN> restore database;
Starting restore at 14-MAY-13
using target database control file insteadof recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=25 device type=DISK
channel ORA_DISK_1: starting datafilebackup set restore
channel ORA_DISK_1: specifying datafile(s)to restore from backup set
channel ORA_DISK_1: restoring datafile00001 to /DBData/Woo/Woo/system01.dbf
channel ORA_DISK_1: restoring datafile00002 to /DBData/Woo/Woo/sysaux01.dbf
channel ORA_DISK_1: restoring datafile00003 to /DBData/Woo/Woo/undotbs01.dbf
channel ORA_DISK_