Before we discussed the "Linux Oracle 11g dataguard Physical standby configuration process,"
But in the actual process will encounter different problems, first we discuss the Oracle Dataguard three modes,
Maximum protection : The configuration of this mode guarantees the synchronization of the Master and the Repository, and the destruction of the main library in any case will not result in the loss of committed data. If there is a problem with the network between the master and the standby, or if the repository itself is having problems, it will cause the main library to stop processing.
Available Maximization : This pattern, like the one above, also guarantees synchronization of the main and standby libraries, except that the main library can continue processing when the network or the standby is unavailable.
maximized Performance : The main and standby libraries are asynchronous. This mode may lose a portion of the data when the main library is damaged. However, this mode minimizes the load on the main library and therefore has the best performance.
1. Maximum protection mode: (if this mode is used, it is best to establish multiple standby database to ensure that the log can be archived to at least one standby machine, reducing the chance of down-down.)
1). This mode provides the highest level of data protection
2). Redo log after at least one physical from the library database, the main library's transaction is able to commit
3). The main library will automatically shut down to prevent unprotected data from appearing
4 when it cannot find a suitable write from the library. Pros: This mode guarantees no data loss from the Library
5). Disadvantage: The automatic shutdown of the main library will affect the availability of the main library, and it needs to be recovered from the library before it can be submitted, the objective conditions such as network requirements are very high, the performance of the main library will be greatly affected.
2. Maximum availability mode: (This mode is recommended if there is only one standby and you do not want to have data loss.)
1). This mode provides a data protection capability that is second only to "Maximum protection mode"
2). Redo log after at least one physical from the library database, the main library's transaction is able to commit
3). When the main library cannot find a suitable write from the library, the main library is not closed, but temporarily lowered to "maximum performance mode" "mode until the problem is handled
4). Advantages: This mode can guarantee no data loss from the library without problems, and is a compromise method
5). Disadvantage: The disadvantage in the normal running process is that the performance of the main library is affected by many factors
3. Maximum Performance mode:
1). The default mode, which provides the maximum availability of the primary database
2). Ensure that the main library is running without being affected by the library, that the main library transaction is committed, and that no issues from the library affect the operation of the main library
4). Pros: Avoid the performance and usability impact from the library on the primary database
5) Disadvantage: If the transaction related to the primary library commits the recovery data that is not sent to the slave library, these transactional data will be lost and no data loss is guaranteed
You can choose the appropriate mode for your configuration, where we choose to change the mode to protection
Open the main library, modify the main library Dataguard protected mode
sql> shutdown immediate sql> startup Mount Sql> select Name,db_unique_name,protection_mode from V$database; NAME db_unique_name protection_mode----------------------------------------ORCL ORCL MAXIMUM Performance sql> ALTER DATABASE set standby database to maximize protection;
To toggle the main Library protection mode syntax:
ALTER database SET STANDBY database to maximize {PROTECTION | Availability | Performance}
Open the main library to the Open state and monitor the alert log file to see if the configuration was successful.
There may be some problems in the actual switchover, such as I am in the process of switching logs the following error, master data can not open
Error log:
Lgwr:minimum of 1 synchronous standby database required
Errors in FILE/ORACLE/APP/ORACLE/DIAG/RDBMS/NOD1/TEST/TRACE/TEST_LGWR_7255.TRC:
ORA-16072:A minimum of one standby database destination is required
Errors in FILE/ORACLE/APP/ORACLE/DIAG/RDBMS/NOD1/TEST/TRACE/TEST_LGWR_7255.TRC:
ORA-16072:A minimum of one standby database destination is required
Here's how to fix it:
sql> conn /as sysdbasql>startup mount; sql> alter database set standby database to maximize protection; Sql>alter system set log_archive_dest_2= ' service=nod2 lgwr sync affirm Net_timeout=120 valid_for= (online_logfiles,primary_role) db_unique_name=nod2 ' ; Sql> alter database open;database altered. sql> select name,db_unique_name,protection_mode from v$database;name DB_UNIQUE_NAME protection_mode--------- ------------------------------ -------------------- test nod1 maximum protection
In the actual operation of another problem, is to find that the log recovery can not be real-time to the repository, can be in the log recovery and read-only open the database, this has to mention a feature in Oracle 11G:Oracle 11g Physical Active Data Guard real-time queries (real-time query) function, implemented in the following ways
This process only needs to be implemented in the standby library
1) View the current status of the repository
Sql> Select Open_mode from V$database;open_mode--------------------mounted the standby library is in the Mount state.
2) Cancel the automatic recovery of the standby library
sql> ALTER DATABASE recover managed standby database Cancel;database altered.
3) Open Standby Library is adjusted to "READ only" status
sql> ALTER DATABASE open;database altered.sql> select Open_mode from V$database;open_ MODE--------------------READ only
4) Further recovery of the standby in the "READ only" state
[Email protected]@> ALTER DATABASE recover managed standby database using current logfile Disconnect;database. The term "USING current LOGFILE" means that the recovery is completed as soon as the repository receives the log. Sql> Select Open_mode from V$database;open_mode--------------------READ only with APPLY
The status "read with APPLY" means that the repository is in the READ only state and can accept logs from the main library to recover so that the repository can be instantly viewed for changes to the main library.
The test process is simple, we import a data table in the main library, and we see that there is almost no delay in the repository,
[Email protected] ~]# imp system/[email protected] Fromuser=kiss Touser=kiss File=kiss. DMP Ignore=y Log=kiss.log
This article is from the "xiangcun168" blog, make sure to keep this source http://xiangcun168.blog.51cto.com/4788340/1663330
Oracle 11g Dataguard Three modes as well as real-time queries (real-time query) feature settings