Happy3w

oracle启动报错“ORA-04031: unable to allocate 589152 bytes of shared memory ("shared pool","unkn own object","sga heap(1,0)","KXDBIO state obj")”

2016.06.02
场景: 由于机器配置不够,所以调整了oracle大小内存。 调整内存语句: alter system set processes = 90 scope=spfile; alter system set workarea_size_policy = AUTO scope=spfile; alter system set sga_max_size = 500M scope=spfile; alter system set db_cache_size = 300M scope=spfile; alter system set shared_pool_size = 100M scope=spfile; alter system set memory_max_target = 0 scope=spfile; alter system set memory_target = 0 scope=spfile; 为了让内存更改生效,把oracle重启(执行showdown命令,然后再执行 startup),但是很不幸出错了。 错误提示:
ORA-04031: unable to allocate 589152 bytes of shared memory ("shared pool","unkn own object","sga heap(1,0)","KXDBIO state obj")
解决方案: 1、将pfile配置文件.ora拷贝一份出来,重新调小,另存为init_blue.ora。用init_blue.ora重新启动。 命令如下: startup pfile='D:\Program\oracle12c\admin\blue\pfile\init_blue.ora' 乐3巫,整个命令执行过程如下,供大家参考: D:\>cd D:\Program\oracle12c\product\12.1.0\dbhome_1 D:\Program\oracle12c\product\12.1.0\dbhome_1>sqlplus SQL*Plus: Release 12.1.0.1.0 Production on 星期一 3月 28 15:20:18 2016 Copyright (c) 1982, 2013, Oracle. All rights reserved. 请输入用户名: / as sysdba ERROR: ORA-01017: invalid username/password; logon denied 请输入用户名: sys/Blue0937 as sysdba 连接到: Oracle Database 12c Enterprise Edition Release 12.1.0.1.0 - 64bit Production With the Partitioning, OLAP, Advanced Analytics and Real Application Testing opt ions SQL> alter system set processes = 90 scope=spfile; 系统已更改。 SQL> alter system set workarea_size_policy = AUTO scope=spfile; 系统已更改。 SQL> alter system set sga_max_size = 500M scope=spfile; 系统已更改。 SQL> SQL> SQL> alter system set db_cache_size = 300M scope=spfile; 系统已更改。 SQL> SQL> SQL> alter system set shared_pool_size = 100M scope=spfile; 系统已更改。 SQL> SQL> alter system set memory_max_target = 0 scope=spfile; 系统已更改。 SQL> alter system set memory_target = 0 scope=spfile; 系统已更改。 SQL> shutdown ; 数据库已经关闭。 已经卸载数据库。 ORACLE 例程已经关闭。 SQL> startup ORA-04031: unable to allocate 589152 bytes of shared memory ("shared pool","unkn own object","sga heap(1,0)","KXDBIO state obj") SQL> startup nomount ORA-04031: unable to allocate 589152 bytes of shared memory ("shared pool","unkn own object","sga heap(1,0)","KXDBIO state obj") SQL> startup pfile='D:\Program\oracle12c\admin\blue\pfile\init_blue.ora' ORACLE 例程已经启动。 Total System Global Area 939495424 bytes Fixed Size 2409368 bytes Variable Size 675286120 bytes Database Buffers 255852544 bytes Redo Buffers 5947392 bytes 数据库装载完毕。 数据库已经打开。 SQL> qui^A