NAME TYPE VALUE
------------------------------------ ---------------------- ------------------------------
instance_name string +ASM1
SQL> show parameter memory
NAME TYPE VALUE
------------------------------------ ---------------------- ------------------------------
memory_max_target big integer 1076M
memory_target big integer 1076M
[oracle@jyrac1 ~]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.4.0 Production on Wed Apr 20 15:21:04 2016
Copyright (c) 1982, 2013, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Data Mining and Real Application Testing options
SQL> set long 900
SQL> set linesize 900
SQL> show parameter instance_name
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
instance_name string jyrac1
SQL> show parameter memory
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
hi_shared_memory_address integer 0
memory_max_target big integer 2G
memory_target big integer 2G
shared_memory_address integer 0
确实asm与数据库实例都启用了AMM,需要禁用AMM但是可以使用ASMM修改ASM实例,禁用AMM,但使用ASMM,如果是RAC所有节点都需要修改
SQL> alter system set sga_max_size=640M scope=spfile sid='*';
System altered.
SQL> alter system set sga_target=640M scope=spfile sid='*';
System altered.
SQL> alter system set pga_aggregate_target=320M scope=spfile sid='*';
System altered.
SQL> alter system set memory_target=0 scope=spfile sid='*';
System altered.
这里对于memory_target不能使用reset否则会出现以下错误:
SQL> startup
ORA-01078: failure in processing system parameters
ORA-00843: Parameter not taking MEMORY_MAX_TARGET into account
ORA-00849: SGA_TARGET 671088640 cannot be set to more than MEMORY_MAX_TARGET 0.
SQL> alter system reset memory_max_target scope=spfile sid='*';
System altered.
修改数据库实例,禁用AMM,但使用ASMM,如果是RAC所有节点都需要修改
SQL> alter system set sga_max_size=640M scope=spfile sid='*';
System altered.
SQL> alter system set sga_target=640M scope=spfile sid='*';
System altered.
SQL> alter system set pga_aggregate_target=320M scope=spfile sid='*';
System altered.
SQL> alter system reset memory_max_target scope=spfile sid='*';
System altered.
SQL> alter system reset memory_target scope=spfile sid='*';
System altered.
重启ASM与数据库实例,如果是RAC所有节点都需要重启,首先停止ASM与数据库实例
[grid@jyrac1 ~]$ srvctl stop asm -n jyrac1 -f
[grid@jyrac1 ~]$ srvctl stop asm -n jyrac2 -f
[grid@jyrac1 ~]$ srvctl stop database -d jyrac
[grid@jyrac1 ~]$ crsctl stat res -t
--------------------------------------------------------------------------------
NAME TARGET STATE SERVER STATE_DETAILS
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.CRSDG.dg
OFFLINE OFFLINE jyrac1
OFFLINE OFFLINE jyrac2
ora.DATADG.dg
OFFLINE OFFLINE jyrac1
OFFLINE OFFLINE jyrac2
ora.LISTENER.lsnr
ONLINE ONLINE jyrac1
ONLINE ONLINE jyrac2
ora.asm
OFFLINE OFFLINE jyrac1 Instance Shutdown
OFFLINE OFFLINE jyrac2 Instance Shutdown
ora.gsd
ONLINE OFFLINE jyrac1
ONLINE OFFLINE jyrac2
ora.net1.network
ONLINE ONLINE jyrac1
ONLINE ONLINE jyrac2
ora.ons
ONLINE ONLINE jyrac1
ONLINE ONLINE jyrac2
ora.registry.acfs
OFFLINE OFFLINE jyrac1
OFFLINE OFFLINE jyrac2
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.LISTENER_SCAN1.lsnr
1 ONLINE ONLINE jyrac2
ora.cvu
1 ONLINE ONLINE jyrac2
ora.jyrac.db
1 OFFLINE OFFLINE Instance Shutdown
2 OFFLINE OFFLINE Instance Shutdown
ora.jyrac1.vip
1 ONLINE ONLINE jyrac1
ora.jyrac2.vip
1 ONLINE ONLINE jyrac2
ora.oc4j
1 ONLINE ONLINE jyrac2
ora.scan1.vip
1 ONLINE ONLINE jyrac2
启动ASM与数据库实例
grid@jyrac1 ~]$ sqlplus / as sysasm
SQL*Plus: Release 11.2.0.4.0 Production on Wed Apr 20 17:48:32 2016
Copyright (c) 1982, 2013, Oracle. All rights reserved.
Connected to an idle instance.
SQL> startup
ASM instance started