Simpler Navigation for Servers and Operating Systems
Completed: a much simpler Servers and Operating Systems section of the Community. We combined many of the older boards, so you won't have to click through so many levels to get at the information you need. Check the consolidated boards here as many sub-forums are now single boards.
cancel
Showing results for 
Search instead for 
Did you mean: 

Then second instance don't run

Joaquín_2
Advisor

Then second instance don't run

I have two instances of oracle in my system. A few days ago both instances run correctly but now it does not work and returns the following error:
Oracle Server Manager Release 3.0.4.0.0 - Production

(c) Copyright 1997, Oracle Corporation. All Rights Reserved.

Oracle8 Enterprise Edition Release 8.0.4.0.0 - Production
PL/SQL Release 8.0.4.0.0 - Production

SVRMGR> Connected.
SVRMGR> ORA-27123: unable to attach to shared memory segment
HP-UX Error: 22: Invalid argument
SVRMGR> Server Manager complete



When I execute the ipcs -ma the system returns this:
IPC status from /dev/kmem as of Thu Feb 24 09:40:08 2005
T ID KEY MODE OWNER GROUP CREATOR CGROUP NATTCH SEGSZ CPID LPID ATIME DTIME CTIME
Shared Memory:
m 0 0x411c025d --rw-rw-rw- root root root root 0 348 792 792 7:00:56 7:00:56 7:00:50
m 1 0x00000000 D-rw-rw-rw- root root root root 2 61760 792 794 8:59:56 7:00:56 16:49:40
m 2 0x4120189e --rw-rw-rw- root root root root 2 8192 792 794 8:59:56 7:00:50 7:00:50
m 3 0x301c7964 --rw-rw-rw- root root root root 4 1048576 1592 1629 7:02:17 no-entry 7:01:12
m 4 0x501c75da --r--r--r-- root other root root 1 1075095 1731 1731 7:01:18 7:01:18 7:01:18
m 12805 0x0007ae37 --rw-rw-rw- root root root root 5 512000 2585 21282 3:14:28 no-entry 7:01:31
m 518 0x4918214f --rw-r--r-- root root root root 0 22908 2383 11554 19:06:00 19:06:00 7:01:32
m 40967 0x0107ae37 --rw-rw-rw- root root root root 1 808 2585 290 19:11:59 no-entry 19:11:59
m 35336 0x65645769 --rw-rw-rw- chovi general chovi general 3 16392 20969 3430 9:38:44 no-entry 8:02:01
m 17929 0xe1d282f0 --rw-r----- oracle dba oracle dba 124 881332224 22356 3782 9:40:07 9:40:07 4:30:01
m 11786 0x0c6629c9 --rw-r----- root general root general 1 16247200 14385 12288 18:59:29 16:15:15 7:18:25
m 11 0x06347849 --rw-rw-rw- root general root general 0 77384 15976 11554 18:56:26 7:18:25 18:16:44

Can someone say to me that shared memory can would deleted to have sufficient shared memory to run another instance?

thanks

7 REPLIES
Elmar P. Kolkman
Honored Contributor

Re: Then second instance don't run

The second line in the ipcs output is what is possibly causing the problem: there is a process (in fact 2, NATTCH is still 2) attached to that block of memory, though it is marked as deleted (the D in the mode).
So what you need to do is find those 2 processes, stop them, and then look at the ipcs output again. If the segment is gone from the output, you can try to start the instance again.

Good luck,

Elmar
Every problem has at least one solution. Only some solutions are harder to find.
Indira Aramandla
Honored Contributor

Re: Then second instance don't run

Hi,

The error ORA-27123: unable to attach to shared memory segment
HP-UX Error: 22: Invalid argument

Make sure the oracle executable ($ORACLE_HOME/bin/oracle) has proper permissions set. It should be : 6755 (-rwsr-sr-x) . This is usually the cause for the error you get

There could be a piece of shared memory still allocated for this particular instance. Issue the commands 'ipcs -sa' and 'ipcs -ma' and clear them by issuing 'ipcrm -m ' for memory and 'ipcrm -s ' for semaphores associated with oracle.

Then try starting oracle again. Another problem that may happen is you could be requesting too many semaphores. Try reducing the number of processes in the init.ora or increasing the semaphores in the system. Oracle checks to see if enough contiguous semaphores are available at startup... even if you never have that many processes.

The value of the kernel parameter "shmmax" is at least 10% bigger than the estimated size of the SGA of for database.

There is a piece of shared memory still allocated for this particular instance.

Oracle does not always clean up it's resources when an instance does not successfully mount and they must be removed manually. You need to remove the shared memory for this instance.

Indira A
Never give up, Keep Trying
Joaquín_2
Advisor

Re: Then second instance don't run

Only I have found a process with the pid 794 that it is the process:

F S UID PID PPID C PRI NI ADDR SZ WCHAN STIME TTY TIME COMD
1 S root 794 1 0 127 20 49f97680 17 ae3684 Jan 22 ? 0:00 /usr/lbin/nktl_daemon 0 0 0 0 0 1 -2

This process seems to be important. Must I eliminate it?

The permissions of $ORACLE_HOME/bin/oracle is-rwsr-s - x.
Can it influence something?

thank reply me!
S Plunkett
Occasional Advisor

Re: Then second instance don't run

Ensure the oracle executable in $ORACLE_HOME/bin has the correct ownerships. The file should be owned by ora and the group, dba.

HTH,
TwoProc
Honored Contributor

Re: Then second instance don't run

I've also seen this when I've managed somehow to shutdown one instance when using the Oracle_Home of the other. Basically, you can use the Oracle_home of one with just another SID (assuming that each instance has its own ORACLE_HOME - but they don't have to).

Like this...

First database in use..
ORACLE_HOME=/u1/app/oracle/ONEDB
PATH=$PATH:/u1/app/oracle/ONEDB/bin
ORACLE_SID=ONEDB

Second database in use (at different times).
ORACLE_HOME=/u1/app/oracle/TWODB
PATH=$PATH:/u1/app/oracle/TWODB/bin
ORACLE_SID=TWODB

Let's say you mix it up somehow...
( by manually making cahnges and not using your standard commands )...
ORACLE_HOME=/u1/app/oracle/TWODB
PATH=$PATH:/u1/app/oracle/ONEDB/bin
ORACLE_SID=ONEDB

if you startup from here - you'll have to shutdown the exact same way or you won't be able reach the shared memory segments...

Due to this type of problem I put in scripts years ago that change database environments for us and our programmers, and they prevent the user from being in two environments at once - so to speak...
We are the people our parents warned us about --Jimmy Buffett
Joaquín_2
Advisor

Re: Then second instance don't run

The problem already this solved. The error was and the last two segments of shared memory, these segments were of the midaemon. I have deleted them and have turn on midaemon and the instance of oracle has worked correctly.

Thanks to all.
Joaquín_2
Advisor

Re: Then second instance don't run

thanks