RAC (双节点) + 单实例 DATAGUARD 安装遇到的问题处理
PRIMARY: RAC 双节点 ,存储:ASM
STANDBY: 单实例 存储: ASM
单实例 数据库如果要使用 ASM存储,也要安装一个GRID,选项为:
【】为独立服务器配置ORACLE GRID INFRASTRUCTURE
其它和安装GRID RAC一致。
安装时,也要选择一个VotingDISK。
完成后状态如下:
[grid@dg1 ~]$ crs_stat -t
Name Type Target State Host
------------------------------------------------------------
ora.CRS.dg ora....up.type ONLINE ONLINE dg1
ora.DATA.dg ora....up.type ONLINE ONLINE dg1
ora....ER.lsnr ora....er.type ONLINE ONLINE dg1
ora....VERY.dg ora....up.type ONLINE ONLINE dg1
ora.asm ora.asm.type ONLINE ONLINE dg1
ora.cssd ora.cssd.type ONLINE ONLINE dg1
ora.diskmon ora....on.type OFFLINE OFFLINE
ora.evmd ora.evm.type ONLINE ONLINE dg1
ora.ons ora.ons.type OFFLINE OFFLINE
[grid@dg1 ~]$
以下是安装时遇到的问题及解决方法,这里写出与大家分享,如果有更好的思路及解决方法,也请回贴告之。
1.GRID 安装
【】为独立服务器配置ORACLE GRID INFRASTRUCTURE
[grid@dg1 admin]$ crs_stat -t
Name Type Target State Host
------------------------------------------------------------
ora.CRS.dg ora....up.type ONLINE ONLINE localhost
ora.DATA.dg ora....up.type ONLINE ONLINE localhost
ora....ER.lsnr ora....er.type OFFLINE OFFLINE
ora....VERY.dg ora....up.type ONLINE ONLINE localhost
ora.asm ora.asm.type ONLINE ONLINE localhost
ora.cssd ora.cssd.type ONLINE ONLINE localhost
ora.diskmon ora....on.type OFFLINE OFFLINE
ora.evmd ora.evm.type ONLINE ONLINE localhost
ora.ons ora.ons.type OFFLINE OFFLINE
看到HOST 为 localhost。可能是在安装GRID前,没有修改HOSTNAME而引起的。
后面在进行数据复制(duplicate)时,既然提示无法找到ASM ,数据复制不过去。
2.重装后, 少了ASM,如下:
[grid@dg1 ~]$ crs_stat -t
Name Type Target State Host
------------------------------------------------------------
ora....ER.lsnr ora....er.type ONLINE ONLINE dg1
ora.cssd ora.cssd.type ONLINE ONLINE dg1
ora.diskmon ora....on.type OFFLINE OFFLINE
ora.evmd ora.evm.type ONLINE ONLINE dg1
ora.ons ora.ons.type OFFLINE OFFLINE
怀疑是删除重装引起的。后来使用GRID的deinstall 卸载后,再进行安装,问题解决。
3.RMAN 数据复制(duplicate)时出错,如下:
开始找不到是什么原因,使用dbca建立一个新库,没有问题。说明不是ASM的问题了。
alert_stbdb.log 还有无法打开+DATA 目录下的文件的错误提示。
后来想到可能是RMAN 是在STANDBY 服务器端执行的原因。到PRIMARY服务器端执行,问题没有了。
RMAN> duplicate target database for standby from active database nofilenamecheck;
Starting Duplicate Db at 2013-10-21 14:36:40
using target database control file instead of recovery catalog
allocated channel: ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: SID=9031 device type=DISK
contents of Memory Script:
{
backup as copy reuse
targetfile '/opt/app/oracle/product/11.2.0/dbs/orapwracdb1' auxiliary format
'/opt/app/oracle/product/11.2.0/dbs/orapwstbdb' ;
}
executing Memory Script
Starting backup at 2013-10-21 14:36:43
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=11533 instance=racdb1 device type=DISK
Finished backup at 2013-10-21 14:36:44
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of Duplicate Db command at 10/21/2013 14:36:46
RMAN-05501: aborting duplication of target database
RMAN-06136: ORACLE error from auxiliary database: ORA-03113: end-of-file on communication channel
Process ID: 21550
Session ID: 8429 Serial number: 5
RMAN> exit
--------------alert_stbdb.log ------------------
Recovery Manager complete.
Mon Oct 21 16:25:48 2013
RFS connections have been disallowed
alter database mount standby database
NOTE: Loaded library: /opt/oracle/extapi/64/asm/orcl/1/libasm.so
NOTE: Loaded library: System
SUCCESS: diskgroup DATA was mounted
SUCCESS: diskgroup RECOVERY was mounted
ERROR: failed to establish dependency between database stbdb and diskgroup resource ora.DATA.dg
ERROR: failed to establish dependency between database stbdb and diskgroup resource ora.RECOVERY.dg
Set as converted control file due to db_unique_name mismatch
4.PRIMARY 服务器端提示 密码文件错误。查看 log文件无法同步到standby 服务器。
想到RAC环境前几天修改过SYS的密码,后把RAC1,及RAC2节点,都执行一次修改密码。
SQL>alter user sys identified by oracle;
并且把rac1 重新生成密码文件:
orapwd file=/tmp/orapwracdb1.ora password=oracle force=y ignorecase=y
并把密码文件拷贝到standby 服务器端,及rac2.
问题解决。
ORACLE Instance racdb2 - Archival Error. Archiver continuing.
Tue Oct 22 10:41:10 2013
Error 1034 received logging on to the standby
PING[ARC2]: Heartbeat failed to connect to standby 'stbdb'. Error is 1034.
Tue Oct 22 10:42:10 2013
Error 1034 received logging on to the standby
PING[ARC2]: Heartbeat failed to connect to standby 'stbdb'. Error is 1034.
Tue Oct 22 10:43:10 2013
Error 1017 received logging on to the standby
------------------------------------------------------------
Check that the primary and standby are using a password file
and remote_login_passwordfile is set to SHARED or EXCLUSIVE,
and that the SYS password is same in the password files.
returning error ORA-16191
------------------------------------------------------------
PING[ARC2]: Heartbeat failed to connect to standby 'stbdb'. Error is 16191.
Tue Oct 22 10:44:10 2013
Error 1017 received logging on to the standby
------------------------------------------------------------
Check that the primary and standby are using a password file
and remote_login_passwordfile is set to SHARED or EXCLUSIVE,
and that the SYS password is same in the password files.
--------------alert_stbdb.log ------------------
FAL[client, USER]: Error 12154 connecting to RACDB1,RACDB2 for fetching gap sequence
Mon Oct 21 22:14:58 2013
Error 12154 received logging on to the standby
FAL[client, USER]: Error 12154 connecting to RACDB1,RACDB2 for fetching gap sequence
ORA-32004: obsolete or deprecated parameter(s) specified for RDBMS instance