Solved

Oracle 7.2 error in Sol 2.5

Posted on 1997-06-07
3
192 Views
Last Modified: 2013-12-26
I get the following error from Oracle when using OCI
ORA-04031: unable to allocate 740 bytes of shared memory ("unknown object","sga heap","library cache")
Any hints as to solve this
0
Comment
Question by:waslap
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 3

Accepted Solution

by:
dhm earned 100 total points
ID: 1293257
I use Oracle/OCI on Solaris-2.5.1 quite a bit, but I've never seen that error.  Is your database up & running correctly?  You are supposed to modify the kernel when you install Oracle, and one of the things you're supposed to do is increase the amount of shared memory that is available to user programs.  If you didn't modify the kernel (and reboot), perhaps your system has just enough shared memory to run Oracle, but not enough for client programs.

The kernel mod in question happens in the file /etc/system; you need to add lines like these (which are copied directly from my /etc/system on an Ultra-2 running 2.5.1):

#
# Set shared mem and semaphore limits for Oracle
#
set shmsys:shminfo_shmmax=8388608
set shmsys:shminfo_shmmin=1
set shmsys:shminfo_shmmni=100
set shmsys:shminfo_shmseg=10
set semsys:seminfo_semmns=400
set semsys:seminfo_semmni=70

Then, of course, you have to do a "reboot -- -rv" to reboot and reconfigure the kernel.
0
 

Author Comment

by:waslap
ID: 1293258
I did this and the system ran well for a couple of months but now starts giving this error. Its always exactly 740 bytes and the "unknown object" part intrigues me. Could it be that there is just too many processes running and memory is running too low ( I noticed each oracle connection using 25Mb in /proc, is this normal ? ). Next thing I'm going to try is make the SGA larger in INI.ORA. Maybe the DB is too busy, but even if so, Oracle should throw away other cached objects, not so ?
0
 
LVL 3

Expert Comment

by:dhm
ID: 1293259
Do you only get the error with this particular program?  Does it always happen, or only when you run (e.g.) 10 copies of the program?  Can you run sqlplus or some other OCI program right after you get the error?

I just ran oerr to find out more about the error; here's what I got:

dhm@eagleone[3]$ oerr ora 04031
04031, 00000, "unable to allocate %s bytes of shared memory (\"%s\",\"%s\",\"%s\")"
// *Cause:  More shared memory is needed than was allocated in the shared
//          pool.
// *Action: Either use the dbms_shared_pool package to pin large packages,
//          reduce your use of shared memory, or increase the amount of
//          available shared memory by increasing the value of the
//          init.ora parameter "shared_pool_size".

So your idea of increasing the SGA in init.ora is close.  I don't know what the "dbms_shared_pool" package is, or how to use it to "pin large packages."  I'd try increasing "shared_pool_size", though.

0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
sum28 challenge 31 117
zeroMAx challenge 20 135
Trying to run powershell  in a batch file. How do I do this? 8 123
Not needed 13 134
In this article, I'll describe -- and show pictures of -- some of the significant additions that have been made available to programmers in the MFC Feature Pack for Visual C++ 2008.  These same feature are in the MFC libraries that come with Visual …
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question