没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
Oracle RAC+ASM+DataGuard配置实验记
录+常见问题
Oracle RAC+ASM+DataGuard配置 实验 记录+常见问题
1、环境规划:
---RAC 环境介绍 (primary database)
rac1 rac2
______________________________________________________
public ip 192.168.110.11 192.168.110.12
______________________________________________________
virtual ip 192.168.110.21 192.168.110.22
_____________________________________________________
instance racdb1 racdb2
______________________________________________________
db_name racdb
_______________________________________________________
storage mode ASM
__________________________________________________
--- 单机环境介绍( standby database )
数据文件可放至本地, 也可以放至 ASM上,本实验中先放至本地实验
_____________________________________________________________________
_____
ip 192.168.110.11 192.168.110.12
_____________________________________________________________________
______
instance 192.168.110.13(rac3)
_____________________________________________________________________
______
storage mode /oradata/racdb
_____________________________________________________________________
______
----hosts 文件
#Public Network - (eth0)
192.168.110.11 rac1
192.168.110.12 rac2
192.168.110.13 rac3
#Private Interconnect - (eth1)
10.10.10.11 rac1priv
10.10.10.12 rac2priv
#Public Virtual IP (VIP) addresses - (eth0)
192.168.110.21 rac1vip
192.168.110.22 rac2vip
-- 检查环境
1)、启动 archivelog 归档模式
SQL> archive log list;
Database log mode Archive Mode
Automatic archival Enabled
Archive destination USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence 54
Next log sequence to archive 56
Current log sequence 56
SQL> show parameter RECOVERY
NAME TYPE VALUE
------------------------------------ -----------
------------------------------
db_recovery_file_dest string +DG_RECOVERY
db_recovery_file_dest_size big integer 2G
recovery_parallelism integer 0
2)、启动 FORCE_LOGGING模式
SQL> alter database FORCE LOGGING;
Database altered.
SQL> select FORCE_LOGGING from v$database;
FOR
---
YES
2、首先配置两个 数据库 的 tnsnames.ora 和 listener.ora
tnsnames.ora( 两台主机相同 )
racdb_rac1 =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.110.21)(PORT = 1521))
(CONNECT_DATA =
( SERVER = DEDICATED)
(SERVICE_NAME = racdb_s)
(SERVICE_NAME = racdb1)
)
)
racdb_rac2 =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.110.22)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = racdb_s)
(SERVICE_NAME = racdb2)
)
)
racdb_standby =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.110.13)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = racdb)
)
)
standby 主机上的 listener.ora
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(GLOBAL_DBNAME = racdb)
(ORACLE_HOME = /oracle/app/product/10.2.0/db_1)
(SID_NAME = racdb)
)
(SID_DESC =
(GLOBAL_DBNAME = PLSExtProc)
(ORACLE_HOME = /oracle/app/product/10.2.0/db_1)
(SID_NAME = PLSExtProc)
)
)
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.110.13)(PORT = 1521))
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC0))
)
)
3、准备参数文件
RAC环境下的参数变化增加如下:
RAC主库: (注意使用 ASM的时候,不要改变 db_unique_name参数,否则之后创
建的 asm文件就会放入至新的 db_unique_name目录下面,导致
DB_FILE_NAME_CONVERT失效。)
#add below parameter for standy database
*.service_names=racdb_s
*.LOG_ARCHIVE_CONFIG='DG_CONFIG=(racdb,racdb_standby)'
*.LOG_ARCHIVE_DEST_1='LOCATION=USE_DB_RECOVERY_FILE_DEST
VALID_FOR=(ALL_LOGFILES,ALL_ROLES) DB_UNIQUE_NAME=racdb'
*.LOG_ARCHIVE_DEST_2='SERVICE=racdb_standby LGWR
VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE)
DB_UNIQUE_NAME=racdb_standby'
*.FAL_SERVER='racdb_standby'
*.STANDBY_ARCHIVE_DEST='/oradata/arch'
*.racdb1.fal_client=racdb1
*.racdb2.fal_client=racdb2
*.STANDBY_FILE_MANAGEMENT=AUTO
*.DB_FILE_NAME_CONVERT='/oradata/racdb/datafile','+DG_DATA/racdb/data
file','/oradata/racdb/tempfile','+DG_DATA/racdb/tempfile'
*.LOG_FILE_NAME_CONVERT='/oradata/racdb/onlinelog','+DG_DATA/racdb/on
linelog'
单机备库增加以下:
*.db_name='racdb'
*.db_unique_name='racdb_standby'
*.service_names='racdb_standby'
*.LOG_ARCHIVE_CONFIG='DG_CONFIG=(racdb_standby,racdb)'
*.LOG_ARCHIVE_DEST_1='LOCATION=/oradata/arch
VALID_FOR=(ALL_LOGFILES,ALL_ROLES) DB_UNIQUE_NAME=racdb_standby'
*.LOG_ARCHIVE_DEST_2='SERVICE=racdb1 LGWR
VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=racdb'
*.STANDBY_FILE_MANAGEMENT='AUTO'
STANDBY_ARCHIVE_DEST='/oradata/arch'
*.FAL_SERVER='racdb1','racdb2'
fal_client='racdb_standby'
*.DB_FILE_NAME_CONVERT='+DG_DATA/racdb/datafile','/oradata/racdb/data
file','+DG_DATA/racdb/tempfile','/oradata/racdb/tempfile'
*.LOG_FILE_NAME_CONVERT='+DG_DATA/racdb/onlinelog','/oradata/racdb/on
linelog'*
racdb1.thread=1
*.undo_management='AUTO'
单机备库参数如下:
#add below parameter for standy database
*.audit_file_dest='/oracle/app/admin/racdb/adump'
*.background_dump_dest='/oracle/app/admin/racdb/bdump'
*.compatible='10.2.0.4'
*.control_files='/oradata/racdb/datafile/racdb.ctl'
*.core_dump_dest='/oracle/app/admin/racdb/cdump'
*.db_block_size=16384
*.db_domain=''
*.db_name='racdb'
*.db_file_multiblock_read_count=16
*.DB_FILE_NAME_CONVERT='+DG_DATA/racdb/datafile','/oradata/racdb/data
file','+DG_DATA/racdb/tempfile','/oradata/racdb/tempfile'
*.db_unique_name='racdb_standby'
fal_client='racdb_standby'
*.FAL_SERVER='racdb1','racdb2'
*.job_queue_processes=10
*.LOG_ARCHIVE_CONFIG='DG_CONFIG=(racdb_standby,racdb_s)'
*.LOG_ARCHIVE_DEST_1='LOCATION=/oradata/arch
VALID_FOR=(ALL_LOGFILES,ALL_ROLES) DB_UNIQUE_NAME=racdb_standby'
*.LOG_ARCHIVE_DEST_2='SERVICE=racdb1 LGWR
VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=racdb'
*.LOG_FILE_NAME_CONVERT='+DG_DATA/racdb/onlinelog','/oradata/racdb/on
linelog'
*.open_cursors=300
*.pga_aggregate_target=89128960
*.processes=150
*.remote_login_passwordfile='exclusive'
*.service_names='racdb_standby'
剩余23页未读,继续阅读
资源评论
yanyu111112
- 粉丝: 0
- 资源: 4万+
下载权益
C知道特权
VIP文章
课程特权
开通VIP
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功