一。情况修改不成功
调整前情况:
[Oracle@racdb2 ~]$ crs_stat -t
Name Type Target State Host
------------------------------------------------------------
ora....B1.lsnr application ONLINE ONLINE racdb1
ora.racdb1.gsd application ONLINE ONLINE racdb1
ora.racdb1.ons application ONLINE ONLINE racdb1
ora.racdb1.vip application ONLINE ONLINE racdb1
ora....B2.lsnr application ONLINE ONLINE racdb2
ora.racdb2.gsd application ONLINE ONLINE racdb2
ora.racdb2.ons application ONLINE ONLINE racdb2
ora.racdb2.vip application ONLINE ONLINE racdb2
ora.shirac.db application ONLINE ONLINE racdb1
ora....src1.cs application ONLINE ONLINE racdb1
ora....ac1.srv application ONLINE ONLINE racdb1
ora....src2.cs application ONLINE ONLINE racdb1
ora....ac1.srv application ONLINE ONLINE racdb1
ora....src1.cs application ONLINE ONLINE racdb2
ora....ac2.srv application ONLINE ONLINE racdb2
ora....src2.cs application ONLINE ONLINE racdb2
ora....ac2.srv application ONLINE ONLINE racdb1
ora....c1.inst application ONLINE ONLINE racdb1
ora....c2.inst application ONLINE ONLINE racdb2
[oracle@racdb2 ~]$ crs_stat
NAME=ora.racdb1.LISTENER_RACDB1.lsnr
TYPE=application
TARGET=ONLINE
STATE=ONLINE on racdb1
NAME=ora.racdb1.gsd
TYPE=application
TARGET=ONLINE
STATE=ONLINE on racdb1
NAME=ora.racdb1.ons
TYPE=application
TARGET=ONLINE
STATE=ONLINE on racdb1
NAME=ora.racdb1.vip
TYPE=application
TARGET=ONLINE
STATE=ONLINE on racdb1
NAME=ora.racdb2.LISTENER_RACDB2.lsnr
TYPE=application
TARGET=ONLINE
STATE=ONLINE on racdb2
NAME=ora.racdb2.gsd
TYPE=application
TARGET=ONLINE
STATE=ONLINE on racdb2
NAME=ora.racdb2.ons
TYPE=application
TARGET=ONLINE
STATE=ONLINE on racdb2
NAME=ora.racdb2.vip
TYPE=application
TARGET=ONLINE
STATE=ONLINE on racdb2
NAME=ora.shirac.db
TYPE=application
TARGET=ONLINE
STATE=ONLINE on racdb1
NAME=ora.shirac.id1_src1.cs
TYPE=application
TARGET=ONLINE
STATE=ONLINE on racdb1
NAME=ora.shirac.id1_src1.shirac1.srv
TYPE=application
TARGET=ONLINE
STATE=ONLINE on racdb1
NAME=ora.shirac.id1_src2.cs
TYPE=application
TARGET=ONLINE
STATE=ONLINE on racdb1
NAME=ora.shirac.id1_src2.shirac1.srv
TYPE=application
TARGET=ONLINE
STATE=ONLINE on racdb1
NAME=ora.shirac.id2_src1.cs
TYPE=application
TARGET=ONLINE
STATE=ONLINE on racdb2
NAME=ora.shirac.id2_src1.shirac2.srv
TYPE=application
TARGET=ONLINE
STATE=ONLINE on racdb2
NAME=ora.shirac.id2_src2.cs
TYPE=application
TARGET=ONLINE
STATE=ONLINE on racdb2
NAME=ora.shirac.id2_src2.shirac2.srv
TYPE=application
TARGET=ONLINE
STATE=ONLINE on racdb1
NAME=ora.shirac.shirac1.inst
TYPE=application
TARGET=ONLINE
STATE=ONLINE on racdb1
NAME=ora.shirac.shirac2.inst
TYPE=application
TARGET=ONLINE
STATE=ONLINE on racdb2
查看当前参数情况:
SQL> show parameter db_files
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
db_files integer 320
在shirac1上执行命令修改参数:
SQL> alter system set db_files=350 scope=spfile sid='*';
System altered.
停数据库:
[oracle@racdb2 ~]$ srvctl stop database -d shirac
[oracle@racdb2 ~]$
[oracle@racdb1 ~]$ crs_stat -t
Name Type Target State Host
------------------------------------------------------------
ora....B1.lsnr application ONLINE ONLINE racdb1
ora.racdb1.gsd application ONLINE ONLINE racdb1
ora.racdb1.ons application ONLINE ONLINE racdb1
ora.racdb1.vip application ONLINE ONLINE racdb1
ora....B2.lsnr application ONLINE ONLINE racdb2
ora.racdb2.gsd application ONLINE ONLINE racdb2
ora.racdb2.ons application ONLINE ONLINE racdb2
ora.racdb2.vip application ONLINE ONLINE racdb2
ora.shirac.db application OFFLINE OFFLINE
ora....src1.cs application ONLINE OFFLINE
ora....ac1.srv application OFFLINE OFFLINE
ora....src2.cs application OFFLINE OFFLINE
ora....ac1.srv application OFFLINE OFFLINE
ora....src1.cs application OFFLINE OFFLINE
ora....ac2.srv application OFFLINE OFFLINE
ora....src2.cs application OFFLINE OFFLINE
ora....ac2.srv application OFFLINE OFFLINE
ora....c1.inst application OFFLINE OFFLINE
ora....c2.inst application OFFLINE OFFLINE
启动数据库
[oracle@racdb2 ~]$ srvctl start database -d shirac
PRKP-1001 : Error starting instance shirac2 on node racdb2
CRS-0215: Could not start resource 'ora.shirac.shirac2.inst'.
cluster状态
[oracle@racdb1 ~]$ crs_stat -t
Name Type Target State Host
------------------------------------------------------------
ora....B1.lsnr application ONLINE ONLINE racdb1
ora.racdb1.gsd application ONLINE ONLINE racdb1
ora.racdb1.ons application ONLINE ONLINE racdb1
ora.racdb1.vip application ONLINE ONLINE racdb1
ora....B2.lsnr application ONLINE ONLINE racdb2
ora.racdb2.gsd application ONLINE ONLINE racdb2
ora.racdb2.ons application ONLINE ONLINE racdb2
ora.racdb2.vip application ONLINE ONLINE racdb2
ora.shirac.db application ONLINE ONLINE racdb2
ora....src1.cs application ONLINE OFFLINE
ora....ac1.srv application OFFLINE OFFLINE
ora....src2.cs application OFFLINE OFFLINE
ora....ac1.srv application OFFLINE OFFLINE
ora....src1.cs application OFFLINE OFFLINE
ora....ac2.srv application OFFLINE OFFLINE
ora....src2.cs application OFFLINE OFFLINE
ora....ac2.srv application OFFLINE OFFLINE
ora....c1.inst application ONLINE ONLINE racdb1
ora....c2.inst application ONLINE OFFLINE
此时报错实例2起不来,sqlplus进去单独启动
[oracle@racdb2 ~]$ sqlplus / as sysdba
SQL*Plus: Release 10.2.0.1.0 - Production on Thu May 31 17:01:49 2012
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to an idle instance.
SQL> startup
ORACLE instance started.
Total System Global Area 444596224 bytes
Fixed Size 2021440 bytes
Variable Size 234883008 bytes
Database Buffers 205520896 bytes
Redo Buffers 2170880 bytes
ORA-01105: mount is incompatible with mounts by other instances
ORA-01174: DB_FILES is 350 buts needs to be 320 to be compatible
提示DB_FILES的值不一致
shirac2上
SQL> show parameter db_files
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
db_files integer 350
shirac1上
SQL> show parameter db_files
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
db_files integer 320
紧急将shirac2实例起来:
SQL> alter system set db_files=320 scope=spfile sid='shirac2';
System altered.
SQL> shutdown immediate;
ORA-01507: database not mounted
ORACLE instance shut down.
SQL> startup;
ORACLE instance started.
Total System Global Area 444596224 bytes
Fixed Size 2021440 bytes
Variable Size 234883008 bytes
Database Buffers 205520896 bytes
Redo Buffers 2170880 bytes
Database mounted.
Database opened.
cluster状态:
[oracle@racdb1 ~]$ crs_stat -t
Name Type Target State Host
------------------------------------------------------------
ora....B1.lsnr application ONLINE ONLINE racdb1
ora.racdb1.gsd application ONLINE ONLINE racdb1
ora.racdb1.ons application ONLINE ONLINE racdb1
ora.racdb1.vip application ONLINE ONLINE racdb1
ora....B2.lsnr application ONLINE ONLINE racdb2
ora.racdb2.gsd application ONLINE ONLINE racdb2
ora.racdb2.ons application ONLINE ONLINE racdb2
ora.racdb2.vip application ONLINE ONLINE racdb2
ora.shirac.db application ONLINE ONLINE racdb2
ora....src1.cs application ONLINE OFFLINE
ora....ac1.srv application OFFLINE OFFLINE
ora....src2.cs application OFFLINE OFFLINE
ora....ac1.srv application OFFLINE OFFLINE
ora....src1.cs application OFFLINE OFFLINE
ora....ac2.srv application OFFLINE OFFLINE
ora....src2.cs application OFFLINE OFFLINE
ora....ac2.srv application OFFLINE OFFLINE
ora....c1.inst application ONLINE ONLINE racdb1
ora....c2.inst application OFFLINE OFFLINE
手动在cluster中启动实例
[oracle@racdb2 ~]$ srvctl start instance -d shirac -i shirac2
[oracle@racdb2 ~]$ crs_stat -t
Name Type Target State Host
------------------------------------------------------------
ora....B1.lsnr application ONLINE ONLINE racdb1
ora.racdb1.gsd application ONLINE ONLINE racdb1
ora.racdb1.ons application ONLINE ONLINE racdb1
ora.racdb1.vip application ONLINE ONLINE racdb1
ora....B2.lsnr application ONLINE ONLINE racdb2
ora.racdb2.gsd application ONLINE ONLINE racdb2
ora.racdb2.ons application ONLINE ONLINE racdb2
ora.racdb2.vip application ONLINE ONLINE racdb2
ora.shirac.db application ONLINE ONLINE racdb2
ora....src1.cs application ONLINE OFFLINE
ora....ac1.srv application OFFLINE OFFLINE
ora....src2.cs application OFFLINE OFFLINE
ora....ac1.srv application OFFLINE OFFLINE
ora....src1.cs application OFFLINE OFFLINE
ora....ac2.srv application OFFLINE OFFLINE
ora....src2.cs application OFFLINE OFFLINE
ora....ac2.srv application OFFLINE OFFLINE
ora....c1.inst application ONLINE ONLINE racdb1
ora....c2.inst application ONLINE ONLINE racdb2
启动服务:
[oracle@racdb2 ~]$ crs_start -all
Attempting to start `ora.shirac.id2_src1.cs` on member `racdb2`
Attempting to start `ora.shirac.id1_src1.cs` on member `racdb1`
Attempting to start `ora.shirac.id2_src2.cs` on member `racdb2`
Attempting to start `ora.shirac.id1_src1.shirac1.srv` on member `racdb1`
Attempting to start `ora.shirac.id1_src2.shirac1.srv` on member `racdb1`
Attempting to start `ora.shirac.id1_src2.cs` on member `racdb1`
Attempting to start `ora.shirac.id2_src1.shirac2.srv` on member `racdb1`
Start of `ora.shirac.id2_src2.cs` on member `racdb2` succeeded.
Start of `ora.shirac.id1_src1.cs` on member `racdb1` succeeded.
Start of `ora.shirac.id1_src2.cs` on member `racdb1` succeeded.
Start of `ora.shirac.id2_src1.cs` on member `racdb2` succeeded.
Start of `ora.shirac.id1_src2.shirac1.srv` on member `racdb1` succeeded.
Start of `ora.shirac.id2_src1.shirac2.srv` on member `racdb1` succeeded.
Start of `ora.shirac.id1_src1.shirac1.srv` on member `racdb1` succeeded.
CRS-0233: Resource or relatives are currently involved with another operation.
[oracle@racdb2 ~]$ crs_stat -t
Name Type Target State Host
------------------------------------------------------------
ora....B1.lsnr application ONLINE ONLINE racdb1
ora.racdb1.gsd application ONLINE ONLINE racdb1
ora.racdb1.ons application ONLINE ONLINE racdb1
ora.racdb1.vip application ONLINE ONLINE racdb1
ora....B2.lsnr application ONLINE ONLINE racdb2
ora.racdb2.gsd application ONLINE ONLINE racdb2
ora.racdb2.ons application ONLINE ONLINE racdb2
ora.racdb2.vip application ONLINE ONLINE racdb2
ora.shirac.db application ONLINE ONLINE racdb2
ora....src1.cs application ONLINE ONLINE racdb1
ora....ac1.srv application ONLINE ONLINE racdb1
ora....src2.cs application ONLINE ONLINE racdb1
ora....ac1.srv application ONLINE ONLINE racdb1
ora....src1.cs application ONLINE ONLINE racdb2
ora....ac2.srv application ONLINE ONLINE racdb1
ora....src2.cs application ONLINE ONLINE racdb2
ora....ac2.srv application ONLINE ONLINE racdb2
ora....c1.inst application ONLINE ONLINE racdb1
ora....c2.inst application ONLINE ONLINE racdb2
二。情况修改成功
在shirac1:
SQL> show parameter instance_name
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
instance_name string shirac1
SQL> show parameter db_files
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
db_files integer 320
在shirac2:
SQL> show parameter instance_name
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
instance_name string shirac2
SQL> show parameter db_files
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
db_files integer 320
在shirac1:
SQL> alter system set db_files=350 scope=spfile sid='shirac2';
System altered.
SQL> alter system set db_files=350 scope=spfile sid='shirac1';
System altered.
停数据库:
[oracle@racdb2 ~]$ srvctl stop database -d shirac
[oracle@racdb2 ~]$
cluster状态:
[oracle@racdb1 ~]$ crs_stat -t
Name Type Target State Host
------------------------------------------------------------
ora....B1.lsnr application ONLINE ONLINE racdb1
ora.racdb1.gsd application ONLINE ONLINE racdb1
ora.racdb1.ons application ONLINE ONLINE racdb1
ora.racdb1.vip application ONLINE ONLINE racdb1
ora....B2.lsnr application ONLINE ONLINE racdb2
ora.racdb2.gsd application ONLINE ONLINE racdb2
ora.racdb2.ons application ONLINE ONLINE racdb2
ora.racdb2.vip application ONLINE ONLINE racdb2
ora.shirac.db application OFFLINE OFFLINE
ora....src1.cs application OFFLINE OFFLINE
ora....ac1.srv application OFFLINE OFFLINE
ora....src2.cs application OFFLINE OFFLINE
ora....ac1.srv application OFFLINE OFFLINE
ora....src1.cs application OFFLINE OFFLINE
ora....ac2.srv application OFFLINE OFFLINE
ora....src2.cs application OFFLINE OFFLINE
ora....ac2.srv application OFFLINE OFFLINE
ora....c1.inst application OFFLINE OFFLINE
ora....c2.inst application OFFLINE OFFLINE
启动数据库:
[oracle@racdb2 ~]$ srvctl start database -d shirac
cluster状态:
[oracle@racdb2 ~]$ crs_stat -t
Name Type Target State Host
------------------------------------------------------------
ora....B1.lsnr application ONLINE ONLINE racdb1
ora.racdb1.gsd application ONLINE ONLINE racdb1
ora.racdb1.ons application ONLINE ONLINE racdb1
ora.racdb1.vip application ONLINE ONLINE racdb1
ora....B2.lsnr application ONLINE ONLINE racdb2
ora.racdb2.gsd application ONLINE ONLINE racdb2
ora.racdb2.ons application ONLINE ONLINE racdb2
ora.racdb2.vip application ONLINE ONLINE racdb2
ora.shirac.db application ONLINE ONLINE racdb1
ora....src1.cs application OFFLINE OFFLINE
ora....ac1.srv application OFFLINE OFFLINE
ora....src2.cs application OFFLINE OFFLINE
ora....ac1.srv application OFFLINE OFFLINE
ora....src1.cs application OFFLINE OFFLINE
ora....ac2.srv application OFFLINE OFFLINE
ora....src2.cs application OFFLINE OFFLINE
ora....ac2.srv application OFFLINE OFFLINE
ora....c1.inst application ONLINE ONLINE racdb1
ora....c2.inst application ONLINE ONLINE racdb2
修改后情况:
SQL> show parameter instance_name
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
instance_name string shirac1
SQL> show parameter db_files
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
db_files integer 350
SQL> show parameter instance_name
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
instance_name string shirac2
SQL> show parameter db_files
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
db_files integer 350
参数已经修改成功,启动服务
[oracle@racdb1 ~]$ crs_start -all
Attempting to start `ora.shirac.id1_src1.cs` on member `racdb1`
Attempting to start `ora.shirac.id1_src1.shirac1.srv` on member `racdb2`
Attempting to start `ora.shirac.id1_src2.cs` on member `racdb1`
Attempting to start `ora.shirac.id2_src1.shirac2.srv` on member `racdb1`
Start of `ora.shirac.id1_src1.shirac1.srv` on member `racdb2` succeeded.
Attempting to start `ora.shirac.id1_src2.shirac1.srv` on member `racdb1`
Attempting to start `ora.shirac.id2_src2.cs` on member `racdb2`
Start of `ora.shirac.id1_src1.cs` on member `racdb1` succeeded.
Attempting to start `ora.shirac.id2_src1.cs` on member `racdb2`
Attempting to start `ora.shirac.id2_src2.shirac2.srv` on member `racdb1`
Start of `ora.shirac.id2_src1.cs` on member `racdb2` succeeded.
Start of `ora.shirac.id1_src2.cs` on member `racdb1` succeeded.
Start of `ora.shirac.id2_src1.shirac2.srv` on member `racdb1` succeeded.
Start of `ora.shirac.id2_src2.cs` on member `racdb2` succeeded.
Start of `ora.shirac.id1_src2.shirac1.srv` on member `racdb1` succeeded.
Start of `ora.shirac.id2_src2.shirac2.srv` on member `racdb1` succeeded.
[oracle@racdb1 ~]$ crs_stat -t
Name Type Target State Host
------------------------------------------------------------
ora....B1.lsnr application ONLINE ONLINE racdb1
ora.racdb1.gsd application ONLINE ONLINE racdb1
ora.racdb1.ons application ONLINE ONLINE racdb1
ora.racdb1.vip application ONLINE ONLINE racdb1
ora....B2.lsnr application ONLINE ONLINE racdb2
ora.racdb2.gsd application ONLINE ONLINE racdb2
ora.racdb2.ons application ONLINE ONLINE racdb2
ora.racdb2.vip application ONLINE ONLINE racdb2
ora.shirac.db application ONLINE ONLINE racdb1
ora....src1.cs application ONLINE ONLINE racdb1
ora....ac1.srv application ONLINE ONLINE racdb2
ora....src2.cs application ONLINE ONLINE racdb1
ora....ac1.srv application ONLINE ONLINE racdb1
ora....src1.cs application ONLINE ONLINE racdb2
ora....ac2.srv application ONLINE ONLINE racdb1
ora....src2.cs application ONLINE ONLINE racdb2
ora....ac2.srv application ONLINE ONLINE racdb1
ora....c1.inst application ONLINE ONLINE racdb1
ora....c2.inst application ONLINE ONLINE racdb2
当前位置: 数据库>oracle
Oracle RAC环境修改db_files参数
来源: 互联网 发布时间:2017-04-30
本文导语: 一。情况修改不成功调整前情况:[Oracle@racdb2 ~]$ crs_stat -tName Type Target State Host ------------------------------------------------------------ora....B1.lsnr application ONLINE ONLINE racdb1 ...