Skip to Main Content

Database Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Problem creating physical Standby database with RMAN

653084Jul 7 2011 — edited Jul 7 2011
Hi All

I am trying to learn oracle dataguard and as part of the process learning creating standby database.

Platform : Sun-Fire-V250 Sparc, Solaris 10

Database Version - Oracle 11R2

I am creating standby database on same server, so directory structure is different.

Following the instructions on Oracle site I managed to create a functional physical standby database. But I am not able to create standby database using RMAN. These are the steps that I followed-

1.Set up all necessary parameters on primary database as done while creating physical standby database manually, eg setting force logging, creating standby logs etc.

2.Edited parameter file on primary database as done while creating manual pysical standby database creation. Some of the changes done are-

On Primary Database:
*.FAL_CLIENT='orcl11020' #Primary database unique name
*.FAL_SERVER='stdby_11' #Standby database unique name

db_file_name_convert='/<dir>/oradata/stdby_11','/<dir>/oradata/orcl11020'

log_file_name_convert='/<dir>/oradata/stdby_11','/<dir>/oradata/orcl11020','/<dir>/oradata/stdby_11/redo_mem','/<dir>/oradata/orcl11020/redo_mem'
standby_file_management=auto

*.log_archive_config='DG_CONFIG=(orcl11020,stdby_11)'

*.log_archive_dest_1='LOCATION=/<dir>/flash_recovery_area/ORCL11020/archivelog

VALID_FOR=(ALL_LOGFILES,ALL_ROLES) db_unique_name=orcl11020'

*.log_archive_dest_2='SERVICE=stdby_11 LGWR ASYNC VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) db_unique_name=stdby_11'

*.LOG_ARCHIVE_DEST_STATE_1='ENABLE'
*.LOG_ARCHIVE_DEST_STATE_2='ENABLE'
*.LOG_ARCHIVE_FORMAT='%t_%s_%r.arc'
*.LOG_ARCHIVE_MAX_PROCESSES=30

Copied same pfile for standby database and modified following-

*.control_files='/<dir>/oradata/stdby_11/stdby_11.ctl','/<dir>/fra_stdby/stdby_11/stdby_11.ctl'
*.db_name='orcl1102'
*.db_unique_name='stdby_11'
*.FAL_CLIENT='stdby_11'
*.FAL_SERVER='orcl11020'
db_file_name_convert='/<dir>/oradata/orcl11020','/<dir>/oradata/stdby_11'
log_file_name_convert='/<dir>/oradata/orcl11020','/<dir>/oradata/stdby_11','/<dir>/oradata/orcl11020/redo_mem','/<dir>/oradata/stdby_11/redo_mem'
standby_file_management=auto
*.log_archive_dest_1='LOCATION=/<dir>/fra_stdby/STDBY_11/archivelog
VALID_FOR=(ALL_LOGFILES,ALL_ROLES) db_unique_name=stdby_11'
*.log_archive_dest_2='SERVICE=orcl11020 LGWR ASYNC VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE)
db_unique_name=orcl11020'

3. Add relevant information in tnsnames.ora and listener.ora files and then restart listener.
3. Created password file with same credential as primary database.
4.Up-to-date RMAN backup of primary database available.
5.Create standby controlfile with rman
While primary database s open (I tried with primary database in mount mode as well)-

$>rman catalog rman/paswd@rman target /
RMAN> BACKUP CURRENT CONTROLFILE FOR STANDBY;

6. Open a new terminal and startup standby database in nomount mode using parameter file created -
$>ORACLE_SID=stdby_11
$>export ORACLE_SID
$>sqlplus / as sysdba
SQL>STARTUP NOMOUNT pfile='<location/initfilename.ora'
SQL>quit
$> rman AUXILIARY / target sys/passwd@orcl11020 catalog rman/passwd@rman
RMAN>DUPLICATE TARGET DATABASE FOR STANDBY DORECOVER;


RMAN finishes without error but archive logs are not being tranported. Looking at the log, following caught my eye-

Error 1017 received logging on to the standby
------------------------------------------------------------
Check that the primary and standby are using a password file
and remote_login_passwordfile is set to SHARED or EXCLUSIVE,
and that the SYS password is same in the password files.
returning error ORA-16191
------------------------------------------------------------
FAL[client, ARC2]: Error 16191 connecting to orcl11020 for fetching gap sequence
Errors in file /<>dir>/diag/rdbms/stdby_11/stdby_11/trace/stdby_11_arc2_24321.trc:
ORA-16191: Primary log shipping client not logged on standby
Errors in file /<dir>/diag/rdbms/stdby_11/stdby_11/trace/stdby_11_arc2_24321.trc:
ORA-16191: Primary log shipping client not logged on standby


So on both primary and standby I confirmed

SQL> show parameter remote_login_passwordfile

NAME TYPE VALUE
------------------------------------ ----------- ------------
remote_login_passwordfile string EXCLUSIVE

To make double sure that password files are same, I shutdown both databases, delete password files and recreated with same credentials.
Password files are called - orapworcl11020 and orapwstdby_11

Can someone guide me where thisngs are going wrong here please.
This post has been answered by mseberg on Jul 7 2011
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 4 2011
Added on Jul 7 2011
10 comments
565 views