您好,欢迎访问一九零五行业门户网

Oracle Data Guard创建物理Standby数据库

oracle data guard创建物理standby数据库 创建物理备库 机器名 a1 a2 ip: 192.168.1.10 192.168.1.20 net_name a1 a2 sid a1 a2 db_unique_name a1 a2 注:主节点上创建数据库a1,备节点上只安装oracle软件不创建任何数据库; 1.配置listener.ora 主节点listen
oracle data guard创建物理standby数据库
创建物理备库
机器名 a1 a2
ip: 192.168.1.10 192.168.1.20
net_name a1 a2
sid a1 a2
db_unique_name a1 a2
注:主节点上创建数据库a1,备节点上只安装oracle软件不创建任何数据库;
1.配置listener.ora
主节点listener.ora:
sid_list_listener=
(sid_list=
(sid_desc=
(global_dbname=a1)
(oracle_home=/u01/app/oracle/product/11.2.0/db_1)
(sid_name=a1)
)
)
listener =
(address_list=
(address=(protocol=tcp)(host=192.168.1.10)(port=1521))
(address=(protocol=ipc)(key=pnpkey))
)
备节点listener.ora:
sid_list_listener=
(sid_list=
(sid_desc=
(global_dbname=a1)
(oracle_home=/u01/app/oracle/product/11.2.0/db_1)
(sid_name=a1)
)
)
listener =
(address_list=
(address=(protocol=tcp)(host=192.168.1.20)(port=1521))
(address=(protocol=ipc)(key=pnpkey))
)
2.配置tnsnames.ora(主备节点的tnsname.ora内容一样:)
a1=
(description =
(address_list =
(address = (protocol = tcp)(host = 192.168.1.10)(port = 1521))
)
(connect_data =
(service_name = a1)
)
)
a2=
(description =
(address_list =
(address = (protocol = tcp)(host = 192.168.1.20)(port = 1521))
)
(connect_data =
(service_name = a2)
)
)
3.在主库启用归档并且启用强制归档
步骤1:alter database force logging;
archive log list;
步骤2:在mount状态下
alter database archivelog;
步骤3:alter database open;
archive log list;
4.在主库上创建密码文件
orapwd file='/u01/app/oracle/product/11.2.0/db_1/dbs/orapwa1.ora' password=xyc entries=10
5.创建standby redo log
alter database add standby logfile
group 4 ('/u01/app/oracle/oradata/a1/standby_redo04a.log','/u01/app/oracle/oradata/a1/standby_redo04b.log') size 50m,
group 5 ('/u01/app/oracle/oradata/a1/standby_redo05a.log','/u01/app/oracle/oradata/a1/standby_redo05b.log') size 50m,
group 6 ('/u01/app/oracle/oradata/a1/standby_redo06a.log','/u01/app/oracle/oradata/a1/standby_redo06b.log') size 50m,
group 7 ('/u01/app/oracle/oradata/a1/standby_redo07a.log','/u01/app/oracle/oradata/a1/standby_redo07b.log') size 50m;
注意:oracle 建议你在创建 standby 时就考虑 standby redolog 配置的问题。standby redologs 与 online redologs
非常类似,应该说两者只是服务对象不同,,其它参数属性甚至操作的命令格式几乎都一样,你在设计 standby
redologs 的时候完全可以借鉴创建 online redologs 的思路,比如多个文件组啦,每组多个文件冗余之类的。
除些之外呢,oracle 提供了一些标准的建议如下:
其它类似信息

推荐信息