手工
srvctl start database -d xxxx
有报错嘛
如果无法正常启动,先看一下集群状态。
crsctl stat res -t
视情况可以看一下oracle alert告警日志。
数据库关闭ok后此时我们进行关闭crs服务,切忌不要直接关闭ASM实例,在11g中 11202 中 ocr 服务的信息存放在asm 磁盘上,是依赖于asm的 ,所以要关闭crs 而不是直接关闭asm实例,若在此处强行关闭asm实例,很有可能造成的后果是asm磁盘损坏或者丢失,导致整个集群彻底崩溃。我在测试RAC时,曾dismount某个磁盘组后,首先关闭了数据库,接着直接关闭了asm实例,关闭时一切正常。无报错,但当启动时,发现asm无法启动crs提示CRS-0184: Cannot communicate with the CRS daemon无论如何也是无法启动CRS的,意识到可能是表决磁盘或者OCR出现问题,随即查看asm磁盘情况:oracleasm listdisks,没有任何磁盘信息,oracleasm scandisks也是同样的情况,这下估计麻烦了。在登录到另外一个节点上,同样命令查看asm磁盘,发现磁盘正常。故此此时我也将该节点的数据库及asm实例关闭,然后重启服务器,之后悲剧的一幕想当然的发生了,两个节点都无法扫描到asm磁盘信息。整个集群破坏的很彻底,丢失数据。也许是我个人原因造成这种异常的数据丢失,但个人还是建议按照常规的顺序来关闭启动RAC。
2 [root@RAC01 bin]# /crsctl stop crs
如果你足够细心,你可以通过下面的关闭日志看出在RAC的CRS关闭的过程中是一个怎样的顺序以及关闭crs的时候都会有那些服务会同时关闭。此外你可能还会发现我们的这个命令是在RAC01这个节点执行的,所以这时候应该RAC02这个节点还是可以正常使用的。强烈建议大家对下面的日志进行研究。
CRS-2791: Starting shutdown of Oracle High Availability>
两个节点,第一个节点能正常启动,但第二个节点报错。
无论是在集群还是在实例,都无法启动数据库实例。
[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
我在虚拟机上安装了个 2个节点的rac环境 linux 44 + oracle 10201 当把2个虚拟机都启动时,RAC所有应用都能正常启动 当我将RAC2关机后,RAC1能正常提供服务。 但是,当我再将RAC1重启后,发现orarac1vip怎么也起不来 报错为: CRS-1006: n
您好,很高兴为您解答。
在root用户下启动crs:
crsctl start crs
手动启动rac的命令如下:
RAC的启动和关闭
如果都遵循了上面的安装步骤,那么每次节点重新启动的时候,所有服务都会自动启动,如果需要关闭或者启动某个节点,如下所示
停止RAC
emctl stop dbconsole
srvctl stop instance -d orcl -i orcl1
srvctl stop instance -d orcl -i orcl2
srvctl stop asm -n rac1
srvctl stop asm -n rac2
srvctl stop nodeapps -n rac1
srvctl stop nodeapps -n rac2
启动RAC
和上面的步骤正好相反即
srvctl start nodeapps -n rac1
srvctl start nodeapps -n rac2
srvctl start asm -n rac1
srvctl start asm -n rac2
srvctl start instance -d orcl -i orcl2
srvctl start instance -d orcl -i orcl1
emctl start dbconsole
使用 SRVCTL 启动/停止所有实例
启动/停止所有实例及其启用的服务。
srvctl start database -d orcl
srvctl stop database -d orcl
如若满意,请点击右侧采纳答案,如若还有问题,请点击追问
希望我的回答对您有所帮助,望采纳!
以上就是关于RAC重启,但是数据库资源没有随CRS启动全部的内容,包括:RAC重启,但是数据库资源没有随CRS启动、如何启动oraclerac grid、Oracle 12c RAC,其中一个节点数据库实例起不来,怎么办等相关内容解答,如果想了解更多相关内容,可以关注我们,你们的支持是我们更新的动力!
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)