oracle 错误实例分析(ORA-01126)

问题描述

SQL> shutdown immediate
ORA-01109: database not open
Database dismounted.
ORACLE instance shut down.
SQL> startup nomount;
ORACLE instance started.
Total System Global Area 2505338880 bytes
Fixed Size		    2255832 bytes
Variable Size		  738198568 bytes
Database Buffers	 1761607680 bytes
Redo Buffers		    3276800 bytes
SQL> alter database archivelog;
alter database archivelog
*
ERROR at line 1:
ORA-01507: database not mounted

SQL> alter database mount
  2  ;

Database altered.

SQL> alter database archivelog;
alter database archivelog
*
ERROR at line 1:
ORA-01126: database must be mounted in this instance and not open in any
instance

当前为RAC集群模式,更改归档到ASM磁盘组,但是启动归档模式 的时候启动不起来.

问题定位

SQL> show parameter cluster_database

NAME				     TYPE	 VALUE
------------------------------------ ----------- ------------------------------
cluster_database		     boolean	 TRUE
cluster_database_instances	     integer	 2
SQL> show parameter name

NAME				     TYPE	 VALUE
------------------------------------ ----------- ------------------------------
cell_offloadgroup_name		     string
db_file_name_convert		     string
db_name 			     string	 oracle
db_unique_name			     string	 oracle
global_names			     boolean	 FALSE
instance_name			     string	 oracle1
lock_name_space 		     string
log_file_name_convert		     string
processor_group_name		     string
service_names			     string	 oracle

因为这个是RAC数据库,他对比单机数据库区别就是: cluster_database参数,这个参数为true的话就是RAC数据库,
cluster_database_instances --->这个就是两个数据库链接到了这个RAC数据库上.

然而,归档日志的话必须为单节点实例才能开启归档模式
所以需要把集群改为单节点实例
即 cluster_database改为false

问题解决

关闭集群

[grid@node4 ~]$ srvctl status database -d oracle
Instance oracle2 is running on node node3
Instance oracle1 is running on node node4
[grid@node4 ~]$ srvctl stop database -d oracle

[grid@node4 ~]$ crs_stat -t
Name           Type           Target    State     Host
------------------------------------------------------------
ora....ER.lsnr ora....er.type ONLINE    ONLINE    node3
ora....N1.lsnr ora....er.type ONLINE    ONLINE    node4
ora....VATE.dg ora....up.type ONLINE    ONLINE    node3
ora....TA01.dg ora....up.type ONLINE    ONLINE    node3
ora....TA02.dg ora....up.type ONLINE    ONLINE    node3
ora.asm        ora.asm.type   ONLINE    ONLINE    node3
ora.cvu        ora.cvu.type   ONLINE    ONLINE    node4
ora.gsd        ora.gsd.type   OFFLINE   OFFLINE
ora....network ora....rk.type ONLINE    ONLINE    node3
ora....SM2.asm application    ONLINE    ONLINE    node3
ora....E3.lsnr application    ONLINE    ONLINE    node3
ora.node3.gsd  application    OFFLINE   OFFLINE
ora.node3.ons  application    ONLINE    ONLINE    node3
ora.node3.vip  ora....t1.type ONLINE    ONLINE    node3
ora....SM1.asm application    ONLINE    ONLINE    node4
ora....E4.lsnr application    ONLINE    ONLINE    node4
ora.node4.gsd  application    OFFLINE   OFFLINE
ora.node4.ons  application    ONLINE    ONLINE    node4
ora.node4.vip  ora....t1.type ONLINE    ONLINE    node4
ora.oc4j       ora.oc4j.type  ONLINE    ONLINE    node4
ora.ons        ora.ons.type   ONLINE    ONLINE    node3
ora.oracle.db  ora....se.type OFFLINE   OFFLINE
ora....ry.acfs ora....fs.type ONLINE    ONLINE    node3
ora.scan1.vip  ora....ip.type ONLINE    ONLINE    node4

改变节点集群

SQL> startup mount
ORACLE instance started.

Total System Global Area 2505338880 bytes
Fixed Size		    2255832 bytes
Variable Size		  738198568 bytes
Database Buffers	 1761607680 bytes
Redo Buffers		    3276800 bytes
Database mounted.
SQL> show parameter cluster_database

NAME				     TYPE	 VALUE
------------------------------------ ----------- ------------------------------
cluster_database		     boolean	 TRUE
cluster_database_instances	     integer	 2
SQL> alter system set cluster_database=false scope=spfile;

System altered.

SQL> shut immediate;
ORA-01109: database not open


Database dismounted.
ORACLE instance shut down.
SQL> startup mount;
ORACLE instance started.

Total System Global Area 2505338880 bytes
Fixed Size		    2255832 bytes
Variable Size		  738198568 bytes
Database Buffers	 1761607680 bytes
Redo Buffers		    3276800 bytes
Database mounted.
SQL> alter database archivelog;

Database altered.

SQL> alter database open;

Database altered.

SQL> archive log list;
Database log mode	       Archive Mode
Automatic archival	       Enabled
Archive destination	       +ORADATA01/arch1
Oldest online log sequence     57
Next log sequence to archive   58
Current log sequence	       58

问题解决

posted on 2019-03-26 10:26  kingle-l  阅读(784)  评论(0编辑  收藏  举报

levels of contents