Get the App
SLTechnology News&Howtos  ›  Database  › 

Summary of oracle dataguard daily maintenance commands

Shulou Source: shulou.com Published: 2022-06-01 14:47:21 10月03日 Update

1. Stop Standby

Select process, status from vastly managed standby;-- check whether the repository is in the application log for recovery

Alter database recover managed standby database cancel

Shutdown immediate

two。 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 the managed recovery model

Startup nomount

Alter database mount standby database

Alter database recover managed standby database disconnect from session;-start the log application

Alter database recover managed standby database using current logfile disconnect from session

4. Switch roles between main library and standby database

4.1 switch from main library to standby library

Alter database commit to switchover to physical standby

When the alter database commit to switchover to physical standby with session shutdown;-- 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 switch from library to main library

Alter database commit to switchover to primary

Shutdown immediate

Startup

Alter system switch logfile

5. The standby database automatically uses the logs sent from the main database for recovery.

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 the automatic recovery model

Alter database recover managed standby database cancel

Alter database recover managed standby database finish

Alter database recover managed standby database finish force

Tags: Mode switching logging application between time role protection management command Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Technology OPPO Reno Microsoft Apple MariaDB