What is Async and
Sync in Oracle Dataguard
There are three protection modes for primary database in oracle
dataguard
1.Maximum
Protection
2.Maximum Performance
3.Maximum Availability
1.Maximum
Protection
Transactions on the primary
are not commit until redo information has been written to the online
redo log and at least one of the the standby standby location. If
there is not suitable standby location is available or found for any
reason, the primary database shuts down.
2.Maximum Performance
Transactions
on the primary database commit as soon as redo information
has been written to the online redo log and Transfer
of redo information to the standby server is asynchronous .so in this
type of protection mode there is no impact on performance of the
primary.
3.Maximum Availability
Transactions
on the primary are not commit until redo information has been
written to the online redo log and at least one of the the standby
standby location. If there is not suitable standby location is
available or found for any reason it acts same as the maximum
performance mode.
For
knowing the protection mode of your primary database use query
SQL>SELECT
protection_mode FROM v$database;
if
you want to switch into other mode from your current protection mode
use
1.Maximum
Availability
SQL> ALTER SYSTEM SET LOG_ARCHIVE_DEST_2='SERVICE=stby AFFIRM SYNC VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=stby'; SQL> ALTER DATABASE SET STANDBY DATABASE TO MAXIMIZE AVAILABILITY;
2.Maximum Performance
SQL> ALTER SYSTEM SET LOG_ARCHIVE_DEST_2='SERVICE=stby NOAFFIRM ASYNC VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=stby'; SQL> ALTER DATABASE SET STANDBY DATABASE TO MAXIMIZE PERFORMANCE;
3.Maximum Protection
SQL> ALTER SYSTEM SET LOG_ARCHIVE_DEST_2='SERVICE=stby AFFIRM SYNC VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=stby'; SQL>ALTER DATABASE SET STANDBY DATABASE TO MAXIMIZE PROTECTION;