Dataguard protection mode switching (Protection | availability | performance)

Source: Internet
Author: User

1. First, check the current protection mode-primary database operations
SQL> select protection_mode, protection_level from V $ database;
Protection_mode protection_level
----------------------------------------
Maximum performance

2. Modify the initialization parameter-primary database operation
SQL> alter system set log_archive_dest_2 = 'service = standby
2 optional lgwr sync affrem valid_for = (online_logfiles, primary_role)
3 db_unique_name = standby ';
The system has been changed.

3. Restart the database and set a new data protection mode-primary database operation
The statement is very simple, as follows:
SQL> shutdown immediate
The database has been closed.
The database has been detached.
The Oracle routine has been disabled.

SQL> startup Mount
The Oracle routine has been started.
Total system global area 167772160 bytes
Fixed size 1289484 bytes
Variable Size 121635572 bytes
Database buffers 37748736 bytes
Redo buffers 7098368 bytes
The database has been loaded.

SQL> alter database set standby database to maximize availability;
The database has been changed.

Tip: Maximize and {protection | availability | performance} correspond to the maximum protection, maximum availability, and maximum performance respectively.
Drop the database and restart

SQL> alter database open;

4. Check the current protection mode-primary database operations
SQL> select protection_mode, protection_level from V $ database;
Protection_mode protection_level
----------------------------------------
Maximum availability

5. Modify the standby initialization parameter settings (mainly considering Role Switching. skip this step if you only want to test) --- standby database operations
SQL> alter system set log_archive_dest_2 = 'service = primary optional lgwr sync affsert
2 valid_for = (online_logfiles, primary_role) db_unique_name = primary ';
The system has been changed.

View the current protection mode
SQL> select instance_name from V $ instance;
Instance_name
----------------
Standby

SQL> select protection_mode, protection_level from V $ database;
Protection_mode protection_level
----------------------------------------
Maximum availability

Configuration successful. Test the configuration on the front.

6. Stop the standby database and check the status of the primary database.
SQL> select protection_mode, protection_level from V $ database;
Protection_mode protection_level
----------------------------------------
Maximum availability Resynchronization
After the standby database is shut down, the protection level of the primary database is switched to be synchronized.

 

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.