[Oracle Active DataGuard 12.1 Installation on Centos 6.7]: Configuring instance parameters on primary for DataGuard configuration


SQL> alter system set LOG_ARCHIVE_CONFIG="DG_CONFIG=(master, slave)" scope=both;


SQL> alter system set log_archive_dest_2="SERVICE=standby LGWR SYNC VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) db_unique_name=slave" scope=both;


SQL> alter system set log_archive_dest_state_2="enable" scope=both;


You can use defer to avoid constantly writing to the log that there are connection problems with the standby.

-- SQL> alter system set log_archive_dest_state_2="defer" scope=both;


SQL> alter system set standby_file_management= AUTO scope=both;


The following parameters will be used (as far as I understand) if the INSTANCE is switched to STANDBY mode

SQL> alter system set FAL_SERVER="slave" scope=both;
SQL> alter system set FAL_CLIENT="master" scope=both;

LOG_ARCHIVE_CONFIG - defines the instance names between which log exchange will occur.

LOG_ARCHIVE_DEST_2 - archive log storage location (i.e., the place where logs are stored and also where we request them to be placed).

PRIMARY_ROLE - the instance is the primary database

LGWR - we will transfer archive logs to the standby server using the LGWR process.

The ASYNC parameter indicates that data generated by a transaction does not necessarily need to be received by the standby before the transaction completes - this will not stop the primary database if there is no connection to the standby.

log_archive_dest_2 - where archive logs will be sent - to a file system or service (if I understand correctly).

fal_client=’master’ - this parameter defines that when the instance switches to standby mode, it will be the client for receiving archive logs (fetch archive log).

fal_server=’slave’ - defines the FAL (fetch archive log) server from which archive logs will be transferred. The fal_client and fal_server parameters only work when the database is running in standby mode.

standby_file_management=’AUTO’ - sets automatic file management mode in standby mode. With this parameter value, all files created or deleted on the primary database will be automatically created or deleted on the standby database.

See:

http://docs.oracle.com/cd/B19306_01/server.102/b14239/log_arch_dest_param.htm


View the values of the set parameters

SQL> show parameter arch
SQL> show parameter log_archive_dest_state_1
SQL> show parameter log_archive_dest_state_2


SQL> SELECT DEST_NAME,STATUS,DESTINATION
FROM V$ARCHIVE_DEST
WHERE DESTINATION IS NOT NULL;


SQL> select name, value
from v$parameter where name like 'fal%';


SQL>  show parameter fal;

NAME				     TYPE	 VALUE
------------------------------------ ----------- ------------------------------
fal_client			     string	 slave
fal_server			     string	 master