DataGuard - Sun Cluster + Data Guard灾备环境演示步骤

Posted on 2004-08-05 18:45  xublogs  阅读(292)  评论(0编辑  收藏  举报

演示步骤:

一、功能

1.      280 cluster环境为primary 480standby,一分钟归档一次,standby处于管理恢复状态

2.      业务端作资金存取,股份存取,委托买卖

3.      alter database recover managed standby database finish; alter database open read only;

4.      TOAD检查相应表

5.      恢复到管理恢复状态:ALTER DATABASE RECOVER MANAGED STANDBY DATABASE DISCONNECT FROM SESSION;

 

二、性能

1. 业务端作配售、报盘回报、委托,演示备用库的恢复速度,记录总共操作的时间

2. tail –f /export/home/oracle/app/oracle/admin/ctsdb/bdump/alert_ctsdb.log

 

1. 停止远程归档路径,业务端作配售、报盘回报、委托,记录总共操作的时间,跟灾备环境中的操作速度作比较(此项最后作)

 

三、灾备环境切换

1.      切换cluster节点,演示cluster功能

/usr/cluster/bin/scswitch –z –g oracle-rg –h ctsdb2

2.      业务端作功能操作,演示cluster切换成功

3.      切换回ctsdb1

/usr/cluster/bin/scswitch –z –g oracle-rg –h ctsdb1

4.      业务端作功能操作

5.      关闭cluster,单独起一个节点的oracle

/usr/cluster/bin/scswitch -F -g oracle-rg

mount /global/oradata

cd /export/home/oracle/app/oracle/product/9.2.0/network/admin

cp listener.ora.sigle listener.ora

lsnrctl start

lsnrctl start listener_dg

sqlplus “/ as sysdba”

startup

6.      切换PrimaryStandby

P

ALTER DATABASE COMMIT TO SWITCHOVER TO PHYSICAL STANDBY;

SHUTDOWN IMMEDIATE;

STARTUP NOMOUNT;

ALTER DATABASE MOUNT STANDBY DATABASE;

 

S

ALTER DATABASE COMMIT TO SWITCHOVER TO PRIMARY;

SHUTDOWN IMMEDIATE;

STARTUP;

 

P

ALTER DATABASE RECOVER MANAGED STANDBY DATABASE DISCONNECT FROM SESSION;

7.      修改应用网关的配置,测试应用

8.      重新将PrimaryStandby互换

9.      关闭Primary,关闭监听

lsnrctl stop

lsnrctl stop listener_dg

sqlplus “/ as sysdba”

shutdown immediate

10. 还原监听配置:

cd /export/home/oracle/app/oracle/product/9.2.0/network/admin

cp listener.ora.cluster listener.ora

11. 启动cluster

/usr/cluster/bin/scswitch –Z –g oracle-rg

测试应用