Oracle Data Guard创建物理Standby数据库
创建物理备库
机器名 a a
IP:
Net_Name a a
SID a a
DB_UNIQUE_NAME a a
注主节点上创建数据库a备节点上只安装oracle软件不创建任何数据库;
配置listenerora
主节点listenerora
SID_LIST_LISTENER=
(SID_LIST=
(SID_DESC=
(GLOBAL_DBNAME=a)
(ORACLE_HOME=/u/app/oracle/product//db_)
(SID_NAME=a)
)
)
LISTENER =
(ADDRESS_LIST=
(ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=))
(ADDRESS=(PROTOCOL=ipc)(KEY=PNPKEY))
)
备节点listenerora:
SID_LIST_LISTENER=
(SID_LIST=
(SID_DESC=
(GLOBAL_DBNAME=a)
(ORACLE_HOME=/u/app/oracle/product//db_)
(SID_NAME=a)
)
)
LISTENER =
(ADDRESS_LIST=
(ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=))
(ADDRESS=(PROTOCOL=ipc)(KEY=PNPKEY))
)
配置tnsnamesora(主备节点的tnsnameora内容一样)
a=
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = )(PORT = ))
)
(CONNECT_DATA =
(SERVICE_NAME = a)
)
)
a=
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = )(PORT = ))
)
(CONNECT_DATA =
(SERVICE_NAME = a)
)
)
在主库启用归档并且启用强制归档
步骤alter database force logging;
archive log list;
步骤在mount状态下
alter database archivelog;
步骤alter database open;
archive log list;
在主库上创建密码文件
orapwd file=/u/app/oracle/product//db_/dbs/orapwaora password=xyc entries=
创建standby redo log
alter database add standby logfile
group (/u/app/oracle/oradata/a/standby_redoalog/u/app/oracle/oradata/a/standby_redoblog) size m
group (/u/app/oracle/oradata/a/standby_redoalog/u/app/oracle/oradata/a/standby_redoblog) size m
group (/u/app/oracle/oradata/a/standby_redoalog/u/app/oracle/oradata/a/standby_redoblog) size m
group (/u/app/oracle/oradata/a/standby_redoalog/u/app/oracle/oradata/a/standby_redoblog) size m;
注意Oracle 建议你在创建 standby 时就考虑 standby redolog 配置的问题standby redologs 与 online redologs
非常类似应该说两者只是服务对象不同其它参数属性甚至操作的命令格式几乎都一样你在设计 standby
redologs 的时候完全可以借鑒创建 online redologs 的思路比如多个文件组啦每组多个文件冗余之类的
除些之外呢oracle 提供了一些标准的建议如下