My Blog

December 9, 2008

Standby database cannot archive redo log with ORA-16014: no available destinations

Filed under: Oracle — by enotebook @ 4:20 pm

I have newly configured a data guard server, it initially was running fine after the configuration has been done, but the standby database freezed in 10 miunites with the following error in alert log:

ORA-16401: archivelog rejected by RFS
ARCk: Failed to archive thread 1 sequence 27 (4)
ARCH: Archival stopped, error occurred. Will continue retrying
Tue Dec 2 10:20:18 2008
ORACLE Instance orcl – Archival Error
Tue Dec 2 10:20:18 2008
ORA-16014: log 4 sequence# 27 not archived, no available destinations
ORA-00312: online log 4 thread 1: ‘/opt/oracle/product/10gr2/oradata/orcl/standbyredo01.log’
Tue Dec 2 10:20:18 2008
RFS[5]: Archivelog thread 1 sequence 28 cannot be reused
Tue Dec 2 10:20:18 2008
Errors in file /opt/oracle/product/10gr2/admin/orcl/bdump/orcl_arck_1746.trc:
ORA-16014: log 4 sequence# 27 not archived, no available destinations
ORA-00312: online log 4 thread 1: ‘/opt/oracle/product/10gr2/oradata/orcl/standbyredo01.log’
Tue Dec 2 10:20:18 2008
Errors in file /opt/oracle/product/10gr2/admin/orcl/udump/orcl_rfs_1786.trc:
ORA-16401: archivelog rejected by RFS

Apparently, the standby database freezed since the standby redo log is not able to be archived. i suspect if the parameter of log_archive_dest_1 is correctly specified, following lists some of the system parameters with non-default values in standby database:

db_unique_name=orcl144
log_archive_config=’DG_CONFIG=(orcl145,orcl144)’
log_archive_dest_1=’LOCATION=/opt/oracle/arch/archlog144/ VALID_FOR=(ONLINE_LOGFILES,ALL_ROLES) DB_UNIQUE_NAME=orcl144′
log_archive_dest_2=’SERVICE=dg145 LGWR ASYNC VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLES) DB_UNIQUE_NAME=orcl145′
log_archive_dest_state_1=enable
log_archive_dest_state_2=enable
log_archive_format=’%t_%s_%r.arc’
log_archive_max_processes=30
fal_server=dg145
fal_client=dg144
standby_file_management=auto
standby_archive_dest=’/opt/oracle/arch/archlog144/’

Yes, it causes the problem – the parameter of log_archive_dest_1 specified incorrectly. For VALID_FOR clause, the value associate to it should be ALL_LOGFILES instead of ONLINE_LOGFILES, which means all the log files intend to be archived in specified location including STANDBY REDOLOG.
Problem solved after changing the value of log_archive_dest_1 to ‘LOCATION=/opt/oracle/arch/archlog144/ VALID_FOR=(ALL_LOGFILES,ALL_ROLES) DB_UNIQUE_NAME=orcl144’.

Regarding VALID_FOR clause, i extract some content from oracle database 10 manual.

The VALID_FOR attribute is optional. However, Oracle recommends that you define a VALID_FOR attribute for each destination so that your Data Guard configuration operates properly after a role transition.
Note:
Although the (ALL_LOGFILES,ALL_ROLES) keyword pair is the default, it is not appropriate for every destination. For example, if the destination is a logical standby database, which is an open database that is creating its own redo data, the redo data being transmitted by redo transport services could potentially overwrite the logical standby database’s local online redo log files.
To configure these factors for each LOG_ARCHIVE_DEST_n destination, you specify this attribute with a pair of keywords: VALID_FOR=(redo_log_type,database_role):
The redo_log_type keyword identifies the destination as valid for archiving one of the following:
ONLINE_LOGFILE—This destination is valid only when archiving online redo log files.
STANDBY_LOGFILE—This destination is valid only when archiving standby redo log files.
ALL_LOGFILES— This destination is valid when archiving either online redo log files or standby redo log files.
The database_role keyword identifies the role in which this destination is valid for archiving:
PRIMARY_ROLE—This destination is valid only when the database is running in the primary role.
STANDBY_ROLE—This destination is valid only when the database is running in the standby role.
ALL_ROLES—This destination is valid when the database is running in either the primary or the standby role.
If you do not specify the VALID_FOR attribute for a destination, by default, archiving online redo log files and standby redo log files is enabled at the destination, regardless of whether the database is running in the primary or the standby role. This default behavior is equivalent to setting the (ALL_LOGFILES,ALL_ROLES) keyword pair on the VALID_FOR attribute. For example:
LOG_ARCHIVE_DEST_1=’LOCATION=/disk1/oracle/oradata/payroll/arch/ VALID_FOR=(ALL_LOGFILES,ALL_ROLES)
The VALID_FOR attribute enables you to use the same initialization parameter file for both the primary and standby roles.

Advertisements

Leave a Comment »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Create a free website or blog at WordPress.com.

%d bloggers like this: