To achieve maximum protection mode, you can first implement the maximum performance mode and then convert to maximum protection mode.
One or three modes of protection
Maximum performance (maximize performance): This is the Data Guard default protection mode. There is no need to receive feedback from the standby before a transaction commits on Primay, which may lose data in the case of a primary failure, but the standby has the least impact on the performance of the primary.
Maximum available (Maximize availability): Under normal circumstances, the maximum available mode is the same as the maximum protection mode; When standby is unavailable, the maximum available mode is automatically reduced to the maximum performance mode, so standby failure does not cause Primay to be unavailable. As long as at least one standby is available, even the primary down machine guarantees no loss of data.
Maximum protection (Maximize protection): The highest level of protection mode. Transactions on Primay must confirm that redo has been passed to at least one standby, and primary will hang if all standby are not available. This mode can guarantee 0 data loss.
Second, view the current protection mode
Sql> select Database_role,protection_mode,protection_level from V$database;
Database_role Protection_mode Protection_level
---------------- -------------------- --------------------
PRIMARY MAXIMUM Performance MAXIMUM performance
Three, two kinds of log transmission mode
Arch: The traditional way of log shipping. It is now available only when the maximum performance mode is used. The archive log is routed through the arch process on the primary to standby's RFS process.
Lgwr:oracle9i can start using LGWR to deliver logs to the standby immediately, instead of waiting for the archive to deliver, reducing the potential loss of data. This method can be used to transfer logs in three protected modes. Using the Lgwr method, the standby redo must be established on the standby library logfile
Four, view log shipping mode
Sql> select Dest_name,archiver from V$archive_dest;
Dest_name archiver
-------------------- ----------
Log_archive_dest_1 ARCH
Log_archive_dest_2 LGWR
Log_archive_dest_3 ARCH
Log_archive_dest_4 ARCH
Log_archive_dest_5 ARCH
Log_archive_dest_6 ARCH
log_archive_dest_7 ARCH
Log_archive_dest_8 ARCH
Log_archive_dest_9 ARCH
Log_archive_dest_10 ARCH
Ten rows selected.
V. Add standby Redo LogFile
First stop standby automatic recovery status
sql> ALTER DATABASE recover managed standby database finish;
Database altered.
If you do not stop the AutoRecover state to add standby logfile, you will get an error:
Ora-01156:recovery in progress could need access to files
sql> ALTER DATABASE Add standby logfile Group 4 (' D:/oracle/oradata/test/standby
04.redo ') size 10m;
Database altered.
sql> ALTER DATABASE Add standby logfile Group 5 (' D:/oracle/oradata/test/standby
05.redo ') size 10m;
Database altered.
sql> ALTER DATABASE Add standby logfile Group 6 (' D:/oracle/oradata/test/standby
06.redo ') size 10m;
Database altered.
Note that the group name of the standby logfile cannot be duplicated with the redo logfile Group of primary because my primay already has 3 sets of logs, and the three groups added here standby logfile start with Group 4. At the same time, the size of the standby redo logfile is consistent with the redo logfile of primary.
Vi. Setting the Standby archive path
log_archive_dest_1= ' Location=/free/oracle/orabak '
Standby_archive_dest= '/free/oracle/orabak '
Change the primary to use LGWR to transfer the log
Sql> alter system set log_archive_dest_2= ' Service=standby lgwr async ';
System altered.
On the primary swith logfile
sql> alter system switch logfile;
System altered.
A successful record can be seen in Primary's alter.
Thu Nov 23 12:41:28 2006
ALTER SYSTEM SET log_archive_dest_2= ' service=standby lgwr async ' Scope=both;
Thu Nov 23 12:43:12 2006
Lgwr:setting ' active ' Archival for destination log_archive_dest_2
***********************************************************
Creating archive Destination log_archive_dest_2: ' Standby '
LNS0 started with pid=13
Thu Nov 23 12:43:16 2006
This article URL address: http://www.bianceng.cn/database/Oracle/201410/45388.htm