ORACLE 12C ADG 之七 (DG 主機重啟)

#主机重启过程

#关闭顺序:1:先关闭主库,   2:暂停备库redo应用,    3:后关闭备库

#启动顺序:1:先启动备库,   2:后启动主库,                 3:启动备库redo应用


#具体步骤如下

#关闭顺序

#1:关闭主库

[oracle@DB196 ~]$ sqlplus / as sysdba

SQL> SHUTDOWN IMMEDIATE;

SQL> exit

[oracle@DB196 ~]$ lsnrctl stop

[oracle@DB196 ~]$ systemctl poweroff -i

2:暂停备库redo应用

[oracle@DB197 ~]$ sqlplus / as sysdba

SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE CANCEL;

3:后关闭备库

SQL> SHUTDOWN IMMEDIATE;

SQL> exit

[oracle@DB197 ~]$ lsnrctl stop

[oracle@DB197 ~]$ systemctl poweroff -i


#启动顺序:

1:先启动备库

[oracle@DB197 ~]$ lsnrctl start

[oracle@DB197 ~]$ sqlplus / as sysdba

SQL> STARTUP

2:后启动主库

[oracle@DB196 ~]$ lsnrctl start

[oracle@DB196 ~]$ sqlplus / as sysdba

SQL> STARTUP

3:启动备库应用

[oracle@DB197 ~]$ sqlplus / as sysdba

#開啟實時日誌應用

SQL> alter database recover managed standby database using current logfile disconnect from session;

#check,查看归档是否及时应用 (备库)

SQL> SELECT sequence#,applied FROM v$archived_log;

#如果发现全部都是YES,证明归档日志已经在同步

你可能感兴趣的:(ORACLE 12C ADG 之七 (DG 主機重啟))