Oracle 12c RAC,其中一个节点数据库实例起不来,怎么办

Oracle 12c RAC,其中一个节点数据库实例起不来,怎么办,第1张

两个节点,第一个节点能正常启动,但第二个节点报错。

无论是在集群还是在实例,都无法启动数据库实例。

[grid@m2 ~]$ srvctl start instance -d mdb -i mdb2

PRCR-1013 : 无法启动资源 oramdbdb

PRCR-1064 : 无法在节点 m2 上启动资源 oramdbdb

ORA-00203:

ORA-00202: : ''+DATA/mdb/controlfile/current268821031437''

CRS-2674: 未能启动 'oramdbdb' (在 'm2' 上)

[grid@m2 ~]$ pwd

/home/grid

[grid@m2 ~]$ ll

总计 4

drwxrwxr-x 3 grid oinstall 4096 07-15 15:35 oradiag_grid

[grid@m2 ~]$ pwd

/home/grid

[grid@m2 ~]$ srvctl status asm -n m1

ASM 正在 m1 上运行

[grid@m2 ~]$ srvctl status asm -n m2

ASM 正在 m2 上运行

ORA-03113: end-of-file on communication channel

使用相同的pfile启动。

SQL> startup pfile='/opt/app/oracle/product/1120/dbs/initmdb1ora';

ORACLE instance started

Total System Global Area 1607008256 bytes

Fixed Size 1336820 bytes

Variable Size 469764620 bytes

Database Buffers 1124073472 bytes

Redo Buffers 11833344 bytes

ORA-00203: using the wrong control files

ORA-00202: control file: '+DATA/mdb/controlfile/current268821031437'

NODE M2:

SQL> show parameter control

NAME TYPE

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

VALUE

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

control_file_record_keep_time integer

7

control_files string

+DATA/mdb/controlfile/current

268821031437, +RECOVERY/mdb/c

ontrolfile/current2698210314

39

control_management_pack_access string

DIAGNOSTIC+TUNING

SQL>

NODE M1:

SQL> show parameter control

NAME TYPE

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

VALUE

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

control_file_record_keep_time integer

7

control_files string

+DATA/mdb/controlfile/current

268821031437, +RECOVERY/mdb/c

ontrolfile/current2698210314

39

control_management_pack_access string

DIAGNOSTIC+TUNING

SQL>

怀疑是虚拟机中的磁盘设置问题,修改虚拟机文件

把 scsi0:1type="disk"

修改为:

scsi0:1shared="TRUE"

其它两项不变

scsi0:1virtualDev = "lsilogic"

scsi0:1SharedBus="Virtual"

所有共享磁盘修改后为:

scsi0:1virtualDev = "lsilogic"

scsi0:1sharedBus = "VIRTUAL"

scsi0:1shared="TRUE"

disklocking="FALSE"

========================================================

修改后,再启动实例,还是无法启动,报控制文件出错:

Connected to an idle instance

SQL> startup;

ORACLE instance started

Total System Global Area 1607008256 bytes

Fixed Size 1336820 bytes

Variable Size 520096268 bytes

Database Buffers 1073741824 bytes

Redo Buffers 11833344 bytes

ORA-00214: control file '+RECOVERY/mdb/controlfile/current269821031439'

version 1199 inconsistent with file

'+DATA/mdb/controlfile/current283821115539' version 522

SQL> show parameter spfile;

NAME TYPE

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

VALUE

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

spfile string

+DATA/mdb/spfilemdbora

SQL> select instance_name from v$instance;

INSTANCE_NAME

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

mdb1

SQL> show parameter spfile;

NAME TYPE

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

VALUE

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

spfile string

+DATA/mdb/spfilemdbora

SQL> select instance_name from v$instance;

INSTANCE_NAME

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

mdb1

SQL> create pfile from spfile;

File created

SQL> shutdown abort;

ORACLE instance shut down

SQL> exit

[oracle@m1 dbs]$ vi initmdb1ora

[oracle@m1 dbs]$ sqlplus / as sysdba

SQLPlus: Release 112010 Production on Thu Jul 18 15:24:51 2013

Copyright (c) 1982, 2009, Oracle All rights reserved

Connected to an idle instance

SQL> startup pfile='/opt/app/oracle/product/1120/dbs/initmdb1ora';

ORACLE instance started

Total System Global Area 1607008256 bytes

Fixed Size 1336820 bytes

Variable Size 520096268 bytes

Database Buffers 1073741824 bytes

Redo Buffers 11833344 bytes

Database mounted

Database opened

SQL>

[oracle@m1 dbs]$ rman target /

Recovery Manager: Release 112010 - Production on Thu Jul 18 15:29:09 2013

Copyright (c) 1982, 2009, Oracle and/or its affiliates All rights reserved

connected to target database (not started)

RMAN> startup nomount;

Oracle instance started

Total System Global Area 1607008256 bytes

Fixed Size 1336820 bytes

Variable Size 520096268 bytes

Database Buffers 1073741824 bytes

Redo Buffers 11833344 bytes

RMAN> restore controlfile to '+DATA' from '+RECOVERY/mdb/controlfile/current269821031439';

Starting restore at 2013-07-18 15:30:28

using target database control file instead of recovery catalog

allocated channel: ORA_DISK_1

channel ORA_DISK_1: SID=143 instance=mdb1 device type=DISK

channel ORA_DISK_1: copied control file copy

Finished restore at 2013-07-18 15:30:36

RMAN> restore controlfile to '+DATA' from '+RECOVERY/mdb/controlfile/current269821031439';

Starting restore at 2013-07-18 15:38:57

using channel ORA_DISK_1

channel ORA_DISK_1: copied control file copy

Finished restore at 2013-07-18 15:39:05

RMAN> exit

恢复控制文件的同时,可以在其它窗口看到增加的控制文件名称:

ASMCMD> ls

Current256820944177

Current268821031437

current282821115029

ASMCMD> ls

Current256820944177

Current268821031437

current282821115029

current283821115539

ASMCMD>

后面两个文件是这次恢复的。

修改pfile,添加进去:

control_files='+DATA/mdb/controlfile/current282821115029','+DATA/mdb/controlfile/current283821115539','+RECOVERY/mdb/controlfile/current269821031439'

再次使用pfile启动数据库后,建立spfile 文件。

SQL> startup pfile='/opt/app/oracle/product/1120/dbs/initmdb1ora';

ORACLE instance started

Total System Global Area 1607008256 bytes

Fixed Size 1336820 bytes

Variable Size 520096268 bytes

Database Buffers 1073741824 bytes

Redo Buffers 11833344 bytes

Database mounted

Database opened

SQL>

create spfile='+DATA/mdb/spfilemdbora' from pfile='/opt/app/oracle/product/1120/dbs/initmdb1ora';

修改pfile文件指定到新生成的共享磁盘中的spfile

[oracle@m1 dbs]$ cat initmdb1ora

SPFILE='+DATA/mdb/spfilemdbora'

[oracle@m1 dbs]$ sqlplus / as sysdba

SQLPlus: Release 112010 Production on Thu Jul 18 15:53:56 2013

Copyright (c) 1982, 2009, Oracle All rights reserved

Connected to an idle instance

SQL> startup;

ORACLE instance started

Total System Global Area 1607008256 bytes

Fixed Size 1336820 bytes

Variable Size 520096268 bytes

Database Buffers 1073741824 bytes

Redo Buffers 11833344 bytes

Database mounted

Database opened

SQL>

完成后,再另一个节点启动数据库实例:

[oracle@m2 dbs]$ sqlplus / as sysdba

SQLPlus: Release 112010 Production on Thu Jul 18 15:58:55 2013

Copyright (c) 1982, 2009, Oracle All rights reserved

Connected to an idle instance

SQL> startup;

ORACLE instance started

Total System Global Area 1607008256 bytes

Fixed Size 1336820 bytes

Variable Size 469764620 bytes

Database Buffers 1124073472 bytes

Redo Buffers 11833344 bytes

Database mounted

Database opened

SQL> create table tst_tbs(id number(10),prod_name varchar2(50));

Table created

SQL> insert into tst_tbs values(1,'test name');

1 row created

SQL> commit;

Commit complete

在另一个实例中可以看到刚才插入的数据。

SQL> select id,prod_name from tst_tbs;

ID

----------

PROD_NAME

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

1

test name

SQL> select instance_name from v$instance;

INSTANCE_NAME

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

mdb1

SQL>

在RAC中,看到数据库没启动起来,再次使用RAC的命令启动一下数据库,完成。

[grid@m1 ~]$ crs_stat -t

Name Type Target State Host

我搭建好了一个Oracle11gR2的RAC环境,节点为rac1和rac2

……

实例 wpsdb1 正在节点 rac1 上运行

实例 wpsdb2 正在节点 rac3 上运行

结点rac1,rac2,rac3?

检查一下配置

关于ORACLE正在初始化或关闭,如果是windows环境,打开命令行

sqlplus "/as sysdba"

用sysdba看能否登录,如果不是connect to idle instance,则说明实例是启动的

用shutdown immediate或shutdown abort (注意,测试环境可以用,abort一般不会出问题)

然后再重启数据库试试

希望对你有帮助!RAC的连接URL和单实例不一样,12505是说你的SID有错误。举例来讲,如果你的RAC实例SID是orcl,那么你集群的SID是orcl,但每台机器的SID不同,分别是orcl1,orcl2,…,orclN。在配置weblogic连接池的时候使用RAC专用的URL连接才可以。举例如下:单实例普通写法:jdbc:oracle:thin:@19216811:1521:orclRAC:jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=19216811)(PORT=1521))(ADDRESS=(PROTOCOL=TCP)(HOST=19216812)(PORT=1521))(LOAD_BALANCE=yes)(failover=yes)(failover_mode=(type=select)(method=basic))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=orcl)))请注意,这是两节点RAC的例子,HOST的地址需要写RAC集群每台机器的虚地址,而不能用实地址,否则不能实现故障转移。选项中的LOAD_BALANCE=yes是负载均衡开启failover=yes是故障转移开启failover_mode=(type=select)是故障转移级别

以上就是关于Oracle 12c RAC,其中一个节点数据库实例起不来,怎么办全部的内容,包括:Oracle 12c RAC,其中一个节点数据库实例起不来,怎么办、连接Oracle 11gR2 RAC主节点上的实例时,报告:ORA-01033:ORACLE 正在初始化或关闭、服务器装了oracle+rac,连接数据库都没问题.但启动weblogic时报连接数据库有问题,报ORA-12505,请高手帮忙等相关内容解答,如果想了解更多相关内容,可以关注我们,你们的支持是我们更新的动力!

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/sjk/9706857.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2023-05-01
下一篇 2023-05-01

发表评论

登录后才能评论

评论列表(0条)

保存