the location of online redo log is strange to me, when I try to use same directory structure in different host , and I don't the following two parameters.
#DB_FILE_NAME_CONVERT='/u01/oradata/DG/','/u01/oradata/DGS/'
#LOG_FILE_NAME_CONVERT= '/u01/oradata/DG/','/u01/oradata/DGS/'
./FRA/DGS/onlinelog:
total 358820
-rw-r----- 1 oracle asmadmin 52429312 Jan 3 17:13 o1_mf_1_8gblynhm_.log
-rw-r----- 1 oracle asmadmin 52429312 Jan 3 17:13 o1_mf_2_8gblyntf_.log
-rw-r----- 1 oracle asmadmin 52429312 Jan 3 17:13 o1_mf_3_8gblyo4p_.log
-rw-r----- 1 oracle asmadmin 52429312 Jan 3 17:13 o1_mf_4_8gblyojf_.log
-rw-r----- 1 oracle asmadmin 52429312 Jan 3 17:13 o1_mf_5_8gblyqhv_.log
-rw-r----- 1 oracle asmadmin 52429312 Jan 3 17:14 o1_mf_6_8gblyqv7_.log
-rw-r----- 1 oracle asmadmin 52429312 Jan 3 17:14 o1_mf_7_8gblyr67_.log
SYS@DGS> select member, type from v$logfile;MEMBER
-------------------------------------------------------------------------------------------------------------- ----------------------
TYPE
-------
/u01/oradata/DG/FRA/DGS/onlinelog/o1_mf_1_8gnhhx5m_.log
ONLINE
/u01/oradata/DG/FRA/DGS/onlinelog/o1_mf_2_8gnhhxny_.log
ONLINE
/u01/oradata/DG/FRA/DGS/onlinelog/o1_mf_3_8gnhhy4x_.log
ONLINE
/u01/oradata/DG/FRA/DGS/onlinelog/o1_mf_4_8gnhhynq_.log
STANDBY
/u01/oradata/DG/FRA/DGS/onlinelog/o1_mf_5_8gnhhzdp_.log
STANDBY
/u01/oradata/DG/FRA/DGS/onlinelog/o1_mf_6_8gnhj05j_.log
STANDBY
/u01/oradata/DG/FRA/DGS/onlinelog/o1_mf_7_8gnhj0vs_.log
STANDBY
7 rows selected.
from oracle doc, it says
"If you want the standby redo log file names on the standby database to be the same as the primary redo log file names, then you must specify the
NOFILENAMECHECK
clause of the DUPLICATE
command. Otherwise, RMAN signals an error even if the standby database is created on a different host." , apparently it doesn't work to me, and it seems taking FRA location as default online & standby redo log location.db_file_name_convert string
log_file_name_convert string /u01/oradata/DG/, /u01/oradata
/DG/
Luckily, I found set LOG_FILE_NAME_CONVERT to be same value in initDGS.ora and it works.
#DB_FILE_NAME_CONVERT='/u01/oradata/DG/','/u01/oradata/DGS/'
LOG_FILE_NAME_CONVERT= '/u01/oradata/DG/','/u01/oradata/DG/'
After RMAN duplicaiton ,orarac1poc:DG:/u01/app/oracle/product/11.2.0/db_2/dbs> rman target sys/oracle123@DG auxiliary sys/oracle123@DGS
Recovery Manager: Release 11.2.0.2.0 - Production on Mon Jan 7 11:20:40 2013
Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
connected to target database: DG (DBID=1716975309)
connected to auxiliary database: DG (not mounted)
RMAN> run {
2> allocate channel prmy1 type disk;
3> allocate auxiliary channel stby type disk;
4> duplicate target database for standby from active database NOFILENAMECHECK;
5> }
using target database control file instead of recovery catalog
allocated channel: prmy1
channel prmy1: SID=49 device type=DISK
allocated channel: stby
channel stby: SID=13 device type=DISK
Starting Duplicate Db at 07-JAN-13
contents of Memory Script:
{
backup as copy reuse
targetfile '/u01/app/oracle/product/11.2.0/db_2/dbs/orapwDG' auxiliary format
'/u01/app/oracle/product/11.2.0/db_2/dbs/orapwDGS' ;
}
executing Memory Script
Starting backup at 07-JAN-13
Finished backup at 07-JAN-13
contents of Memory Script:
{
backup as copy current controlfile for standby auxiliary format '/u01/oradata/DG/control01.ctl';
restore clone controlfile to '/u01/oradata/DG/FRA/DG/control02.ctl' from
'/u01/oradata/DG/control01.ctl';
}
executing Memory Script
Starting backup at 07-JAN-13
channel prmy1: starting datafile copy
copying standby control file
output file name=/u01/app/oracle/product/11.2.0/db_2/dbs/snapcf_DG.f tag=TAG20130107T112102 RECID=14 STAMP=80407926 2
channel prmy1: datafile copy complete, elapsed time: 00:00:01
Finished backup at 07-JAN-13
Starting restore at 07-JAN-13
channel stby: copied control file copy
Finished restore at 07-JAN-13
contents of Memory Script:
{
sql clone 'alter database mount standby database';
}
executing Memory Script
sql statement: alter database mount standby database
contents of Memory Script:
{
set newname for tempfile 1 to
"/u01/oradata/DG/temp01.dbf";
switch clone tempfile all;
set newname for datafile 1 to
"/u01/oradata/DG/system01.dbf";
set newname for datafile 2 to
"/u01/oradata/DG/sysaux01.dbf";
set newname for datafile 3 to
"/u01/oradata/DG/undotbs01.dbf";
set newname for datafile 4 to
"/u01/oradata/DG/users01.dbf";
set newname for datafile 5 to
"/u01/oradata/DG/dg1_tbs01.dbf";
backup as copy reuse
datafile 1 auxiliary format
"/u01/oradata/DG/system01.dbf" datafile
2 auxiliary format
"/u01/oradata/DG/sysaux01.dbf" datafile
3 auxiliary format
"/u01/oradata/DG/undotbs01.dbf" datafile
4 auxiliary format
"/u01/oradata/DG/users01.dbf" datafile
5 auxiliary format
"/u01/oradata/DG/dg1_tbs01.dbf" ;
sql 'alter system archive log current';
}
executing Memory Script
executing command: SET NEWNAME
renamed tempfile 1 to /u01/oradata/DG/temp01.dbf in control file
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
Starting backup at 07-JAN-13
channel prmy1: starting datafile copy
input datafile file number=00001 name=/u01/oradata/DG/system01.dbf
output file name=/u01/oradata/DG/system01.dbf tag=TAG20130107T112110
channel prmy1: datafile copy complete, elapsed time: 00:00:15
channel prmy1: starting datafile copy
input datafile file number=00002 name=/u01/oradata/DG/sysaux01.dbf
output file name=/u01/oradata/DG/sysaux01.dbf tag=TAG20130107T112110
channel prmy1: datafile copy complete, elapsed time: 00:00:25
channel prmy1: starting datafile copy
input datafile file number=00003 name=/u01/oradata/DG/undotbs01.dbf
output file name=/u01/oradata/DG/undotbs01.dbf tag=TAG20130107T112110
channel prmy1: datafile copy complete, elapsed time: 00:00:07
channel prmy1: starting datafile copy
input datafile file number=00005 name=/u01/oradata/DG/dg1_tbs01.dbf
output file name=/u01/oradata/DG/dg1_tbs01.dbf tag=TAG20130107T112110
channel prmy1: datafile copy complete, elapsed time: 00:00:02
channel prmy1: starting datafile copy
input datafile file number=00004 name=/u01/oradata/DG/users01.dbf
output file name=/u01/oradata/DG/users01.dbf tag=TAG20130107T112110
channel prmy1: datafile copy complete, elapsed time: 00:00:01
Finished backup at 07-JAN-13
sql statement: alter system archive log current
contents of Memory Script:
{
switch clone datafile all;
}
executing Memory Script
datafile 1 switched to datafile copy
input datafile copy RECID=14 STAMP=804079320 file name=/u01/oradata/DG/system01.dbf
datafile 2 switched to datafile copy
input datafile copy RECID=15 STAMP=804079320 file name=/u01/oradata/DG/sysaux01.dbf
datafile 3 switched to datafile copy
input datafile copy RECID=16 STAMP=804079320 file name=/u01/oradata/DG/undotbs01.dbf
datafile 4 switched to datafile copy
input datafile copy RECID=17 STAMP=804079320 file name=/u01/oradata/DG/users01.dbf
datafile 5 switched to datafile copy
input datafile copy RECID=18 STAMP=804079320 file name=/u01/oradata/DG/dg1_tbs01.dbf
Finished Duplicate Db at 07-JAN-13
released channel: prmy1
released channel: stby
it gives me the following result.
in primary db
SYS@DG> select member, type from v$logfile;
MEMBER
------------------------------------------------------------------------------------------------------------------------------------
TYPE
-------
/u01/oradata/DG/redo01.log
ONLINE
/u01/oradata/DG/redo02.log
ONLINE
/u01/oradata/DG/redo03.log
ONLINE
/u01/oradata/DG/stbredo04.rdo
STANDBY
/u01/oradata/DG/stbredo05.rdo
STANDBY
/u01/oradata/DG/stbredo06.rdo
STANDBY
/u01/oradata/DG/stbredo07.rdo
STANDBY
7 rows selected.
in standby db
SYS@DGS> select member, type from v$logfile;
MEMBER
-------------------------------------------------------------------------------------------------------------- ----------------------
TYPE
-------
/u01/oradata/DG/redo01.log
ONLINE
/u01/oradata/DG/redo02.log
ONLINE
/u01/oradata/DG/redo03.log
ONLINE
/u01/oradata/DG/stbredo04.rdo
STANDBY
/u01/oradata/DG/stbredo05.rdo
STANDBY
/u01/oradata/DG/stbredo06.rdo
STANDBY
/u01/oradata/DG/stbredo07.rdo
STANDBY
7 rows selected.
Here is my complete parameter files.
Primary DB PFILE
orarac1poc:DG:/u01/app/oracle/product/11.2.0/db_2/dbs> cat initDG.ora
DG.__db_cache_size=427819008
DG.__java_pool_size=4194304
DG.__large_pool_size=4194304
DG.__oracle_base='/u01/app/oracle'#ORACLE_BASE set from environment
DG.__pga_aggregate_target=209715200
DG.__sga_target=683671552
DG.__shared_io_pool_size=0
DG.__shared_pool_size=230686720
DG.__streams_pool_size=4194304
*.audit_file_dest='/u01/app/oracle/admin/DG/adump'
*.audit_trail='db'
*.compatible='11.2.0.0.0'
*.control_files='/u01/oradata/DG/control01.ctl','/u01/oradata/DG/FRA/DG/control02.ctl'
*.db_block_size=8192
*.db_domain=''
*.db_recovery_file_dest='/u01/oradata/DG/FRA'
*.db_recovery_file_dest_size=5218762752
*.diagnostic_dest='/u01/app/oracle'
#*.dispatchers='(PROTOCOL=TCP) (SERVICE=DGPXDB)'
*.dispatchers='(PROTOCOL=TCP) (SERVICE=DGXDB)'
*.open_cursors=300
*.pga_aggregate_target=209715200
*.processes=150
#*.remote_login_passwordfile='EXCLUSIVE'
*.sga_target=681574400
*.undo_tablespace='UNDOTBS1'
# Primary Database: Primary Role Initialization Parameters
*.db_name='DG'
DB_UNIQUE_NAME='DG'
LOG_ARCHIVE_CONFIG='DG_CONFIG=(DG,DGS)'
#*.log_archive_dest_1='LOCATION=/u01/oradata/DG/arch'
LOG_ARCHIVE_DEST_1= 'LOCATION=/u01/oradata/DG/arch VALID_FOR=(ALL_LOGFILES,ALL_ROLES) DB_UNIQUE_NAME=DG'
LOG_ARCHIVE_DEST_2= 'SERVICE=DGS ASYNC VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=DGS'
LOG_ARCHIVE_DEST_STATE_1=ENABLE
LOG_ARCHIVE_DEST_STATE_2=ENABLE
REMOTE_LOGIN_PASSWORDFILE=EXCLUSIVE
*.log_archive_format='DG_%t_%s_%r.arc'
LOG_ARCHIVE_MAX_PROCESSES=30
# Primary Database: Standby Role Initialization Parameters
FAL_SERVER='DGS'
#DB_FILE_NAME_CONVERT='DGS','DG'
DB_FILE_NAME_CONVERT='/u01/oradata/DGS/','/u01/oradata/DG'
LOG_FILE_NAME_CONVERT= '/u01/oradata/DGS/','/u01/oradata/DG'
STANDBY_FILE_MANAGEMENT=AUTO
Standby DB PFILE
orarac2poc:DGS:/u01/oradata/DG/FRA> cat /u01/app/oracle/product/11.2.0/db_2/dbs/initDGS.ora
#DG.__db_cache_size=427819008
#DG.__java_pool_size=4194304
#DG.__large_pool_size=4194304
#DG.__oracle_base='/u01/app/oracle'#ORACLE_BASE set from environment
#DG.__pga_aggregate_target=209715200
#DG.__sga_target=683671552
#DG.__shared_io_pool_size=0
#DG.__shared_pool_size=230686720
#DG.__streams_pool_size=4194304
*.audit_file_dest='/u01/app/oracle/admin/DGS/adump'
*.audit_trail='db'
*.compatible='11.2.0.0.0'
*.db_block_size=8192
*.db_domain=''
#*.db_recovery_file_dest='/u01/oradata/DGS/FRA'
*.db_recovery_file_dest='/u01/oradata/DG/FRA'
*.db_recovery_file_dest_size=5218762752
*.diagnostic_dest='/u01/app/oracle'
#*.dispatchers='(PROTOCOL=TCP) (SERVICE=DGPXDB)'
*.dispatchers='(PROTOCOL=TCP) (SERVICE=DGXDB)'
*.open_cursors=300
*.pga_aggregate_target=209715200
*.processes=150
*.sga_target=681574400
*.undo_tablespace='UNDOTBS1'
#Initialization Parameters for a Physical Standby Database
DB_NAME=DG
DB_UNIQUE_NAME=DGS
LOG_ARCHIVE_CONFIG='DG_CONFIG=(DG,DGS)'
*.control_files='/u01/oradata/DG/control01.ctl','/u01/oradata/DG/FRA/DG/control02.ctl'
#DB_FILE_NAME_CONVERT='DG','DGS'
#LOG_FILE_NAME_CONVERT='DG','DGS'
#DB_FILE_NAME_CONVERT='/u01/oradata/DG/','/u01/oradata/DGS/'
LOG_FILE_NAME_CONVERT= '/u01/oradata/DG/','/u01/oradata/DG/'
*.log_archive_format='DG_%t_%s_%r.arc'
LOG_ARCHIVE_DEST_1= 'LOCATION=/u01/oradata/DG/arch VALID_FOR=(ALL_LOGFILES,ALL_ROLES) DB_UNIQUE_NAME=DGS'
LOG_ARCHIVE_DEST_2= 'SERVICE=DG ASYNC VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=DG'
LOG_ARCHIVE_DEST_STATE_1=ENABLE
LOG_ARCHIVE_DEST_STATE_2=ENABLE
REMOTE_LOGIN_PASSWORDFILE=EXCLUSIVE
STANDBY_FILE_MANAGEMENT=AUTO
FAL_SERVER=DG
No comments:
Post a Comment