?
这些个存放目录:闪回区目录,adr目录,审计日志目录,?Oracle-managed 数据文件目录 等等,一定要注意啊
------------这里解释使用类上述命令执行后的日子输出,来理解使用上述命令初始化备库的原理:
$rman target sys/sys@chicago auxiliary sys/sys@boston
connected to target database: CHICAGO (DBID=761464750)
connected to auxiliary database:?CHICAGO (not mounted)
RMAN> run {
allocate channel prmy1 type disk;
allocate channel prmy2 type disk;
allocate channel prmy3 type disk;
allocate channel prmy4 type disk;
allocate auxiliary channel stby type disk;
duplicate target database for standby from active database
spfile
? parameter_value_convert 'chicago','boston'
? set db_unique_name='boston'
? set db_file_name_convert='/chicago/','/boston/'
? set log_file_name_convert='/chicago/','/boston/'
? set control_files='/u01/app/oracle/oradata/control01.ctl'
? set log_archive_max_processes='5'
? set fal_client='boston'
? set fal_server='chicago'
? set standby_file_management='AUTO'
? set log_archive_config='dg_config=(chicago,boston)'
? set log_archive_dest_2='service=chicago ASYNCvalid_for=(ONLINE_LOGFILE,PRIMARY_ROLE) db_unique_name=chicago'
;
}
using target database control file instead of recovery catalog
allocated channel: prmy1 ? ? ? ? ? ? ? ? ? ?---------这个就不多说了:分配通道
channel prmy1: SID=147 device type=DISK
allocated channel: prmy2
channel prmy2: SID=130 device type=DISK
allocated channel: prmy3
channel prmy3: SID=137 device type=DISK
allocated channel: prmy4
channel prmy4: SID=170 device type=DISK
allocated channel: stby
channel stby: SID=98 device type=DISK
Starting Duplicate Db at 19-MAY-08
contents of Memory Script:
{
backup as copy reuse ? ? ?-------------拷贝主库密码文件,spfile参数文件
file '/u02/app/oracle/product/11.1.0/db_1/dbs/orapwcore' auxiliary format'/u02/app/oracle/product/11.1.0/db_1/dbs/orapwcore1'?
file'/u02/app/oracle/product/11.1.0/db_1/dbs/spfilecore.ora' auxiliary format'/u02/app/oracle/product/11.1.0/db_1/dbs/spfilecore1.ora' ;
sql clone "alter system set spfile= ''/u02/app/oracle/product/11.1.0/db_1/dbs/spfilecore1.ora''";
}
executing Memory Script ? ?----
Starting backup at 19-MAY-08
Finished backup at 19-MAY-08
sql statement: alter system set spfile= ''/u02/app/oracle/product/11.1.0/db_1/dbs/spfilecore1.ora'' ? -----在修改
contents of Memory Script: ?-----------------------这里根据设置我们在run 脚本中spfile 标注下的一些参数设置, RMAN会自动生成以下脚本
{
sql clone "alter system set audit_file_dest =''/u02/app/oracle/admin/boston/adump'' comment='''' scope=spfile";
sql clone "alter system set dispatchers =''(PROTOCOL=TCP) (SERVICE=core1XDB)'' comment='''' scope=spfile";
sql clone "alter system set log_archive_dest_2 =''service=core11 arch async VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) db_unique_name=boston'' comment=''''?
scope=spfile";
sql clone "alter system set db_unique_name =''boston'' comment='''' scope=spfile";
sql clone "alter system set db_file_name_convert =''/chicago/'', ''/boston/'' comment='''' scope=spfile";
sql clone "alter system set log_file_name_convert =''/chicago/'', ''/boston/'' comment='''' scope=spfile";
sql clone "alter system set control_files =''/u01/app/oracle/oradata/control01.ctl'' comment='''' scope=spfile";
sql clone "alter system set log_archive_max_processes =5 comment='''' scope=spfile";
sql clone "alter system set fal_client =''boston'' comment='''' scope=spfile";
sql clone "alter system set fal_server =''chicago'' comment='''' scope=sp