Important configuration parameters of Oracle Data guard

Source: Internet
Author: User

Oracle Data Guard provides one or more slave databases for the production database (a copy of the database ), to ensure that data is not lost when the master database is unavailable or when exceptions occur, and continue to provide services through the slave database. For the configuration of Oracle DG, we can use grid control or data guard broker and SQL * Plus. The preceding two methods can be completed on the GUI, which is easy to operate. For the SQL * Plus command line method, we need to perform a lot of configuration, especially some of these parameters. This document describes important parameters for configuring Oracle Data guard. Next we will refer to data guard for short as DG.

 

1. Several types of parameters of DG
When configuring DG, there are several different types of parameters, which are generally divided into role-independent parameters, master database role parameters, and backup database role parameters.
Correct settings should be set for these different types of parameters. Otherwise, the DG cannot run normally or the role conversion cannot be implemented normally.
Note: parameter classification of the master and slave databases does not mean that these parameters can only be set in the master database or slave database. If some parameters are switched, the master and slave databases should be set.

 

2. parameters irrelevant to the role
A. compatible = release_number
This parameter is used to set version compatibility parameters. The same value must be specified. Otherwise, the switchover fails and the redo transmission fails.

B. db_name = Database Name
This parameter is common and must be the name of any database. Note: In the same DG, all roles have the same db_name.
For example, *. db_name = 'oradb'

C. db_unique_name = unique name for the database
The unique name of the database, which corresponds to db_name. This is a logical name that corresponds to the database instance name, which is equal to db_name by default.
If log_archive_config is configured, it is recommended to set it to a unique value. This parameter will not be changed when the primary and backup roles change.
Master Database: *. db_unique_name = 'oradb'
Slave Database: *. db_unique_name = 'oradbdg'

D. log_archive_config = 'dg _ config (db_unique_name, db_unique_name ,...)'
This parameter is used to define a list of all valid db_unique_name names in the DG. It is separated by commas to provide security checks for the DG. We recommend that you always configure this parameter.
The master database and slave database use the same settings.
Master Database: *. log_archive_config = 'dg _ Config = (oradb, oradbdg )'
Slave Database: *. log_archive_config = 'dg _ Config = (oradb, oradbdg )'

 

E. control_files = 'control _ file_name ', 'control _ file_name ','...'
This parameter is used to define the location of the control file and modify it based on the path of the master and slave databases. Refer to: Oracle Control File

 

F, log_archive_max_processes = integer
This parameter defines the number of processes used for archiving.
On the master database, the archiving process is used to archive online redo log files and to process the interval between redo log streams in the slave database.
On the slave database, the archiving process archives standby redo logs and forwards the archived logs to the cascade slave database.
We recommend that you set the minimum value of this parameter to 4 and the maximum value to 30.

G, log_archive_format = Log % d _ % T _ % S _ % R. Arc
This parameter is used to define the format of archived logs.

H. remote_login_passwordfile = {exclusive | shared}
This parameter is used to set the authentication method. We recommend that you set the parameter value to exclusive or shared. Ensure that all dB servers in the same data guard configuration have the same sys password.
For more information about this parameter, see the Oracle password file.
Master Database: *. remote_login_passwordfile = exclusive
Slave Database: *. remote_login_passwordfile = exclusive


3. parameters related to the master database role
A. log_archive_dest_n = {location = path_name | service = SERVICE_NAME, attribute, attribute ,...}
Set the path for archiving logs in the master database and redo log transmission. This parameter is complex in the DG Environment. For more information about archiving, see Oracle archiving logs.
If the flash back area is enabled, you do not need to set the local archive. You can set 10 available targets for this parameter, one of which is local archive. That is, there can be nine slave databases.
This parameter has many features, which are listed below.
Serivce: used to specify the tnsnames descriptor of the standby database. oralce will send the redo log to the standby database specified by tnsnames.
Sync: used to specify the synchronous transmission method to the slave database. That is, the lgwr process needs to wait for the confirmation message from lNS and then inform the client that the transaction has been committed.
In the highest availability and maximum protection mode, at least one standby target should be specified as sync.
Async: In contrast to sync, it specifies the asynchronous transmission mode, which is the default transmission method.
Net_timeout: specifies the maximum time for the lgwr process to wait for the LNS process. The unit is seconds (30 by default ). If this value is exceeded, the master database abandons the slave database and continues to execute transactions on the master database.
Reopen: the waiting time for the master database to try to reconnect to the slave database after the slave database fails. The unit is second (default: 300 ).
Db_unique_name: when the master database is connected to the slave database, it will send its own unique name. At the same time, it is required that the slave database return its unique name and use log_archive_config to verify its existence.
Valid_for: defines when to use the (Role-related) log_archive_dest_n parameter and the type of redo log files to run.
Available log file types: online_logfile, standby_logfile, all_logfiles
Available role types: primary_role, standby_role, all_roles
Master Database: log_archive_dest_1 = 'location =/u01/database/sybo3/arch db_unique_name = oradb valid_for = (all_logfiles, all_roles )';
Slave Database: log_archive_dest_2 = 'service = oradbdg async db_unique_name = oradbdg valid_for = (online_logfiles, primary_role )';
Log_archive_dest_3 = 'service = oradbdg2 async db_unique_name = oradbdg2 valid_for = (online_logfiles, primary_role )';
If you follow the preceding settings, log_archive_config should be set to log_archive_config = 'dg _ Config = (oradb, oradbdg, oradbdg2 )'
Defines the archive settings when a flash back area is used.
Log_archive_dest_1 = 'location = use_db_recovery_file_dest db_unique_name = oradb valid_for = (all_logfiles, all_roles )'

-- Author: Robinson Cheng
-- Blog: http://blog.csdn.net/robinson_0612

B. log_archive_dest_state_n = {enable | defer | alternate}
The specified parameter value is enable, which allows the redo transmission service to transmit the redo log data to the specified path. The default value is enable.

 

4. Backup database role Parameters
A, db_file_name_convert = 'location _ of_primary_database_datafile ', 'location _ of_standby_database_datafile'
This parameter should be set if the master and slave databases are on the same host or different hosts and different paths are used.
When the master database is switched or fails to the slave database, this parameter is converted and its value is forcibly written to the control file.
This parameter can also be used to specify the conversion location of the data file when RMAN copies the database. Reference: RMAN database clone File Location Conversion Method
Master Database:/u01/database/oradb/oradata *. db_file_name_convert = ('oradbdg', 'oradb ')
Slave Database:/u01/database/oradbdg/oradata *. db_file_name_convert = ('oradb', 'oradbdg ')
If you use ASM, you can set it to *. db_file_name_convert = ('+ data',' + recovery ')
 
B. log_file_name_convert = 'location _ of_primary_database_redo_logs ', 'location _ of_standby_database_redo_logs'
Specifies the online redo log file conversion relationship between the primary database and the standby database. The function is equivalent to db_file_name_convert.
Master Database:/u01/database/oradb/Redo *. db_file_name_convert = ('oradbdg', 'oradb ')
Slave Database:/u01/database/oradbdg/Redo *. db_file_name_convert = ('oradb', 'oradbdg ')

 

C. fal_server (fetch archive log) = oracle_net_service_name
This parameter is defined as the list of TNS names (pointing to the master database and any backup database) that exist on the slave server ). This parameter is valid only for physical standby databases.
It is mainly used to query the lost redo log intervals and process any uncertain interval requests published by the application process.
When the physical standby database encounters a redo interval, it cannot connect to the primary database, or it can extract logs from other standby databases.
Master Database: *. fal_server = oradbdg (the master database is set to swap the master and slave roles after the switch)
Slave Database: *. fal_server = oradb

 

D. fal_client = oracle_net_service_name
The client name (tnsnames) is requested at the log interval. The archiving process on fal_server can reverse connect to the requester. This parameter is valid only for physical standby databases.
The value of this parameter must be defined in the tnsnames file of the master database.
Master Database: *. fal_client = oradb (the master database is set to swap the master and slave roles after the switch)
Slave Database: *. fal_client = oradbdg

E, standby_file_management = {auto | manual}
This parameter is only applicable to physical standby databases. We recommend that you set the value to auto. In this way, when a data file is added or deleted to the master database, the corresponding changes are automatically made to the slave database.
Master Database: *. standby_file_management = auto (the master database is set to swap the master and slave roles after switching)
Slave Database: *. standby_file_management = auto

 

More references

For more information about Oracle RAC, see
Use crs_setperm to modify the resource owner and permissions of RAC.
Use crs_profile to manage RAC resource configuration files
RAC database startup and Shutdown
Oracle RAC services
Services in Oracle Database 10g
Migrate datbase from single instance to Oracle RAC
Connect Oracle RAC to a specified instance
Oracle RAC load balancing test (combined with server and client)
Oracle RAC server connection Load Balance)
Load Balance)
Non-Default port listening configuration in Oracle RAC (listener. ora tnsnames. ora)
Oracle RAC Listener Configuration (listener. ora tnsnames. ora)
Configure RAC load balancing and Failover
CRS-1006, CRS-0215 fault case
Installing Oracle 10g RAC Based on Linux (RHEL 5.5)
Use runcluvfy to verify the Oracle RAC installation environment

For more information about the basics and concepts of Oracle network configuration, see:
Configure dynamic service registration for non-default ports
Configure sqlnet. ora to restrict IP Access to Oracle
Configure and manage Oracle listener logs
Set the Oracle listener password (listener)
Configure the Oracle client to connect to the database

For more information about user-managed backup and recovery, see
Oracle cold backup
Oracle Hot Backup
Concept of Oracle backup recovery
Oracle instance recovery
Oracle recovery based on user management
System tablespace management and Backup Recovery
Sysaux tablespace management and recovery
Oracle backup control file recovery (unsing backup controlfile)

For information on RMAN backup recovery and management, see
RMAN overview and architecture
RMAN configuration, Monitoring and Management
Detailed description of RMAN backup
RMAN restoration and recovery
Create and use RMAN catalog
Create RMAN storage script based on catalog
Catalog-based RMAN backup and recovery
RMAN backup path confusion
Use RMAN for recovery from different machine backups (WIN platform)
Use RMAN to migrate a file system database to ASM
Linux RMAN backup shell script
Use RMAN to migrate the database to a different machine

For the Oracle architecture, see
Oracle tablespace and data files
Oracle Password File
Oracle parameter file
Oracle online redo log file)
Oracle Control File)
Oracle archiving logs
Oracle rollback and undo)
Oracle database instance startup and Shutdown Process
Automated Management of Oracle 10g SGA
Oracle instances and Oracle databases (Oracle Architecture)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.