ITPub博客

首页 > Linux操作系统 > Linux操作系统 > oracle 10g physical standby 切换操作

oracle 10g physical standby 切换操作

Linux操作系统 作者:season0891 时间:2017-10-29 18:08:08 0 删除 编辑
primary库操作:
SQL> select name,open_mode,protection_mode,database_role from v$database;
NAME      OPEN_MODE  PROTECTION_MODE      DATABASE_ROLE
--------- ---------- -------------------- ----------------
YGH       READ WRITE MAXIMUM PERFORMANCE  PRIMARY
SQL> alter database commit to switchover to physical standby with session shutdown;
Database altered.
SQL> shutdown immediate
ORA-01507: database not mounted

ORACLE instance shut down.
SQL> startup nomount
ORACLE instance started.
Total System Global Area  264241152 bytes
Fixed Size                  1218868 bytes
Variable Size              88082124 bytes
Database Buffers          171966464 bytes
Redo Buffers                2973696 bytes
SQL> alter database mount standby database;
Database altered.
SQL> alter database recover managed standby database disconnect from session;
Database altered.
SQL> select name,open_mode,protection_mode,database_role from v$database;
NAME      OPEN_MODE  PROTECTION_MODE      DATABASE_ROLE
--------- ---------- -------------------- ----------------
YGH       MOUNTED    MAXIMUM PERFORMANCE  PHYSICAL STANDBY
standby库操作:
SQL> select name,open_mode,protection_mode,database_role from v$database;
NAME      OPEN_MODE  PROTECTION_MODE      DATABASE_ROLE
--------- ---------- -------------------- ----------------
YGH       MOUNTED    MAXIMUM PERFORMANCE  PHYSICAL STANDBY
SQL> alter database commit to switchover to primary;
Database altered.
SQL> shutdown immediate
ORA-01109: database not open

Database dismounted.
ORACLE instance shut down.
SQL> startup
ORACLE instance started.
Total System Global Area  264241152 bytes
Fixed Size                  1218868 bytes
Variable Size              88082124 bytes
Database Buffers          171966464 bytes
Redo Buffers                2973696 bytes
Database mounted.
Database opened.
SQL> select name,open_mode,protection_mode,database_role from v$database;
NAME      OPEN_MODE  PROTECTION_MODE      DATABASE_ROLE
--------- ---------- -------------------- ----------------
YGH       READ WRITE MAXIMUM PERFORMANCE  PRIMARY

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/90618/viewspace-2146564/,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2008-06-10

  • 博文量
    791
  • 访问量
    1938971