Standby Redo Log setting principles, creating, deleting, viewing, filing locations

Source: Internet
Author: User



Set:


1. Each standby redo log file is at least as large as the redo log of the primary database, and for ease of administration, Oracle recommends that the redo log of the master repository be set to the same size.
Sql> SELECT group#, bytes/1024/1024 M from V$log;


2.Standby Redo Log Group is at least one more group than the Redo log group of primary database. You can query the V$log view in the primary library to determine how many sets of redo log groups The main library has.
Formula: Nx+1 (n is the number of log groups, X is the number of nodes)




Note: (Oracle recommends that you also create standby redo log in the primary library so that redo data can be received immediately after switchover. )




Create:


Sql>alter database Add standby logfile thread 1 Group 5 size 50m,group 6 size 50m,group 7 size 50m; (RAC)
sql> ALTER DATABASE ADD STANDBY LOGFILE (' xxxxxxx ') SIZE 500M; (one node)






Note: When the Redo log group is added to the main library, a corresponding standby redo log group must also be added to the standby library. Otherwise, the standby database may not sync after the switch log in the main library, shutdown.


Delete:


sql> ALTER DATABASE drop standby logfile group X;




View:


The standby library executes the following SQL query for each standby redo log size and the members of each group:
Sql> SELECT group#, bytes/1024/1024 M from V$standby_log;






Archive location:


In log reception, it is important to note where the archive log will be placed:
1) If the Standby_archive_dest parameter is configured, the directory specified by the parameter is used.
2) If a log_archive_dest_n parameter explicitly defines the valid_for= (standby_logfile,*) option, the directory specified by this parameter is used.
4) If the standby_archive_dest and Log_archive_dest_n parameters are not configured, use the default standby_archive_dest parameter value, which is the default value of $oracle_home/dbs/arc.






1) Set standby Redo Log archive to FRA (Fast recovery area)
1. Set the Location property of the Log_archive_dest_n parameter equal to Use_db_recovery_file_dest.
2. Set the Valid_for property of the Log_archive_dest_n parameter to allow archiving.
Valid_for= (All_logfiles,all_roles)




2) Set standby Redo Log Archive to local file system
The setup steps are as follows:
1. Set the Location property of the Log_archive_dest_n parameter.
2. Set the Valid_for property of the Log_archive_dest_n parameter to allow archiving.
Example:
log_archive_dest_2 = ' location =/disk2/archive
Valid_for= (Standby_logfile,standby_role) '
Log_archive_dest_state_2=enable
Valid_for= (Standby_logfile,standby_role) '

Standby Redo Log setting principles, creating, deleting, viewing, filing locations

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.