ITPub博客

首页 > Linux操作系统 > Linux操作系统 > Oracle RAC环境修改字符集遇到ORA-00205解决方法

Oracle RAC环境修改字符集遇到ORA-00205解决方法

原创 Linux操作系统 作者:mahanso 时间:2011-02-01 08:23:43 0 删除 编辑
Oracle  RAC环境修改字符集理论知识参考:http://space.itpub.net/12272958/viewspace-684632

下面是我修改字符集中遇到的问题和解决办法:

OS:
Linux dotrac1 2.6.18-164.el5 #1 SMP Tue Aug 18 15:51:48 EDT 2009 x86_64 x86_64 x86_64 GNU/Linux

oracle:

SQL> select * from v$version;   

BANNER
--------------------------------------------------------------------------------
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
PL/SQL Release 11.2.0.1.0 - Production
CORE    11.2.0.1.0      Production
TNS for Linux: Version 11.2.0.1.0 - Production
NLSRTL Version 11.2.0.1.0 - Production

2个节点RAC


一、我修改字符集步骤说明:
1.1、完全关闭一个节点1
1.1.1、oracle用户下执行:
srvctl stop nodeapps -n mahanso1

1.1.2、root用户下执行:
crsctl stop crs

1.2、在节点2操作,修改cluster_database参数为false,变成单实例:
alter system set cluster_database=false scope=spfile

1.3、在节点2上关闭数据库,重启数据库

SQL>startup mount
ORACLE instance started.

Total System Global Area  127371024 bytes
Fixed Size                   743184 bytes
Variable Size             109051904 bytes
Database Buffers           16777216 bytes
Redo Buffers                 798720 bytes
ORA-00205: error in identifying controlfile, check alert log for more info


查看alert日志如下:
Reconfiguration complete
ORACLE_BASE from environment = /orasw/oracle
Sun Jan 30 02:14:32 2011
ALTER DATABASE   MOUNT
ORA-00210: cannot open the specified control file
ORA-00202: control file: '/oradata1/dotrac/control02.ctl'
ORA-27086: unable to lock file - already in use
Linux-x86_64 Error: 11: Resource temporarily unavailable
Additional information: 10
ORA-00210: cannot open the specified control file
ORA-00202: control file: '/oradata1/dotrac/control01.ctl'
ORA-27086: unable to lock file - already in use
Linux-x86_64 Error: 11: Resource temporarily unavailable
Additional information: 10
ORA-205 signalled during: ALTER DATABASE   MOUNT...
Sun Jan 30 02:14:32 2011
Checker run found 2 new persistent data failures
Sun Jan 30 02:14:33 2011
ALTER SYSTEM SET local_listener='(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=dotrac1-vip)(PORT=1521))))' SCOPE=MEMORY SID='dotrac1';
Sun Jan 30 02:15:07 2011
alter database character set internal_use AL32UTF8
ORA-1507 signalled during: alter database character set internal_use AL32UTF8...
Starting ORACLE instance (normal)
Sun Jan 30 02:15:31 2011
Shutting down instance (immediate)
Shutting down instance: further logons disabled
Stopping background process MMNL
Stopping background process MMON
License high water mark = 2
All dispatchers and shared servers shutdown
ALTER DATABASE CLOSE NORMAL
ORA-1507 signalled during: ALTER DATABASE CLOSE NORMAL...
ARCH: Archival disabled due to shutdown: 1089
Shutting down archive processes
Archiving is disabled
Archive process shutdown avoided: 0 active
ARCH: Archival disabled due to shutdown: 1089
Shutting down archive processes
Archiving is disabled
Archive process shutdown avoided: 0 active
Sun Jan 30 02:15:34 2011
Stopping background process VKTM: 
Sun Jan 30 02:15:36 2011
freeing rdom 0
Sun Jan 30 02:15:40 2011
Instance shutdown complete


我查看了:
ORA-00210:
cannot open the specified control file
Cause:         Cannot open the control file.
Action:         Check to make sure the control file exists and is not locked by some other program.

ORA-00202:
control file: 'string'
Cause:         This message reports the name file involved in other messages.
Action:         See associated error messages for a description of the problem.

ORA-27086:
unable to lock file - already in use
Cause:         the file is locked by another process, indicating that it is currently in use by a database instance.
Action:         determine which database instance legitimately owns this file.


当看到详细错误信息的时候,自己一个一个判断:
1、ORA-00210:不能打开控制文件
2、ORA-00202:给我的信息作用不大,是问题出现问题导致的连带反应
3、ORA-27086:文件正在被占用


起初我的想法,通过ORA-00210给我的错误提示,我把放在共享存储上的控制文件和参数文件拷贝到本地节点上启动数据库,但是数据库是生产环境,这样操作风险很大,不到最后一步我不希望有这样的操作,我尝试这用其他方法解决这个问题。

然后我试着ORA-27086作为突破口,在网上搜索相关资源,找到为什么会出现这个类问题。

下面内容转自网络资源,作者不详,感谢作者做出的详细解释:
------------------------------------------------------------------
SQL> create tablespace sdf datafile '/nfstest/adsf.dbf' size 10m extent management local;
create tablespace sdf datafile '/nfstest/adsf.dbf' size 10m extent management local
*
ERROR at line 1:
ORA-01119: error in creating database file '/nfstest/adsf.dbf'
ORA-27054: NFS file system where the file is created or resides is not mounted
with correct options
Additional information: 3

根据metalink上ID 781349.1文档的解决方法,在mount NFS的时候使用如下的option:
rw,bg,rsize=32768,wsize=32768,hard,vers=3,nointr,timeo=600,proto=tcp,suid 0 0,
不过实际在Linux下执行时,需去掉最后的suid 0 0:

[root@standby /]# mount -t nfs 172.16.4.179:/nfstest nfstest -o rw,bg,rsize=32768,wsize=32768,hard,vers=3,nointr,timeo=600,proto=tcp

不过这样仍然会报错,提示无法获取锁:
ORA-27086: unable to lock file - already in use
Linux Error: 37: No locks available
Additional information: 10

同样的也是mount option的问题,在mount时指定nolock:
[root@standby /]# mount -t nfs 172.16.4.179:/nfstest nfstest -o nolock,rw,bg,rsize=32768,wsize=32768,hard,vers=3,nointr,timeo=600,proto=tcp

-----------------------------------------------------------------

发现客户的rac环境是用nfs挂载磁盘作充当oracle的共享存储,我尝试手动挂载磁盘,并且添加挂载参数nolock,之后重启数据库问题得以解决

最后在2个服务器的 /etc/fstab文件中添加以下语句,确保每次挂载磁盘都处于nolock状态:

dotnas1:/nas1/shared_cluster      /cluster      nfs    nolock,rw,bg,hard,nointr,rsize=32768,wsize=32768,tcp,vers=3,timeo=600,actimeo=0 0 0
dotnas1:/nas1/shared_oradata1     /oradata1     nfs    nolock,rw,bg,hard,nointr,rsize=32768,wsize=32768,tcp,actimeo=0,vers=3,timeo=600 0 0
dotnas1:/nas2/shared_oradata2     /oradata2     nfs    nolock,rw,bg,hard,nointr,rsize=32768,wsize=32768,tcp,actimeo=0,vers=3,timeo=600 0 0


总结:这次故障解决,让我体会到解决问题不能忽视每一个问题的存在,在oracle故障解决中,要认真分析每一个错误信息,找到真正的原因。争取用最好的方法解决问题。



注:20110212日更改,蓝色字体设置错误,我发现每次重启之后都设置成noclock状态,磁盘2个节点会不同步,导致其他节点不能启动crs,所以不能设置每次开机挂载的状态为nolock

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

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

注册时间:2010-10-18

  • 博文量
    160
  • 访问量
    600427