Solved

shared memory error

Posted on 2009-07-15
34
631 Views
Last Modified: 2013-12-19
Hi, I'm trying to install Oracle 10g on RHEL 5.3.  I have the folllowing kernel params:
net.ipv4.conf.default.rp_filter = 1
net.ipv4.conf.default.accept_source_route = 0
kernel.sysrq = 0
kernel.core_uses_pid = 1
net.ipv4.tcp_syncookies = 1
kernel.msgmnb = 65536
kernel.msgmax = 65536
kernel.shmmax = 4294967295
kernel.shmall = 268435456
kernel.shmmni=4096
kernel.sem=250 32000 100 128
net.ipv4.ip_local_port_range=1024 65000
net.core.rmem_default=262144
net.core.rmem_max=262144
net.core.wmem_default=262144
net.core.wmem_max=262144

I have SElinux disabled
8GB Memory
8 gB set as swap

Whenever the installation tries to configure the database it stops with the error:
ORA-27123 - unable to attach to shared memory, then ora 01034 - Oracle not found.

I'm installing on Dell M600 blade in Dell M1000e enclosure wit Aix4-5i Storage array .  Hardware was setup by Dell.
Server has 2 x 250 GB drives in raid 1.

Please tell me what is going wrong.  I've tried  to install as standard and as enterpriseusing.  Whenever it gets to Product-Specific Prerequisite it also stops and says network check fails but I allow it to continue.

Please for some help


Pete
0
Comment
Question by:Pete-Castillo
  • 12
  • 11
  • 10
  • +1
34 Comments
 
LVL 30

Assisted Solution

by:Kerem ERSOY
Kerem ERSOY earned 240 total points
Comment Utility
Hi,

It seems that your SGA size is larger than your shmmax size. To display and modify or let Oracle manage it automatically check this article here:

http://www.databasejournal.com/features/oracle/article.php/10893_3400301_1/Automate-the-Sizing-of-your-SGA-in-Oracle-10g.htm


Cheers,
K.
0
 
LVL 30

Assisted Solution

by:Kerem ERSOY
Kerem ERSOY earned 240 total points
Comment Utility
BTW your SHM size iz set for 4 GB how much memory do you think you would need to allocate to Oracle? only 4 GB? Is it really a calculation or something you've done automatically?
0
 

Author Comment

by:Pete-Castillo
Comment Utility
Thanks KaremE
I'm reall not an expert here.  How much should I set the SHM.  I've tried to set it based on recommendations  from various users.  I've been told this was appropriate.
0
 

Author Comment

by:Pete-Castillo
Comment Utility
I can't automate sizing the SGA - I can't even complete the installation>

0
 
LVL 30

Assisted Solution

by:Kerem ERSOY
Kerem ERSOY earned 240 total points
Comment Utility
Check here too:
http://www.dba-oracle.com/concepts/sga_system_global_area.htm

For the second error:

It seems that :
- You did not set ORACLE_HOME and ORACLE_SID global variables. You need to set  them in dba user profile.
- Your oracle user over RHEL 5.3 is not a member of the dba group

May be the problem causeing all these errors is that you did not set these variables. In this case Oracle tries to calculate these values and if it is different than the current sid it might not be able to allocate the same amount of memory for the second sid it wants to create.

Cheers,
K.
0
 
LVL 30

Assisted Solution

by:Kerem ERSOY
Kerem ERSOY earned 240 total points
Comment Utility
Ok then please try to add these variables in your oracle RHEL user's logon profile.
0
 

Author Comment

by:Pete-Castillo
Comment Utility
the settings in the .bash_profile are as follow:
# .bash_profile

# Get the aliases and functions
if [ -f ~/.bashrc ]; then
      . ~/.bashrc
fi

# User specific environment and startup programs

PATH=$PATH:$HOME/bin

export PATH
TMP=/tmp; export TMP
TMPDIR=$TMP; export TMPDIR

ORACLE_BASE=/u01/app/oracle; export ORACLE_BASE
ORACLE_HOME=$ORACLE_BASE/product/10.2.0/ASYWDB; export ORACLE_HOME
ORACLE_SID=ASYWDB; export ORACLE_SID
ORACLE_TERM=xterm; export ORACLE_TERM
0
 
LVL 40

Accepted Solution

by:
mrjoltcola earned 260 total points
Comment Utility
There is no need to set ORACLE_SID during the Oracle install phase or during a db creation. I actually encourage dbas to unset ORACLE_SID prior to running dbca to reduce possible errors.

It is most likely your choice of memory size when creating a db. How large of a shared memory segment Oracle tries to allocate is based on your choice of memory size during db creation, not based on your kernel max settings.

Where specifically is the installer failing and how much memory are you choosing for SGA? I recommend only choosing a small amount during the install, say 512mb. Then tune later.

1) You can install without creating a starter database, that will ensure you get the software installed
2) If you made it to the db creation step, then you should not have to repeat the full install, instead just re-un dbca
3) Please post exactly where it is failing.
0
 
LVL 40

Assisted Solution

by:mrjoltcola
mrjoltcola earned 260 total points
Comment Utility
Also, what bitness are the OS and Oracle, 32 or 64?

With 32-bit you surely do not want to try to allocate more than approx 2.5gb of SGA without custom settings.
0
 
LVL 30

Assisted Solution

by:Kerem ERSOY
Kerem ERSOY earned 240 total points
Comment Utility
how do you login to your oracle account ?
0
 
LVL 30

Assisted Solution

by:Kerem ERSOY
Kerem ERSOY earned 240 total points
Comment Utility
I agree with mrjoltcola don't set SID during install. I was thinking that the installation was done. But Iam not sure if you canget the environment correctly if you're using su.

Will you post your

uname -a

and

free

outputs

 
0
 

Author Comment

by:Pete-Castillo
Comment Utility
mrjoltcola:
The install falls soon after it starts configuring the database

Karem, I tried loggin in as oracle user and I also tried su - oracle from the # prompt
I'm usin 32 - bit
0
 
LVL 40

Assisted Solution

by:mrjoltcola
mrjoltcola earned 260 total points
Comment Utility
It's also a good idea to set PATH and LD_LIBRARY_PATH in the profile of the oracle user

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ORACLE_HOME/lib
export PATH=$PATH:$ORACLE_HOME/bin:$HOME/bin


Which user are you running the setup from?

1) Exit the installer
2) Make sure you are oracle
3) Type: unset ORACLE_SID
4) run dbca
5) Choose one of the standard databases like "General Purpose"
6) Choose AL32UTF8 character set (good practice for most dbs)
7) Choose a small amount of SGA memory. 512mb is good to start.
 
0
 

Author Comment

by:Pete-Castillo
Comment Utility
Hi,
I'm trying to install again.  The following is the result of the check run by the installer:

Checking operating system requirements ...
Expected result: One of redhat-3,redhat-4,SuSE-9,asianux-1,asianux-2
Actual Result: redhat-3
Check complete. The overall result of this check is: Passed
=======================================================================

Checking operating system package requirements ...
Checking for make-3.79; found make-1:3.81-3.el5.      Passed
Checking for binutils-2.14; found binutils-2.17.50.0.6-9.el5.      Passed
Checking for gcc-3.2; found gcc-4.1.2-44.el5.      Passed
Checking for libaio-0.3.96; found libaio-0.3.106-3.2.      Passed
Check complete. The overall result of this check is: Passed
=======================================================================

Checking kernel parameters
Checking for semmsl=250; found semmsl=250.      Passed
Checking for semmns=32000; found semmns=32000.      Passed
Checking for semopm=100; found semopm=100.      Passed
Checking for semmni=128; found semmni=128.      Passed
Checking for shmmax=536870912; found shmmax=4294967295.      Passed
Checking for shmmni=4096; found shmmni=4096.      Passed
Checking for shmall=2097152; found shmall=268435456.      Passed
Checking for file-max=65536; found file-max=747857.      Passed
Checking for VERSION=2.4.21; found VERSION=2.6.18-128.el5PAE.      Passed
Checking for ip_local_port_range=1024 - 65000; found ip_local_port_range=1024 - 65000.      Passed
Checking for rmem_default=262144; found rmem_default=262144.      Passed
Checking for rmem_max=262144; found rmem_max=262144.      Passed
Checking for wmem_default=262144; found wmem_default=262144.      Passed
Checking for wmem_max=262144; found wmem_max=262144.      Passed
Check complete. The overall result of this check is: Passed
=======================================================================

Checking Recommended glibc version
Expected result: ATLEAST=2.3.2-95.27
Actual Result: 2.5-34
Check complete. The overall result of this check is: Passed
=======================================================================

Checking physical memory requirements ...
Expected result: 922MB
Actual Result: 7856MB
Check complete. The overall result of this check is: Passed
=======================================================================

Checking available swap space requirements ...
Expected result: 7856MB
Actual Result: 8191MB
Check complete. The overall result of this check is: Passed
=======================================================================

Checking Network Configuration requirements ...
Actual Result: :java.lang.NullPointerException:Exception/Error Occurred
Check complete. The overall result of this check is: Not executed <<<<
Recommendation: Oracle supports installations on systems with DHCP-assigned public IP addresses.  However, the primary network interface on the system should be configured with a static IP address in order for the Oracle Software to function properly.  See the Installation Guide for more details on installing the software on systems configured with DHCP.
=======================================================================

Validating ORACLE_BASE location (if set) ...
Check complete. The overall result of this check is: Passed
=======================================================================

Checking Oracle Home path for spaces...
Check complete. The overall result of this check is: Passed
=======================================================================

Checking for proper system clean-up....
Check complete. The overall result of this check is: Passed
=======================================================================

Checking for Oracle Home incompatibilities ....
Actual Result: NEW_HOME
0
 
LVL 40

Assisted Solution

by:mrjoltcola
mrjoltcola earned 260 total points
Comment Utility
What is your network config like?

Assign a static IP to the box or use localhost later on in the listener config. You may need to edit /etc/hosts and put the hostname on the same line as 127.0.0.1

The TNS listener will require a static IP regardless of loopback or actual interface.

0
 

Author Comment

by:Pete-Castillo
Comment Utility
hi,
The installation has completed without the database install.  I'm trying to run the two root scripts now.  The second is telling:

The following environment variables are set as
ORACLE_OWNER=oracle
ORACLE_HOME=/u01/app/oracle/product/10.2.0/ASYWDB
(ASYWDB is our chosen name)
enter the full pathname of the local bin directory [/usr/local/bin/]

is the path /usr/local/bin? or is it talking about a path in our Oracle home?

0
 
LVL 40

Assisted Solution

by:mrjoltcola
mrjoltcola earned 260 total points
Comment Utility
/usr/local/bin

It will copy a couple of scripts there.
0
What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

 

Author Comment

by:Pete-Castillo
Comment Utility
Sorry. I got that  - its /usr/local/bin.

I've completed the install.  I'm really grateful for all the assistance I'm getting.  Imust confess I've never gotten so much attention so quickly .

Now if you'll all bare with me, can someone please outline to me the next steps e.g configuring database etc.  really appreciate it

Pete
0
 
LVL 30

Assisted Solution

by:Kerem ERSOY
Kerem ERSOY earned 240 total points
Comment Utility
I guess I get the problem:

edit your /etc/hosts

then you will see something like that:

127.0.0.1       localhost.localdomain   localhost  hortname.localldomain
::1     localhost6.localdomain6 localhost6

Please edit it so that it will be something like:

127.0.0.1       localhost.localdomain   localhost
x.x.x.x           yourhost.domain.com yourhost
::1     localhost6.localdomain6 localhost6

Save and exit.

assign a static ip to your eth0 interface and make sure that x.x.x.x thet you^'ve put in hosts is your ethernet interface address.


Retry and let me know.
0
 
LVL 30

Assisted Solution

by:Kerem ERSOY
Kerem ERSOY earned 240 total points
Comment Utility
> Now if you'll all bare with me, can someone please outline to me the next steps e.g configuring database > etc.  really appreciate it

Of course there2s no problem with that we're all here because we like to help. But in sake of the further researchers find the correct response to your question I'll suggest you to close this question and open another with a proper title about Oracle DB creation and administration if you don't mind.

Cheers,
K.
 
0
 
LVL 40

Assisted Solution

by:mrjoltcola
mrjoltcola earned 260 total points
Comment Utility
The only thing I see that you did abnormally was naming the ORACLE_HOME

>>ORACLE_HOME=/u01/app/oracle/product/10.2.0/ASYWDB

It really should have been:

>>ORACLE_HOME=/u01/app/oracle/product/10.2.0


Then multiple instances can share it, but with different ORACLE_SIDs


0
 
LVL 30

Assisted Solution

by:Kerem ERSOY
Kerem ERSOY earned 240 total points
Comment Utility
This networking issue is important please check it. This is a potential cuplrit and sometimes causing lots of troubles. Since the system thinks that its IP address is 127.0.0.1.
0
 
LVL 40

Assisted Solution

by:mrjoltcola
mrjoltcola earned 260 total points
Comment Utility
The Oracle listener and EM control must have a static IP / hostname associated. The enterprise manager will be setup according to a host or IP and then if it changes, it will stop functioning. The listner is easy to reconfig, but the EM repository is not so simple.

So as KeremE says, fix the static IP to the hostname prior to creating the DB and the initial listener.
0
 

Author Comment

by:Pete-Castillo
Comment Utility
mrjoltcola:
The only thing I see that you did abnormally was naming the ORACLE_HOME

>>ORACLE_HOME=/u01/app/oracle/product/10.2.0/ASYWDB

It really should have been:

>>ORACLE_HOME=/u01/app/oracle/product/10.2.0


Then multiple instances can share it, but with different ORACLE_SIDs

I understand but in our case there is absolutely no chance that we will be having any other instances with different SIDs.
0
 
LVL 40

Assisted Solution

by:mrjoltcola
mrjoltcola earned 260 total points
Comment Utility
Sure, but since you are new to this its best to understand Oracle standard naming convention. It will simply make things easier. But there is nothing wrong with your setting, it will not cause any problems.

Do some reading on Oracle OFA compliance and you'll see some good guidelines and perhaps some pedantic ones. I deviate from the recommended naming because I like short pathnames. I usually do:

ORACLE_BASE=/oracle
ORACLE_HOME=/oracle/10.2.0

etc.
0
 

Author Comment

by:Pete-Castillo
Comment Utility
The /etc/hosts is exactly like you suggested except that I've commented out the IPV6 part.
How is the space between domain name and hostname created - I use tabs - is this o k or should it spacebar.

Also have two eth and both assigned static IPs
0
 
LVL 40

Assisted Solution

by:mrjoltcola
mrjoltcola earned 260 total points
Comment Utility
space or tab works
0
 
LVL 30

Assisted Solution

by:Kerem ERSOY
Kerem ERSOY earned 240 total points
Comment Utility
In UNIX these cahracters are called whitespace and it could be either space or tab.
 
0
 

Author Comment

by:Pete-Castillo
Comment Utility
Ok, I've been trying to create a database user called 'asyw' but I keep getting a 'invalid numeric argument 'asyw'.  I've created groups asyw and dba.

useradd -c "Program Owner" -d "/home2/asyw" -g asyw -G dba, users -m -n -s "/bin/bash" asyw

What could be the problem?
0
 
LVL 40

Assisted Solution

by:mrjoltcola
mrjoltcola earned 260 total points
Comment Utility
Database user? That is an OS user.

Do you mean dba user?

I'm thinking I agree with KeremE it is time for a new question since this one has now changed and has been solved.
0
 
LVL 30

Expert Comment

by:Kerem ERSOY
Comment Utility
useradd -c "Program Owner" -d "/home2/asyw" -g asyw -G dba, users -m -n -s "/bin/bash" asyw

The problem here is you don't need to specify the group -g asyw if you' not previously created it. Furthermore RH and Centos automatically creates a group with the same nam during useradd
0
 
LVL 30

Expert Comment

by:Kerem ERSOY
Comment Utility
:) Yeah this way beyond the shared memory problem thing :))
0
 
LVL 40

Expert Comment

by:mrjoltcola
Comment Utility
Glad to help, good teamwork!
0
 

Expert Comment

by:filitov
Comment Utility
Did you solved the problem? When you have a 32bit O.S. and want to use more than 1.7GB in a single process, you need to make some tricks to lower the memory attach address.

In the case of Oracle, all you need to do is the following:

# Go to lib directory on your Oracle home location
cd $ORACLE_HOME/rdbms/lib
# Make a backup of the ksms.s file
cp ksms.s ksms.s_orig
# Generate a new ksms file lowering the attach address from the default 0x5000000 to 0xe000000
genksms -s 0Xe000000 > ksms.s
# Create a new ksms.o
make -f ins_rdbms.mk ksms.o
# Relink the ioracle binary
make -f ins_rdbms.mk ioracle

And then try to restart your database. It seems that you choose automatic SGA sizing with a target of 25% of your physical memory, which makes sense with the failure 'cause of the 1.7GB limit on 32-bits.

Hope it helps.
0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Have you ever had to make fundamental changes to a table in Oracle, but haven't been able to get any downtime?  I'm talking things like: * Dropping columns * Shrinking allocated space * Removing chained blocks and restoring the PCTFREE * Re-or…
How to Unravel a Tricky Query Introduction If you browse through the Oracle zones or any of the other database-related zones you'll come across some complicated solutions and sometimes you'll just have to wonder how anyone came up with them.  …
This video shows syntax for various backup options while discussing how the different basic backup types work.  It explains how to take full backups, incremental level 0 backups, incremental level 1 backups in both differential and cumulative mode a…
This video shows how to Export data from an Oracle database using the Datapump Export Utility.  The corresponding Datapump Import utility is also discussed and demonstrated.

743 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now