好文档 - 专业文书写作范文服务资料分享网站

oracle data grard

天下 分享 时间: 加入收藏 我要投稿 点赞

SQL> select username from t; select username from t *

ERROR at line 1:

ORA-01219: database not open: queries allowed on fixed tables/views only

SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE CANCEL;

Database altered.

SQL> ALTER DATABASE OPEN READ ONLY;

Database altered.

SQL> select username from t;

USERNAME

------------------------------ SYS SYSTEM DBSNMP OUTLN WMSYS

SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE DISCONNECT FROM SESSION;

Database altered.

SQL>

12.把数据库切换回到主节点

在主节点

SQL> alter database commit to switchover to physical standby;

Database altered.

SQL> shutdown immediate

ORA-01507: database not mounted

statORACLE instance shut down. SQL> startup nomount; ORACLE instance started.

Total System Global Area 135337420 bytes Fixed Size 452044 bytes Variable Size 109051904 bytes Database Buffers 25165824 bytes Redo Buffers 667648 bytes

SQL> alter database mount standby database;

Database altered.

SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE DISCONNECT FROM SESSION;

Database altered.

在备用节点

SQL> alter database commit to switchover to primary;

Database altered.

SQL> shutdown immediate; ORA-01507: database not mounted

ORACLE instance shut down. SQL> startup

ORACLE instance started.

Total System Global Area 135337420 bytes Fixed Size 452044 bytes Variable Size 109051904 bytes Database Buffers 25165824 bytes Redo Buffers 667648 bytes Database mounted. Database opened.

完成自由切换

oracle data grard

SQL>selectusernamefromt;selectusernamefromt*ERRORatline1:ORA-01219:databasenotopen:queriesallowedonfixedtables/viewsonlySQL>AL
推荐度:
点击下载文档文档为doc格式
7359n5ld6d9lpyv23wwc1symv1jox50079i
领取福利

微信扫码领取福利

微信扫码分享