<div style="font-family:微软雅黑;font-size:14px;line-height:21px;white-space:n
ORMal;widows:auto;background-color:#FFFFFF;">
oracle 11g dataguard 配置简约步骤
</div>
<div style="font-family:微软雅黑;font-size:14px;line-height:21px;white-space:normal;widows:auto;background-color:#FFFFFF;">
本步骤通过rman的duplicate实现,本方法适合于
大数据库,也可以作为复制
数据库的参考
</div>
<div style="font-family:微软雅黑;font-size:14px;line-height:21px;white-space:normal;widows:auto;background-color:#FFFFFF;">
0.编辑/etc/hosts
</div>
<div style="font-family:微软雅黑;font-size:14px;line-height:21px;white-space:normal;widows:auto;background-color:#FFFFFF;">
1.在主
数据库开启force logging
</div>
<div style="font-family:微软雅黑;font-size:14px;line-height:21px;white-space:normal;widows:auto;background-color:#FFFFFF;">
alter database force logging;
</div>
<div style="font-family:微软雅黑;font-size:14px;line-height:21px;white-space:normal;widows:auto;background-color:#FFFFFF;">
2.
网络配置(监听器使用静态注册,网络服务名primary、standby,使用tnsping命令
测试连通性)
</div>
<div style="font-family:微软雅黑;font-size:14px;line-height:21px;white-space:normal;widows:auto;background-color:#FFFFFF;">
3.复制目录到备库机器 11g的目录结构和10g略有不同,复制的时候考虑周全
</div>
<div style="font-family:微软雅黑;font-size:14px;line-height:21px;white-space:normal;widows:auto;background-color:#FFFFFF;">
4.在目标数据库创建口令文件,口令需要和主库一致
</div>
<div style="font-family:微软雅黑;font-size:14px;line-height:21px;white-space:normal;widows:auto;background-color:#FFFFFF;">
orapwd file=orapwdb01 pass
Word=Oracle01 entries=5
</div>
<div style="font-family:微软雅黑;font-size:14px;line-height:21px;white-space:normal;widows:auto;background-color:#FFFFFF;">
5.在主库生成pfile参数文件,编辑参数,满足dg需要,copy参数文件到备库,并作相应的修改
</div>
<div style="font-family:微软雅黑;font-size:14px;line-height:21px;white-space:normal;widows:auto;background-color:#FFFFFF;">
db_unique_name='PRIMARY'
</div>
<div style="font-family:微软雅黑;font-size:14px;line-height:21px;white-space:normal;widows:auto;background-color:#FFFFFF;">
LOG_ARC
Hive_CONFIG='DG_CONFIG=(primary,standby)'
</div>
<div style="font-family:微软雅黑;font-size:14px;line-height:21px;white-space:normal;widows:auto;background-color:#FFFFFF;">
LOG_ARCHIVE_DEST_1='LOCAT
ioN=/home/oracle/archdest VALID_FOR=(ALL_LOGFILES,ALL_ROLES)
</div>
<div style="font-family:微软雅黑;font-size:14px;line-height:21px;white-space:normal;widows:auto;background-color:#FFFFFF;">
DB_UNIQUE_NAME=primary'
</div>
<div style="font-family:微软雅黑;font-size:14px;line-height:21px;white-space:normal;widows:auto;background-color:#FFFFFF;">
LOG_ARCHIVE_DEST_2='SERVICE=standby LGWR SYNC VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE)
</div>
<div style="font-family:微软雅黑;font-size:14px;line-height:21px;white-space:normal;widows:auto;background-color:#FFFFFF;">
DB_UNIQUE_NAME=standby'
</div>
<div style="font-family:微软雅黑;font-size:14px;line-height:21px;white-space:normal;widows:auto;background-color:#FFFFFF;">
LOG_ARCHIVE_DEST_STATE_1=ENABLE
</div>
<div style="font-family:微软雅黑;font-size:14px;line-height:21px;white-space:normal;widows:auto;background-color:#FFFFFF;">
LOG_ARCHIVE_DEST_STATE_2=ENABLE
</div>
<div style="font-family:微软雅黑;font-size:14px;line-height:21px;white-space:normal;widows:auto;background-color:#FFFFFF;">
REMOTE_LOGIN_PASSWORDFILE=EXCLUSIVE
</div>
<div style="font-family:微软雅黑;font-size:14px;line-height:21px;white-space:normal;widows:auto;background-color:#FFFFFF;">
fal_server=standby
</div>
<div style="font-family:微软雅黑;font-size:14px;line-height:21px;white-space:normal;widows:auto;background-color:#FFFFFF;">
fal_client=primary
</div>
<div style="font-family:微软雅黑;font-size:14px;line-height:21px;white-space:normal;widows:auto;background-color:#FFFFFF;">
STANDBY_FILE_MANAGEMENT=AUTO
</div>
<div style="font-family:微软雅黑;font-size:14px;line-height:21px;white-space:normal;widows:auto;background-color:#FFFFFF;">
6.备机同时连接主库(target)和备库(duplicate)
</div>
<div style="font-family:微软雅黑;font-size:14px;line-height:21px;white-space:normal;widows:auto;background-color:#FFFFFF;">
rman target sys/Oracle01@primary auxiliary sys/Oracle01@standby nocatalog
</div>
<div style="font-family:微软雅黑;font-size:14px;line-height:21px;white-space:normal;widows:auto;background-color:#FFFFFF;">
7.使用duplicate命令生成standby 数据库
</div>
<div style="font-family:微软雅黑;font-size:14px;line-height:21px;white-space:normal;widows:auto;background-color:#FFFFFF;">
duplicate target database for standby from active database nofilenamecheck;
</div>
<div style="font-family:微软雅黑;font-size:14px;line-height:21px;white-space:normal;widows:auto;background-color:#FFFFFF;">
8.在主备库添加备重做
日志文件
</div>
<div style="font-family:微软雅黑;font-size:14px;line-height:21px;white-space:normal;widows:auto;background-color:#FFFFFF;">
alter database add standby logfile
</div>
<div style="font-family:微软雅黑;font-size:14px;line-height:21px;white-space:normal;widows:auto;background-color:#FFFFFF;">
group 4 ('/u01/app/oracle/oradata/db01/redo04.log') size 50m,
</div>
<div style="font-family:微软雅黑;font-size:14px;line-height:21px;white-space:normal;widows:auto;background-color:#FFFFFF;">
group 5 ('/u01/app/oracle/oradata/db01/redo05.log') size 50m,
</div>
<div style="font-family:微软雅黑;font-size:14px;line-height:21px;white-space:normal;widows:auto;background-color:#FFFFFF;">
group 6 ('/u01/app/oracle/oradata/db01/redo06.log') size 50m,
</div>
<div style="font-family:微软雅黑;font-size:14px;line-height:21px;white-space:normal;widows:auto;background-color:#FFFFFF;">
group 7 ('/u01/app/oracle/oradata/db01/redo07.log') size 50m;
</div>
<div style="font-family:微软雅黑;font-size:14px;line-height:21px;white-space:normal;widows:auto;background-color:#FFFFFF;">
9.简单测试datagurad。
</div>
0