ITPub博客

首页 > 数据库 > Oracle > RAC 安装配置过程中的问题

RAC 安装配置过程中的问题

原创 Oracle 作者:lifewise 时间:2007-09-11 16:09:04 0 删除 编辑

RAC 安装配置过程中的问题

发表人:bulkaunt | 发表时间: 2006年二月27日, 16:34

OS RHAS 3.2 DB 9204

在RAC的安装配置过程中,虽然是严格仔细按照文档来实施,但还是出现不少问题,现整理出来。

[@more@]

RAC 安装配置过程中的问题

发表人:bulkaunt | 发表时间: 2006年二月27日, 16:34

OS RHAS 3.2 DB 9204

在RAC的安装配置过程中,虽然是严格仔细按照文档来实施,但还是出现不少问题,现整理出来。


现象一 :

在节点一安装数据库的时候出现以下错误

[oracle@rac1 dbs]$ sqlplus "/nolog"

SQL*Plus: Release 9.2.0.4.0 - Production on Thu Feb 23 14:09:08 2006

Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.

SQL> connect / as sysdba
Connected to an idle instance.
SQL> startup nomount pfile="/home/oracle/9.2.0.4/dbs/init.ora"
ORA-00444: background process "LMD0" failed while starting
ORA-07446: sdnfy: bad value ' for parameter .
SQL> exit
Disconnected

查找了错误原因

[oracle@rac1 dbs]$ oerr ora 444
00444, 00000, "background process "%s" failed while starting"
// *Cause: Usually due to a bad (or non-existent) background process image.
// *Action: Get a good background process image.

竟然是LMD0进程有问题,重新分析了一下参数文件,没有发现有错误的地方,于是怀疑在安装的过程中出现问题。
尝试在节点二创建数据库,

[oracle@rac2 dbs]$ sqlplus "/nolog"

SQL*Plus: Release 9.2.0.4.0 - Production on Thu Feb 23 14:20:32 2006

Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.

SQL> connect / as sysdba
Connected to an idle instance.
SQL> startup nomount pfile="/home/oracle/9.2.0.4/dbs/init.ora"
ORACLE instance started.

Total System Global Area 319923400 bytes
Fixed Size 451784 bytes
Variable Size 201326592 bytes
Database Buffers 117440512 bytes
Redo Buffers 704512 bytes

使用一样的参数文件,在节点二却是可以的,这说明推断还是正确的。


现象二:

从节点二创建数据库成功,然后在节点一启动数据库

SQL> startup mount pfile="/home/oracle/9.2.0.4/dbs/init.ora"
ORACLE instance started.

Total System Global Area 319923400 bytes
Fixed Size 451784 bytes
Variable Size 201326592 bytes
Database Buffers 117440512 bytes
Redo Buffers 704512 bytes
ORA-00439: feature not enabled: Real Application Clusters

以上错误,我平台是RH AS3.2,DB是企业版的9204,所以不会是版本出现问题。在节点一安装的过程中,发现
$ srvconfig -init 这个命令不能使用,应该是某些组件还没有安装好,删除后重装,保留共享磁盘上节点一的REDO和UNDO数据文件,然后直接在节点一进行startup mount pfile="/home/oracle/9.2.0.4/dbs/init.ora",这下成功了。

小插曲:在节点一MOUNT的过程中,还出现报控制文件出错的,很纳闷,节点二和节点一用的是同样的参数文件,后来发现是参数文件中,控制文件部分有换行的错误,重新整理后,错误就解决了。


现象三 监听的配置

监听的配置耗了一个上午的时间折腾,按照文档去配置,就是不行。。其间有时候监听可以起来,但是建了TEST用户,执行sqlplus test/test@rac 报错

[oracle@rac2 admin]$ sqlplus test/test@rac2

SQL*Plus: Release 9.2.0.4.0 - Production on Fri Feb 24 14:09:13 2006

Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.

ERROR:
ORA-12514: TNS:listener could not resolve SERVICE_NAME given in connect
descriptor

说明监听还是配置不正确,监听配置的成功必须辅以tnsping rac 这个命令成功执行为准,下面是最后我两个节点的配置参数

节点一:

listener.ora

LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = rac1)(PORT = 1521))
)
)
)

SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = /home/oracle/9.2.0.4)
(PROGRAM = extproc)
)
(SID_DESC =
(ORACLE_HOME = /home/oracle/9.2.0.4)
(SID_NAME = rac1)
)
)


tnsnames.ora

LISTENERS_RAC =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = rac1)(PORT = 1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = rac2)(PORT = 1522))
)

LISTENER_RAC1 =
(ADDRESS = (PROTOCOL = TCP)(HOST = rac1)(PORT = 1521))

LISTENER_RAC2 =
(ADDRESS = (PROTOCOL = TCP)(HOST = rac2)(PORT = 1521))

RAC1 =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = rac1)(PORT = 1521))
(CONNECT_DATA =
(SERVICE_NAME = rac)
(INSTANCE_NAME = rac1)
)
)

RAC2 =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = rac2)(PORT = 1521))
(CONNECT_DATA =
(SERVICE_NAME = rac)
(INSTANCE_NAME = rac2)
)
)

RAC =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = rac1)(PORT = 1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = rac2)(PORT = 1521))
(LOAD_BALANCE = on)
(FAILOVER = on)
)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = rac)
)
)

EXTPROC_CONNECTION_DATA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC))
)
(CONNECT_DATA =
(SID = PLSExtProc)
(PRESENTATION = RO)
)
)

节点二:

listener.ora

LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = tcp)(HOST = rac2)(PORT = 1521))
)
)
)

SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = /home/oracle/9.2.0.4)
(PROGRAM = extproc)
)
(SID_DESC =
(ORACLE_HOME = /home/oracle/9.2.0.4)
(SID_NAME = rac2)
)
)

tnsnames.ora

LISTENERS_RAC =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = rac1)(PORT = 1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = rac2)(PORT = 1521))
)

LISTENER_RAC2 =
(ADDRESS = (PROTOCOL = TCP)(HOST = rac2)(PORT = 1521))

LISTENER_RAC1 =
(ADDRESS = (PROTOCOL = TCP)(HOST = rac1)(PORT = 1521))

RAC2 =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = rac2)(PORT = 1521))
(CONNECT_DATA =
(SERVICE_NAME = rac)
(INSTANCE_NAME = rac2)
)
)

RAC1 =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = rac1)(PORT = 1521))
(CONNECT_DATA =
(SERVICE_NAME = rac)
(INSTANCE_NAME = rac1)
)
)


RAC =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = rac1)(PORT = 1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = rac2)(PORT = 1521))
(LOAD_BALANCE = on)
(FAILOVER = on)
)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = rac)
)
)

EXTPROC_CONNECTION_DATA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC))
)
(CONNECT_DATA =
(SID = PLSExtProc)
(PRESENTATION = RO)
)
)


在监听配置的过程中,还出现这样一个现象,发现在节点二上无论怎么配置都出现以下故障

[oracle@rac2 admin]$ lsnrctl start

LSNRCTL for Linux: Version 9.2.0.4.0 - Production on 24-FEB-2006 14:40:20

Copyright (c) 1991, 2002, Oracle Corporation. All rights reserved.

Starting /home/oracle/9.2.0.4/bin/tnslsnr: please wait...

TNSLSNR for Linux: Version 9.2.0.4.0 - Production
System parameter file is /home/oracle/9.2.0.4/network/admin/listener.ora
Log messages written to /home/oracle/9.2.0.4/network/log/listener.log
Error listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=rac2)(PORT=1521)))
TNS-12542: TNS:address already in use
TNS-12560: TNS:protocol adapter error
TNS-00512: Address already in use
Linux Error: 98: Address already in use

Listener failed to start. See the error message(s) above...

起初以为是端口的问题,更改了监听的端口,监听是成功了。但是后来想想,两台不同的机器,怎么会可能存在地址占用呢,于是又去搜索故障原因,检查配置文件,最后 netstat -lpn发现有个1521的端口一直开着,却什么事情也不干,于是强制把这个进程给KILL掉,再重新配置,成功!


现象四 :

负载均衡和失败切换的测试

失败切换很简单,就在两边的tnsnames.ora 加上(LOAD_BALANCE = on)和(FAILOVER = on)就可以了,具体看上面的配置。两个参数用YES和ON都可以
在负载均衡测试上花费了一点时间,主要是在测试的过程中,发现连接的一直都是节点二,只是偶尔会切换到节点一,但是出现的次数非常少。后来尝试
在客户端上进行测试连接,发现还是这样的。由于我节点一的机器配置档次比节点二的机器配置要低很多。所以我分析,基本上,是有负载均衡切换的功能了

现象五:

SQL> connect / as sysdba
Connected to an idle instance.
SQL> startup
CMCLI ERROR: OpenCommPort: connect failed with error 111.
CMCLI ERROR: OpenCommPort: connect failed with error 111.
CMCLI ERROR: OpenCommPort: connect failed with error 111.
ORACLE instance started.

Total System Global Area 319923400 bytes
Fixed Size 451784 bytes
Variable Size 201326592 bytes
Database Buffers 117440512 bytes
Redo Buffers 704512 bytes
ORA-32700: error occurred in DIAG Group Service

以ROOT用户启动 $ORACLE_HOME/oracm/bin/ocmstart.sh 即可

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/620862/viewspace-968962/,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2008-01-07

  • 博文量
    52
  • 访问量
    488736