现有一套RAC环境,为现在的RAC环境 (不停机增加一个DG)
现有的RAC环境配置
1,归档是打开的
2,启用database强制日志
ALTER DATABASE FORCE LOGGING;(ALTER DATABASE no FORCE LOGGING;)
3. 拷贝密码文件到远程机子上
4 配置standby log(大小最好保持一致)
5 配置参数(如果不回切,下面只需要配置*开头的 alter system set )
备置standby 的初始化参数文件(主要配置参数如下)
6 配置 tns文件(RAC的双节点都需要添加)
7 在节点其中之一
backup full format=’/tmp/FULL_%U’ database include current controlfile for standby ;
同时把/tmp下的备份文件拷贝过去
8 连接备库恢复
rman target / auxiliary sys/Cp_928584@standby
duplicate target database for standby;
现有的RAC环境配置
1,归档是打开的
2,启用database强制日志
ALTER DATABASE FORCE LOGGING;(ALTER DATABASE no FORCE LOGGING;)
3. 拷贝密码文件到远程机子上
4 配置standby log(大小最好保持一致)
ALTER DATABASE ADD STANDBY LOGFILE GROUP 4 '/u01/app/oracle/oradata/primary/redo4.log' SIZE 50M;
ALTER DATABASE ADD STANDBY LOGFILE GROUP5 '/u01/app/oracle/oradata/primary/redo5.log' SIZE 50M;
ALTER DATABASE ADD STANDBY LOGFILE GROUP 6 '/u01/app/oracle/oradata/primary/redo6.log' SIZE 50M;
5 配置参数(如果不回切,下面只需要配置*开头的 alter system set )
DB_NAME=orcl
DB_UNIQUE_NAME=primary -----如果存储用的ASM千万不能修改数据库的unique名字
*LOG_ARCHIVE_CONFIG='DG_CONFIG=(primary,standby)'
LOG_ARCHIVE_DEST_1='LOCATION=/u01/app/oracle/arch VALID_FOR=(ALL_LOGFILES,ALL_ROLES) DB_UNIQUE_NAME=primary'
*LOG_ARCHIVE_DEST_2='SERVICE=standby LGWR ASYNC VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=standby'
LOG_ARCHIVE_DEST_STATE_1=ENABLE
*LOG_ARCHIVE_DEST_STATE_2=ENABLE
*LOG_ARCHIVE_FORMAT=%t_%s_%r.arc
FAL_SERVER=standby
FAL_CLIENT=primary
DB_FILE_NAME_CONVERT='/u01/app/oracle/oradata/orcl','/u01/app/oracle/oradata/orcl'
LOG_FILE_NAME_CONVERT='/u01/app/oracle/oradata/orcl','/u01/app/oracle/oradata/orcl'
*STANDBY_FILE_MANAGEMENT=AUTO
备置standby 的初始化参数文件(主要配置参数如下)
DB_NAME=orcl(跟RAC数据库一致)
DB_UNIQUE_NAME=standby
CONTROL_FILES='/u01/app/oradata/standby/standby.ctl'
LOG_ARCHIVE_DEST_1='LOCATION=/u01/app/oracle/arch VALID_FOR=(ALL_LOGFILES,ALL_ROLES) DB_UNIQUE_NAME=standby'
LOG_ARCHIVE_DEST_STATE_1=ENABLE
LOG_ARCHIVE_FORMAT=%t_%s_%r.arc
DB_FILE_NAME_CONVERT='+DATA','/u01/app/oradata/standby'
LOG_FILE_NAME_CONVERT='+DATA','/u01/app/oradata/standby'
STANDBY_FILE_MANAGEMENT=AUTO
6 配置 tns文件(RAC的双节点都需要添加)
standby=
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.9.178)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = standby)
(SID_NAME = standby)
)
)
7 在节点其中之一
backup full format=’/tmp/FULL_%U’ database include current controlfile for standby ;
同时把/tmp下的备份文件拷贝过去
8 连接备库恢复
rman target / auxiliary sys/Cp_928584@standby
duplicate target database for standby;