oracle10g,又遭遇了04031错误

ORA-00604: error occurred at recursive SQL level 5
ORA-04031: unable to allocate 4096 bytes of shared memory ("shared pool","select /*+ rule */ bucket, e...","Typecheck heap","kgghteInit")

让我们来看看metalink的解释:

fact: Oracle Server - Enterprise Edition
symptom: ORA-04031: unable to allocate %s bytes of shared memory (/"%
s/",/"%s/",/"%s/",/"%s/")
cause: New object can not be loaded into shared pool. Shared pool is either
too small or too fragmented or both.

10g是号称不需要使用过多内存就可以的了哦
继续来看看:




D:/oracle/product/BIN>sqlplus "/as sysdba"

SQL*Plus: Release 10.1.0.2.0 - Production on 星期五 9月 24 14:20:06 2004

Copyright (c) 1982, 2004, Oracle.  All rights reserved.


Connected to:
Oracle Database 10g Enterprise Edition Release 10.1.0.2.0 - Production
With the Partitioning, OLAP and Data Mining options

SQL> show parameter shared

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
__shared_pool_size                   big integer 32M
hi_shared_memory_address             integer     0
max_shared_servers                   integer
shared_memory_address                integer     0
shared_pool_reserved_size            big integer 1677721
shared_pool_size                     big integer 32M
shared_server_sessions               integer
shared_servers                       integer     1
SQL>
SQL> conn /as sysdba
Connected.
SQL> conn scott/tiger
ERROR:
ORA-28001: the password has expired


Changing password for scott
New password:
Retype new password:
Password changed
ERROR:
ORA-00604: error occurred at recursive SQL level 3
ORA-04031: unable to allocate 4096 bytes of shared memory ("shared
pool","select count(*) from sys.job...","Typecheck heap","kgghteInit")


Error accessing package DBMS_APPLICATION_INFO
Connected.
出现错误,不知道为什么。我们再次登陆看看:
SQL> conn /as sysdba
Connected.
SQL> conn scott/frank
Error accessing PRODUCT_USER_PROFILE
Warning:  Product user profile information not loaded!
You may need to run PUPBLD.SQL as SYSTEM
ERROR:
ORA-00604: error occurred at recursive SQL level 3
ORA-04031: unable to allocate 4096 bytes of shared memory ("shared
pool","select /*+ rule */ bucket, e...","Typecheck heap","kgghteInit")


Error accessing package DBMS_APPLICATION_INFO
Connected.
SQL>



OK,我们以SYSTEM执行下PUPBLD.SQL,再来看看结果:

SQL> conn system/frank
ERROR:
ORA-00604: error occurred at recursive SQL level 4
ORA-04031: unable to allocate 4096 bytes of shared memory ("shared
pool","select /*+ rule */ bucket_cn...","Typecheck heap","kgghteInit")


Error accessing package DBMS_APPLICATION_INFO
Connected.
SQL> @?/sqlplus/admin/pupbld.sql
DROP SYNONYM PRODUCT_USER_PROFILE
*
ERROR at line 1:
ORA-00604: error occurred at recursive SQL level 4
ORA-04031: unable to allocate 4096 bytes of shared memory ("shared
pool","select /*+ rule */ bucket_cn...","Typecheck heap","kgghteInit")


  DATE_VALUE FROM PRODUCT_USER_PROFILE
                  *
ERROR at line 3:
ORA-00604: error occurred at recursive SQL level 3
ORA-04031: unable to allocate 4096 bytes of shared memory ("shared
pool","select name,password,datats#...","Typecheck heap","kgghteInit")


DROP TABLE PRODUCT_USER_PROFILE
*
ERROR at line 1:
ORA-00604: error occurred at recursive SQL level 5
ORA-04031: unable to allocate 4096 bytes of shared memory ("shared
pool","select /*+ rule */ bucket, e...","Typecheck heap","kgghteInit")


ALTER TABLE SQLPLUS_PRODUCT_PROFILE ADD (LONG_VALUE LONG)
                                         *
ERROR at line 1:
ORA-01430: column being added already exists in table


CREATE TABLE SQLPLUS_PRODUCT_PROFILE
             *
ERROR at line 1:
ORA-00955: name is already used by an existing object


DROP TABLE PRODUCT_PROFILE
*
ERROR at line 1:
ORA-00604: error occurred at recursive SQL level 4
ORA-04031: unable to allocate 4096 bytes of shared memory ("shared
pool","select /*+ rule */ bucket, e...","Typecheck heap","kgghteInit")


DROP VIEW PRODUCT_PRIVS
*
ERROR at line 1:
ORA-00604: error occurred at recursive SQL level 5
ORA-04031: unable to allocate 4096 bytes of shared memory ("shared
pool","select /*+ rule */ bucket_cn...","Typecheck heap","kgghteInit")


CREATE VIEW PRODUCT_PRIVS AS
            *
ERROR at line 1:
ORA-00955: name is already used by an existing object

 

Grant succeeded.

DROP PUBLIC SYNONYM PRODUCT_PROFILE
*
ERROR at line 1:
ORA-00604: error occurred at recursive SQL level 2
ORA-04031: unable to allocate 4096 bytes of shared memory ("shared
pool","select name,intcol#,segcol#,...","Typecheck heap","kgghteInit")


CREATE PUBLIC SYNONYM PRODUCT_PROFILE FOR SYSTEM.PRODUCT_PRIVS
                      *
ERROR at line 1:
ORA-00955: name is already used by an existing object


DROP SYNONYM PRODUCT_USER_PROFILE
*
ERROR at line 1:
ORA-00604: error occurred at recursive SQL level 5
ORA-04031: unable to allocate 4096 bytes of shared memory ("shared
pool","select /*+ rule */ bucket, e...","Typecheck heap","kgghteInit")


CREATE SYNONYM PRODUCT_USER_PROFILE FOR SYSTEM.SQLPLUS_PRODUCT_PROFILE
               *
ERROR at line 1:
ORA-00955: name is already used by an existing object


DROP PUBLIC SYNONYM PRODUCT_USER_PROFILE
*
ERROR at line 1:
ORA-00604: error occurred at recursive SQL level 4
ORA-04031: unable to allocate 4096 bytes of shared memory ("shared
pool","select /*+ rule */ bucket, e...","Typecheck heap","kgghteInit")

CREATE PUBLIC SYNONYM PRODUCT_USER_PROFILE FOR SYSTEM.PRODUCT_PRIVS
                      *
ERROR at line 1:
ORA-00955: name is already used by an existing object

SQL>

看来这个不是解决问题的办法



其实这个问题是我在试图占用很少内存的时候使用oracle10g遇到的,因为我的本本内存只有256m,:(
SQL> create pfile='d:/ora10g.ora' from spfile;
编辑文件,删除这样一行:orcl.__shared_pool_size=33554432
*.shared_pool_size=53554432,保存

SQL> startup force pfile='d:/ora10g.ora'
ORACLE instance started.

Total System Global Area   83886080 bytes
Fixed Size                   787568 bytes
Variable Size              78642064 bytes
Database Buffers            4194304 bytes
Redo Buffers                 262144 bytes
Database mounted.
Database opened.
在连接就正常了
SQL> conn scott/frank
Connected.
可为什么要那么共享内存呢?




郁闷,继续

SQL> create spfile from pfile='d:/ora10g.ora';

File created.

SQL> show parameter shared

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
hi_shared_memory_address             integer     0
max_shared_servers                   integer
shared_memory_address                integer     0
shared_pool_reserved_size            big integer 2726297
shared_pool_size                     big integer 52M
shared_server_sessions               integer
shared_servers                       integer     0
SQL> show sga

Total System Global Area   83886080 bytes
Fixed Size                   787568 bytes
Variable Size              78642064 bytes
Database Buffers            4194304 bytes
Redo Buffers                 262144 bytes
SQL> startup force
SQL> alter system set shared_pool_size=30m scope=both;
alter system set shared_pool_size=30m scope=both
*
ERROR at line 1:
ORA-02097: parameter cannot be modified because specified value is invalid
ORA-04034: unable to shrink pool to specified size

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值