一 正確打開主庫和備庫
1 主庫:
SQL> STARTUP MOUNT;
SQL> ALTER DATABASE ARCHIVELOG;
SQL> ALTER DATABASE OPEN;
2 備庫:
SQL> STARTUP MOUNT;
SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE DISCONNECT FROM SESSION;
二 正確關閉順序
1 備庫:
SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE CANCEL;
SQL>SHUTDOWN IMMEDIATE;
2 主庫
SQL>SHUTDOWN IMMEDIATE;
三 備庫Read-Only模式打開
當前主庫正常OPEN狀態
備庫處於日志傳送狀態.
1 在備庫停止日志傳送
SQL> recover managed standby database cancel;
2 備庫Read-only模式打開
SQL> alter database open read only;
3 備庫回到日志傳送模式
SQL> recover managed standby database disconnect from session;
Media recovery complete.
SQL> select status from v$instance;
STATUS
------------
MOUNTED