利用rman构建physical standby指南
之前整理过一篇利用数据库冷备份创建physical standby的文章,数据库的冷备需要停机,在生产环境中实用性不大,本将中将介绍如何利用rman热备来创建dataguard物理备库,这样主库只需要重启一次即可,大大提高了主库的高可用性!
环境介绍:
primary:rhel5.4 32位 192.168.227.20/24
standby:rhel5.4 32位 192.168.227.30/24
oracle版本: 10.2.0.1 32位企业版
一:standby服务器
1:主库上开启Forced Logging
SQL> alter database force logging; Database altered. 2:在备库上创建密码文件,这里直接从主库复制到备库
[oracle@orcl ~]$ scp $ORACLE_HOME/dbs/orapworcl 192.168.227.30:/u01/app/oracle/product/10.2.0/db_1/dbs oracle@192.168.227.30's password: orapworcl 100% 1536 1.5KB/s 00:00 3:主库上配置Standby Redo Log
SQL> select member from v$logfile; MEMBER --------------------------------------- /u01/app/oracle/oradata/orcl/redo03.log /u01/app/oracle/oradata/orcl/redo02.log /u01/app/oracle/oradata/orcl/redo01.log SQL> !du -sh /u01/app/oracle/oradata/orcl/redo01.log 51M /u01/app/oracle/oradata/orcl/redo01.log SQL> alter database add standby logfile group 4 2 '/u01/app/oracle/oradata/orcl/standby/standby04.log' size 50M; Database altered. SQL> SELECT GROUP#,THREAD#,SEQUENCE#,ARCHIVED,STATUS FROM V$STANDBY_LOG; GROUP# THREAD# SEQUENCE# ARC STATUS ---------- ---------- ---------- --- ---------- 4 0 0 YES UNASSIGNED 5 0 0 YES UNASSIGNED 6 0 0 YES UNASSIGNED 4.修改主库的初始化参数
SQL> show parameter db_name; NAME TYPE VALUE ------------------------------------ ----------- ------------------------------ db_name string orcl SQL> show parameter db_unique_name; NAME TYPE VALUE ------------------------------------ ----------- ------------------------------ db_unique_name string orcl SQL> alter system set LOG_ARCHIVE_CONFIG='DG_CONFIG=(primary,standby)'; System altered. SQL> alter system set log_archive_dest_1='LOCATION=/u01/arch/orcl valid_for=(all_logfiles,all_roles) db_unique_name=orcl' scope=spfile; System altered. SQL> alter system set log_archive_dest_2='service=
- 发表评论
-
- 最新评论 更多>>