文档课题:oracle物理备库与快照备库相互切换测试.
数据库:oracle 11.2.0.4
系统:centos 7.9
1、物理备库切换快照备库
SYS@orcldg> alter database recover managed standby database cancel;
Database altered.
SYS@orcldg> SHUTDOWN IMMEDIATE;
Database closed.
Database dismounted.
ORACLE instance shut down.
SYS@orcldg> STARTUP MOUNT;
ORACLE instance started.
Total System Global Area 1653518336 bytes
Fixed Size 2253784 bytes
Variable Size 1241517096 bytes
Database Buffers 402653184 bytes
Redo Buffers 7094272 bytes
Database mounted.
SYS@orcldg> SHOW PARAMETER db_recovery_file_dest;
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
db_recovery_file_dest string /u01/app/oracle/fast_recovery_
area
db_recovery_file_dest_size big integer 4182M
SYS@orcldg> ALTER DATABASE CONVERT TO SNAPSHOT STANDBY;
Database altered.
SYS@orcldg> ALTER DATABASE OPEN;
Database altered.
SYS@orcldg> select open_mode from v$database;
OPEN_MODE
--------------------
READ WRITE
SYS@orcldg> select database_role from v$database;
DATABASE_ROLE
----------------
SNAPSHOT STANDBY
2、快照备库切换物理备库
SYS@orcldg> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SYS@orcldg> startup mount;
ORACLE instance started.
Total System Global Area 1653518336 bytes
Fixed Size 2253784 bytes
Variable Size 1241517096 bytes
Database Buffers 402653184 bytes
Redo Buffers 7094272 bytes
Database mounted.
SYS@orcldg> alter database convert to physical standby;
Database altered.
SYS@orcldg> select open_mode from v$database;
select open_mode from v$database
*
ERROR at line 1:
ORA-01507: database not mounted
SYS@orcldg> shutdown immediate;
ORA-01507: database not mounted
ORACLE instance shut down.
SYS@orcldg> startup;
ORACLE instance started.
Total System Global Area 1653518336 bytes
Fixed Size 2253784 bytes
Variable Size 1241517096 bytes
Database Buffers 402653184 bytes
Redo Buffers 7094272 bytes
Database mounted.
Database opened.
SYS@orcldg> alter database recover managed standby database using current logfile disconnect from session;
Database altered.
SYS@orcldg> select open_mode,database_role from v$database;
OPEN_MODE DATABASE_ROLE
-------------------- ----------------
READ ONLY WITH APPLY PHYSICAL STANDBY
SYS@orcldg> select process,status from v$managed_standby;
PROCESS STATUS
--------- ------------
ARCH CONNECTED
ARCH CONNECTED
ARCH CLOSING
ARCH CONNECTED
RFS IDLE
RFS IDLE
RFS IDLE
MRP0 APPLYING_LOG
8 rows selected.
参考文档:https://www.cnblogs.com/NextAction/p/7366667.htm
oracle物理备库与快照备库相互切换测试
原创
©著作权归作者所有:来自51CTO博客作者Liujun_Deng的原创作品,请联系作者获取转载授权,否则将追究法律责任
提问和评论都可以,用心的回复会被更多人看到
评论
发布评论
相关文章
-
Oracle11g Data Guard--创建物理备库
Oracle 11g Data Guard 管理
oracle hive SQL -
oel 7.9搭建oracle 11.2.0.4物理备库
oel 7.9搭建oracle 11.2.0.4物理备库
oel 7.9 oracle 11.2.0.4 物理备库 oracle dg -
Oracle Dataguard 主备库的切换方法
oracle
oracle 切换 方法 -
物理备库在切换为主库时报错ORA-01577—主库已切换为备库
物理备库在切换为主库时报错ORA-01577—主库已切换为备库
oracle ORA-01577 -
dataguard之管理物理备库
启动和关闭物理备库
dataguard 物理备库管理 hive sql oracle -
Oracle-Data Guard之快照备库
Oracle 11g Data Guard Snapshot Standby配置 ...
DataGurad 数据 数据库 log日志 hive