『ORACLE』 Real-time Query(11g)
SQL> select database_role,open_mode from v$database;
DATABASE_ROLE OPEN_MODE
---------------- --------------------
PHYSICAL STANDBY MOUNTED
取消应用日志
SQL> alter database recover managed standby database cancel;
Database altered.
打开数据库,打开后为read only模式
SQL> alter database open;
Database altered.
SQL> select database_role,open_mode from v$database;
DATABASE_ROLE OPEN_MODE
---------------- --------------------
PHYSICAL STANDBY READ ONLY
SQL> alter database recover managed standby database using current logfile disconnect from session;
Database altered.
此时的状态即为read only with apply
SQL> select database_role,open_mode from v$database;
DATABASE_ROLE OPEN_MODE
---------------- --------------------
PHYSICAL STANDBY READ ONLY WITH APPLY