Oracle dataguard Daily Maintenance Command Summary

Source: Internet
Author: User

1. Stop standby

Select process, status from V$managed_standby;---check if the repository is being restored in the application log

ALTER DATABASE recover managed standby database cancel;
Shutdown immediate;

 

2. Switch to read-only mode

-----switch from shutdown mode to read-only mode-------

Startup Nomount;
ALTER DATABASE mount standby database;
ALTER DATABASE open read only;

-----switch from Application log mode to read-only mode-------

ALTER DATABASE recover managed standby database cancel; --Cancel log application
ALTER DATABASE open read only;

 

3. Switch back to manage recovery mode

Startup Nomount;
ALTER DATABASE mount standby database;
ALTER DATABASE recover managed standby database disconnect from session; --Start log application

ALTER DATABASE recover managed standby database using current logfile disconnect from session;

 

4. Role switching between the main and standby libraries

4.1 Master Library switch to standby
ALTER DATABASE commit to switchover to physical standby;

ALTER DATABASE commit to switchover to physical the standby with session shutdown;--When the main library has a session connection
Shutdown immediate
Startup Nomount;
ALTER DATABASE mount standby database;
ALTER DATABASE recover managed standby database disconnect from session;

 

4.2 Switching from the library to the primary library

ALTER DATABASE commit to switchover to primary;
Shutdown immediate;
Startup
alter system switch logfile;

 

5. The repository is automatically restored using logs from the main library

ALTER DATABASE recover automatic standby database;

 

6. Change the protection mode

ALTER DATABASE set standby database to maximize protection;
ALTER DATABASE set standby database to maximize availability;
ALTER DATABASE set standby database to maximize Performancen;

 

7. Cancel Automatic recovery mode

ALTER DATABASE recover managed standby database cancel;
ALTER DATABASE recover managed standby database finish;
ALTER DATABASE recover managed standby database finish force;

This article is from the "Oracle World of Hunter" blog, please contact the author!

Oracle dataguard Daily Maintenance Command Summary

Related Article

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.