Using Standby as an Alternate for Far Sync (12c): Limitations and Considerations

Based on Oracle 12.1

The Recommended Data Guard configuration is in Maximum Availability mode, when using Far Sync which is located near the Primary:

Primary Database Ã  Far Sync Instance - Network input/output (I/O) is synchronous (Sync).

Far Sync Instance Ã  Standby Database – Network I/O is asynchronous (Async).

Primary Database Ã  Standby Database  – As an alternate (when Far Sync is not reachable), network I/O is asynchronous (Async).

Using SQL

If you do not use Data Guard Broker (dgmgrl), use the parameters specified below.

·        Primary

On the Primary Database

Mandatory Parameters

Parameter
Value
Remarks
LOG_ARCHIVE_DEST_2

point to Far Sync service
Alternate
log_archive_dest_3
Switches to the standby destination, after the number of failures specified in the next parameter is reached.
max_failure
1
This value must be higher than 0 (infinite number of retries), but should not be too high, because the connection must fail after n attempts and fail over to the next destination, specified in the alternate parameter.
SYNC





LOG_ARCHIVE_DEST_STATE_2
enable

LOG_ARCHIVE_DEST_3

point to Standby service
Alternate
log_archive_dest_2
Establishes connection with the Far Sync host after the connection with log_dest_3 (standby) failed. Once Standby is up and available again, connection with the standby host is re-established.
max_failure
0
Establishes connection infinitely; never stops retrying.
ASYNC


LOG_ARCHIVE_DEST_STATE_3
alternate


Example:
ALTER SYSTEM SET log_archive_dest_2='service="[FARSYNC_INST]", SYNC  max_failure=1 db_unique_name="[FARSYNC_INST]" alternate=LOG_ARCHIVE_DEST_3 valid_for=(online_logfile,all_roles)';
ALTER SYSTEM SET log_archive_dest_state_2=enable;
ALTER SYSTEM SET log_archive_dest_3='service="[STANDBY_INST]", SYNC max_failure=0 db_unique_name="[STANDBY_INST]" alternate=LOG_ARCHIVE_DEST_2 valid_for=(online_logfile,all_roles)';
ALTER SYSTEM SET log_archive_dest_state_2=alternate;

·        On the Far Sync Instance

Mandatory parameters

Parameter
Value
Remarks
LOG_ARCHIVE_DEST_2

point to Standby service
max_failure
0
This value must be higher than 0 (infinite number of retries), but should not be too high, because the connection must fail after n attempts and fail over to the next destination, specified in the alternate parameter.
ASYNC


NOAFFIRM


LOG_ARCHIVE_DEST_STATE_2
enable

Example:
ALTER SYSTEM SET log_archive_dest_2='service="[STANDBY_INST]", ASYNC max_failure=0 db_unique_name="[STANDBY_INST]" valid_for=(standby_logfile,all_roles)';
ALTER SYSTEM SET log_archive_dest_state_2=enable;
ALTER SYSTEM SET log_archive_dest_3='service="[STANDBY_INST]", SYNC max_failure=0 db_unique_name="[STANDBY_INST]" net_timeout=30 alternate=LOG_ARCHIVE_DEST_2 valid_for=(online_logfile,all_roles)';
ALTER SYSTEM SET log_archive_dest_state_2=alternate;

·        On Standby Database

Mandatory parameters

Parameter
Value
Remarks
LOG_ARCHIVE_DEST_2

Point to Far Sync service only if you have local/near Far Sync. Otherwise, points to the original primary service.
Note:
Set this parameter only when using switchover.
Alternate
log_archive_dest_3
Switches to original primary destination after the number of failures specified in the next parameter is reached.
Note:
Set this only when using switchover and only if Far Sync is used as the service destination.
max_failure
1
This value must be higher than 0 (infinite number of retries), but should not be too high, because the connection must fail after n attempts and fail over to the next destination, specified in the alternate parameter.
SYNC





LOG_ARCHIVE_DEST_STATE_2
enable
Set this only when using switchover.
LOG_ARCHIVE_DEST_3

Points to the original Primary service.
Note:
Set this parameter only when using switchover and if Far Sync is used as service destination.
Alternate
log_archive_dest_2
Establishes connection with the Far Sync destination after the connection with the Primary service failed. Once the Primary service is up and available again, connection with the Primary host is re-established.
Note:
Set this parameter only when using switchover and if Far Sync is used as service destination.
max_failure
0
Establishes connection infinitely; never stops retrying.
ASYNC


LOG_ARCHIVE_DEST_STATE_3
alternate
Set this parameter only when using switchover.

Example:

ALTER SYSTEM SET log_archive_dest_2='service="[FARSYNC_INST]", SYNC max_failure=1 db_unique_name="[FARSYNC_INST]" alternate=LOG_ARCHIVE_DEST_3 valid_for=(online_logfile,all_roles)';
ALTER SYSTEM SET log_archive_dest_state_2=enable;
ALTER SYSTEM SET log_archive_dest_3='service="[PRIMARY_INST]", SYNC max_failure=0 db_unique_name="[PRIMARY_INST]" alternate=LOG_ARCHIVE_DEST_2 valid_for=(online_logfile,all_roles)';
ALTER SYSTEM SET log_archive_dest_state_2=alternate;

Using Broker

Must have parameters

Parameter
Value
Remark
Target Type
MaxFailure
0

Primary + Standby
MaxFailure
1

Far Sync
RedoRoutes
'([PRIMARY_INST] : [STANDBY_INST] ASYNC)([STANDBY_INST] : [PRIMARY_INST] ASYNC)'

Far Sync
RedoRoutes
'(LOCAL : [FARSYNC_INST] SYNC ALT =( [PRIMARY_INST] ASYNC FALLBACK))'

Standby
RedoRoutes
'(LOCAL : [FARSYNC_INST] SYNC ALT =( [STANDBY_INST] ASYNC FALLBACK))'

Primary


Example:
EDIT FAR_SYNC [FARSYNC_INST] SET PROPERTY RedoRoutes = '([PRIMARY_INST] : [STANDBY_INST] ASYNC)([STANDBY_INST] : [PRIMARY_INST] ASYNC)';

EDIT DATABASE [PRIMARY_INST] SET PROPERTY MaxFailure = 0;
EDIT FAR_SYNC [FARSYNC_INST] SET PROPERTY MaxFailure = 1;
EDIT DATABASE [STANDBY_INST] SET PROPERTY MaxFailure = 0;
EDIT DATABASE [STANDBY_INST] SET PROPERTY RedoRoutes = '(LOCAL : [FARSYNC_INST] SYNC ALT =( [PRIMARY_INST] ASYNC FALLBACK))';   

EDIT DATABASE [PRIMARY_INST] SET PROPERTY RedoRoutes = '(LOCAL : [FARSYNC_INST] SYNC ALT =( [STANDBY_INST] ASYNC FALLBACK))';

EDIT CONFIGURATION SET PROTECTION MODE AS MAXAVAILABILITY;

Comments

Popular posts from this blog

Data Guard - Changing IP Addresses

Install Oracle Internet Directory (OID) in Standalone mode

Fixing & Registering ORACLE_HOMES in Central Inventory