11GR2 双节点RAC 配置单节点DG
只记录主要步骤,供大家参考:
RAC 搭建单节点 DG
1 修改源数据库开启归档和force logging
alter system set shared_servers=0;
alter database force logging;
srvcel stop database -d YCR
srvctl start database -d YCR -o mount
alter database archive(两个节点均要执行)
srvctl stop database -d YCR
srvctl start database -d YCR
2 在节点一执行全备
run {
allocate channel c1 type disk;
backup database format '/rman_backup/FULL_%U.bak';
backup archivelog all format '/rman_backup/ARC_%U.bak';
release channel c1;
}
backup device type disk format '/u01/rman_bk/standby_%U.ctl' current controlfile for standby;
3 创建参数文件
create pfile ='/u01/rman_bk/initphydb.ora' from spfile;
4 拷贝备份文件,参数文件,控制文件和密码文件到备库
5 修改备库参数文件
RACDG.__db_cache_size=138412032
RACDG.__java_pool_size=4194304
RACDG.__large_pool_size=4194304
RACDG.__pga_aggregate_target=104857600
RACDG.__sga_target=318767104
RACDG.__shared_io_pool_size=0
RACDG.__shared_pool_size=163577856
RACDG.__streams_pool_size=0
*.audit_file_dest='/u01/app/oracle/admin/RACDB/adump'
*.audit_trail='db'
*.compatible='11.2.0.0.0'
*.control_files='/u01/app/oracle/oradata/RACDB/control01.ctl','/u01/app/oracle/oradata/RACDB/control02.ctl'
*.db_block_size=8192
*.db_create_file_dest='/u01/app/oracle/oradata/RACDB'
*.db_domain=''
*.db_name='RACDB'
*.db_recovery_file_dest='/u01/app/oracle/archive'
*.db_recovery_file_dest_size=4558159872
*.diagnostic_dest='/u01/app/oracle'
*.dispatchers='(PROTOCOL=TCP) (SERVICE=YCRDGXDB)'
*.open_cursors=300
*.pga_aggregate_target=104857600
*.processes=150
*.remote_login_passwordfile='exclusive'
*.sga_target=316669952
*.db_unique_name='RACDG'
*.fal_client='RACDG'
*.fal_server='RACDB_1','RACDB_2'
*.log_archive_config='dg_config=(RACDB,RACDG)'
*.log_archive_dest_1='location=USE_DB_RECOVERY_FILE_DEST valid_for=(all_logfiles,all_roles) db_unique_name=RACDG'
*.log_archive_dest_2='service=RACDB_1 valid_for=(online_logfiles,primary_role) db_unique_name=RACDB'
*.log_archive_format='ARC_%t_%S_%r.arc'
*.db_file_name_convert='+DATA/racdb','/u01/app/oracle/oradata/RACDB'
*.log_file_name_convert='+DATA/racdb','/u01/app/oracle/oradata/RACDB'
*.standby_file_management='auto'
备库服务器创建目录
mkdir -p /u01/app/oracle/admin/YCR/adump
mkdir -p /u01/app/oracle/oradata/RACDB
mkdir -p /u01/app/oracle/archive
mkdir -p /u01/app/oracle/admin/RACDB/adump
备库配置静态监听
[oracle@racdg admin]$ more listener.ora
# listener.ora Network Configuration File: /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
# Generated by Oracle configuration tools.
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = racdg.example.com)(PORT = 1521))
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
)
)
ADR_BASE_LISTENER = /u01/app/oracle
SID_LIST_LISTENER=
(SID_LIST =
(SID_DESC =
(ORACLE_HOME=/u01/app/oracle/product/11.2.0/dbhome_1/)
(SID_NAME =RACDG)
)
)
拷贝/rman_backup目录下的所有文件到racdg主机
rman target /
restore standby controlfile from '/rman_backup/standby_05rc8gmo_1_1.ctl';
alter database mount;
run {
allocate channel c4 type disk;
restore database ;
release channel c4;
}
查看文件:
select name from v$datafile
union
select name from v$controlfile
union
select member from v$logfile;
添加standbylogfile
alter database add standby logfile thread 1 group 5 size 50M ,group 6 size 50M ,group 7 size 50M ;
alter database add standby logfile thread 2 group 8 size 50M ,group 9 size 50M ,group 10 size 50M ;
在主库配置
alter system set log_archive_dest_2='service=RACDG lgwr sync valid_for=(online_logfiles,primary_role) db_unique_name=RACDG' sid='*';
alter system set log_archive_config='dg_config=(RACDB,RACDG)' sid='*';
查看接受日志情况:
select sequence#,name,applied from v$archived_log;
备库开始接受日志:
alter database recover managed standby database using current logfile disconnect from session;
持续接受日志:
alter database recover managed standby database cancel;
alter database recover managed standby database disconnect from session;
以只读方式打开测试同步效果:
alter database recover managed standby database cancel;
alter database open;
alter database recover managed standby database disconnect from session;
主库建表,备库测试通过。
11GR2 双节点RAC 配置单节点DG的更多相关文章
- 实验:Oracle单节点RAC添加节点
环境:RHEL 6.5 + Oracle 11.2.0.4 单节点RAC 需求:单节点RAC添加新节点 1.添加节点前的准备工作 2.正式添加节点 3.其他配置工作 1.添加节点前的准备工作 参考Or ...
- 一个节点rac+单节点dg网络配置(listener.ora与tnsnames.ora)
环境说明: 实验环境是 一个节点的 rac + 单机dg (主备全部用asm存储) tnsnames.ora 文件 (oracle用户) node 1 : node1-> pwd / ...
- RAC+单节点搭建DG
primary RAC to single standby 参考文献:RAC+单实例DATAGUARD 配置 http://blog.csdn.net/miyatang/article/detai ...
- 转://Oracle 11gR2 硬件导致重新添加节点
一.环境描述: 这是一套五年前部署的双节点单柜11g RAC,当时操作系统盘是一块164g的单盘,没有做RAID. OS: RedHat EnterPrise 5.5 x8 ...
- RAC 某节点不可用时,对应VIP是否可用
实验环境:RHEL 6.5 + GI 11.2.0.4 + Oracle 11.2.0.4 验证:RAC 某节点不可用时,其对应VIP是否可用?是否可用于连接数据库? [grid@jyrac2 ~]$ ...
- RAC某节点启动遭遇ORA-01105,ORA-01606
环境:RHEL6.5 + Oracle11.2.0.4 双节点RAC 故障现象:节点1实例没有启动成功,节点2正常启动. 1.故障现象 2.解决过程 3.总结 1.故障现象 尝试启动RAC 节点1,遭 ...
- Oracle 11g RAC 第二节点root.sh执行失败后再次执行root.sh
Oracle 11g RAC 第二节点root.sh执行失败后再次执行root.sh前,要先清除之前的crs配置信息 # /u01/app/11.2.0/grid/crs/install/rootcr ...
- oracle11g RAC添加节点
OS: [root@rac ~]# more /etc/oracle-releaseOracle Linux Server release 5.7 DB: SQL> SELECT * FROM ...
- RAC某节点v$asm_disk查询hang分析处理
主题:RAC某节点v$asm_disk查询hang分析处理 环境:Oracle 11.2.0.3 RAC 故障描述:RAC环境2个节点,节点1查询v$asm_disk正常返回结果,节点2查询v$asm ...
随机推荐
- POJ - 1080 枚举 / DP
要求max{F/P},先枚举下界lowf,再贪心求符合约束条件的n个最小价值和 记录F的离散值和去重可以大幅度常数优化 (本来想着用DP做的) (辣鸡POJ连auto都Complie Error) # ...
- 03-树3 Tree Traversals Again (25 分)
An inorder binary tree traversal can be implemented in a non-recursive way with a stack. For example ...
- sublim text3中的一些设置
{ "dictionary": "Packages/Language - English/en_US.dic", "font_face&q ...
- m3m4加载器的优化版m3m4-v1.1
m3m4加载器的优化版m3m4-v1.1 /* //1.以$开头的模块名,表示服务,服务只会执行一次,它可以有自己的方法.比如cookie就是一个服务 //例如:console.log("r ...
- HDU4499
In Chinese Chess, there is one kind of powerful chessmen called Cannon. It can move horizontally or ...
- 二分函数 lower_bound()
这篇博客说是STL源码.... https://www.cnblogs.com/cobbliu/archive/2012/05/21/2512249.html 头文件 algorithm 1.lowe ...
- rm删除文件,空间没有释放
rm删除的文件,如果其他进程正在使用这个文件,那么文件句柄并没有释放 (df仍然会统计这个文件占用的空间) 此时只能重启这个进程 正确的删除文件方法应该是 >xxx.file (最好之前加个co ...
- (Frontend Newbie)Web三要素(三)
上一篇简单介绍了Web三要素中的层叠样式表,本篇主要介绍三要素中最后一个,也是最难掌握的一个-----JavaScript. JavaScript 老规矩不能破,先简要交代 JavaScript 的历 ...
- HttpServlet的请求转发理解
一个http请求的流转,其实主要涉及到五部分的内容,第一部分就是request所包含的参数,也就是request.getAttribute能获取的东西:第二部分是request所携带的内容实体,这部分 ...
- java 命令学习总结
javac: (1)编译源文件成为字节码 (2)-d参数用于指定字节码文件所在包的位置,称为目标位置.如果源文件使用了package命令,则会自动在目标位置下创建完整的包目录,如源文件使用了 pack ...