Home > Database > Mysql Tutorial > Oracle 10g配置Dataguard的相关参数解释

Oracle 10g配置Dataguard的相关参数解释

WBOY
Release: 2016-06-07 17:03:32
Original
1049 people have browsed it

文档里总结的很全, 不过有几个错误的(如fal_server和fal_client的说明)或说的不够明确的地方, 我做了一些修正. 为区别网络连接串

文档里总结的很全, 不过有几个错误的(如fal_server和fal_client的说明)或说的不够明确的地方, 我做了一些修正. 为区别网络连接串,SID的差异, 把主备库的信息先列一下.

主库:

版本: Oracle 10.2.0.1.0
ORACLE_SID = WENDING
db_name = WENDING
db_unique_name/instance_name = WENDING
global_name/service_names = WENDING.LK
net service name = DB_WENDING

备库:

ORACLE_SID = WDSTD
db_name = WENDING(物理备库)/WDSTD(逻辑备库)
db_unique_name/instance_name = WDSTD
global_name/service_names = WDSTD.LK
net service name = DB_WDSTD

两个库的tnsnames.ora配置一样,如下:

DB_WENDING =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = primary_server)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = WENDING.LK)
)
)
DB_WDSTD =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = standby_server)(PORT = 1521))
)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = WDSTD.LK)
)
)

配置Dataguard的相关参数解释:

1. DB_NAME, 数据库名字, 需要保持同一个DataGuard中所有主库和物理备库的DB_NAME相同, 逻辑备库可以不一样

primary端和standby端相同:
*.DB_NAME='WENDING'

2. DB_UNIQUE_NAME, 对应数据库的实例名, 每一个数据库需要指定一个唯一的名字

primary端:
*.DB_UNIQUE_NAME=WENDING

standby端:
*.db_unique_name=WDSTD

3. LOG_ARCHIVE_CONFIG, 该参数通过DG_CONFIG 属性罗列同一个DataGuard中所有DB_UNIQUE_NAME(含主库及备库), 以逗号分隔

primary端和standby端相同:
*.LOG_ARCHIVE_CONFIG='DG_CONFIG=(WENDING,WDSTD)'

4. CONTROL_FILES, 控制文件位置说明, 注意要修改到具体的控制文件位置

primary端:
*.control_files='/u01/oradata/WENDING/controlfile/o1_mf_4srph8fv_.ctl','/u02/flash_recovery_area/WENDING/controlfile/o1_mf_4srph96b_.ctl'

standby端:
*.control_files='/u01/oradata/WDSTD/controlfile/o1_mf_4srph8fv_.ctl','/u02/flash_recovery_area/WDSTD/controlfile/o1_mf_4srph96b_.ctl'

5. LOG_ARCHIVE_DEST_n, 归档文件的生成路径, LOCATION代表本地机上, SERVICE指明在另一台机器上

primary端:
*.LOG_ARCHIVE_DEST_1='LOCATION=/u01/arch/WENDING VALID_FOR=(ALL_LOGFILES,ALL_ROLES) DB_UNIQUE_NAME=WENDING'
*.LOG_ARCHIVE_DEST_2='SERVICE=DB_WDSTD LGWR ASYNC VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=WDSTD'

standby端:
*.LOG_ARCHIVE_DEST_1='LOCATION=/u01/arch/WDSTD VALID_FOR=(ALL_LOGFILES,ALL_ROLES) DB_UNIQUE_NAME=WDSTD'
*.LOG_ARCHIVE_DEST_2='SERVICE=DB_WENDING LGWR ASYNC VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=WENDING'

6. LOG_ARCHIVE_DEST_STATE_n, 指定参数值为ENABLE, 激活定义的归档日志目录, 允许redo传输服务传输redo数据到指定的路径

primary端:
*.LOG_ARCHIVE_DEST_STATE_1=ENABLE
*.LOG_ARCHIVE_DEST_STATE_2=ENABLE

standby端:
*.LOG_ARCHIVE_DEST_STATE_1=ENABLE
*.LOG_ARCHIVE_DEST_STATE_2=ENABLE

7. REMOTE_LOGIN_PASSWORDFILE, 推荐设置参数值为EXCLUSIVE或者SHARED, 注意保证相同DataGuard配置中所有db 服务器sys密码相同

primary端:
*.REMOTE_LOGIN_PASSWORDFILE=EXCLUSIVE

standby端:
*.REMOTE_LOGIN_PASSWORDFILE=EXCLUSIVE

8.LOG_ARCHIVE_FORMAT, 指定归档文件格式, 这里在主备端最好保持一样的格式

primary端:
*.LOG_ARCHIVE_FORMAT=log_%t_%s_%r.arc

standby端:
*.LOG_ARCHIVE_FORMAT=log_%t_%s_%r.arc

9. LOG_ARCHIVE_MAX_PROCESSES, 指定归档进程的数量(1-30), 默认值通常是2

本实验中没有对这个参数进行修改.

10. COMPATIBLE, 这个参数指明了Oracle的版本号, 主库和物理备库的Oracle版本必须一致, 逻辑备库可以不一样

primary端:
*.COMPATIBLE='10.2.0.4.0'

standby端:
*.COMPATIBLE='10.2.0.4.0'

linux

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template