快速业务通道

rac-single data guard

作者 佚名技术 来源 Linux系统 浏览 发布时间 2012-03-25
pace=''UNDOTBS1''
*.user_dump_dest=''/u01/app/oracle/admin/syk/udump''

四、rac上相关准备操作(rac1上操作)

强制日志
SQL> alter database force logging;

备份
RMAN> backup database format ''/home/oracle/dgbak/racdbfull%u_%s_%p'';

生成standby上的控制文件
SQL> alter system archive log current;
SQL> alter database create standby controlfile as ''/home/oracle/standby-controlfile.ora'';

把所有文件(上面生成的控制文件,备份文件)拷到standby相应目录下

五、启动standby到nomount下(standby上做操作)
生成密码文件和参数文件
orapwd file=/u01/app/oracle/product/10.2.0/db_1/dbs/orapwpridb password=admin123
两个库的密码要相同,否则会有报错
create spfile from pfile=''/home/oracle/pfilesyk.ora'';

六、创建standby库(rac1上操作)

rman target / auxiliary sys/admin123@SYK_SINGLE

duplicate target database for standby;


七、standby上做检查(在standby上做操作)

select open_mode from v$database
select name from v$datafile
select name from v$tempfile
select member from v$logfile

八、创建standby日志(rac上每thread有两组日志,那在这里要创建三组)(在standby上做操作)

alter database add standby logfile thread 1 group 5 (''/oradata/syk/st_1_5.rdo'') size 50m;
alter database add standby logfile thread 1 group 6 (''/oradata/syk/st_1_6.rdo'') size 50m;
alter database add standby logfile thread 1 group 7 (''/oradata/syk/st_1_7.rdo'') size 50m;

alter database add standby logfile thread 2 group 8 (''/oradata/syk/st_2_8.rdo'') size 50m;
alter database add standby logfile thread 2 group 9 (''/oradata/syk/st_2_9.rdo'') size 50m;
alter database add standby logfile thread 2 group 10 (''/oradata/syk/st_2_10.rdo'') size 50m;

确认日志
select member from v$logfile

九、开始应用,启动MRP(在standby上操作)

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

取消日志应用
ALTER DATABASE RECOVER MANAGED STANDBY DATABASE CANCEL;


十、rac各个实例查看日志传送情况(每个实例上都检查)

SQL> select dest_name,status,error from v$archive_dest;


测试:
standby上做检查
SQL> select name from v$datafile;

NAME
--------------------------------------------------------------------------------
/oradata/syk/system.260.765584315
/oradata/syk/undotbs1.262.765584301
/oradata/syk/sysaux.265.765584299
/oradata/syk/users.267.765584315
/oradata/syk/undotbs2.261.765584301
/oradata/syk/moe.264.765584315
/oradata/syk/sunsyk.269.766200437

7 rows selected.

SQL> select max(sequence#) from v$archived_log;

MAX(SEQUENCE#)
--------------
51

rac1做检查
SQL> select open_mode from v$database;

OPEN_MODE
----------
MOUNTED

SQL> select name from v$datafile;

NAME
--------------------------------------------------------------------------------
ASM_DATA/syk/datafile/system.260.765584315
ASM_DATA/syk/datafile/undotbs1.262.765584301
ASM_DATA/syk/datafile/sysaux.265.765584299
ASM_DATA/syk/datafile/users.267.765584315
ASM_DATA/syk/datafile/undotbs2.261.765584301
ASM_DATA/syk/datafile/moe.264.765584315
AS

凌众科技专业提供服务器租用、服务器托管、企业邮局、虚拟主机等服务,公司网站:http://www.lingzhong.cn 为了给广大客户了解更多的技术信息,本技术文章收集来源于网络,凌众科技尊重文章作者的版权,如果有涉及你的版权有必要删除你的文章,请和我们联系。以上信息与文章正文是不可分割的一部分,如果您要转载本文章,请保留以上信息,谢谢!

分享到: 更多

Copyright ©1999-2011 厦门凌众科技有限公司 厦门优通互联科技开发有限公司 All rights reserved

地址(ADD):厦门软件园二期望海路63号701E(东南融通旁) 邮编(ZIP):361008

电话:0592-5908028 传真:0592-5908039 咨询信箱:web@lingzhong.cn 咨询OICQ:173723134

《中华人民共和国增值电信业务经营许可证》闽B2-20100024  ICP备案:闽ICP备05037997号