SUMMARY: shmat problem with Oracle

From: Kristberg Ágúst Karlsson <kak_at_tron.lyngbyes.dk>
Date: Wed, 29 Apr 1998 16:59:25 +0200

WOW what a list.
In the spur of th moment my problem was solved.

The original request was:
> I found a postings dated Jun of 97 and then again in Feb 98 where
> someone had this problem occur but
> I am unable to find a summary or solution.
>
> ORA-07337: smsmat: shmat error, unable to attach sga.
> DEC OSF/1 (AXP) Error: 12: Not enough space
> Additional information: 2
>
> Oracle 7.3.2 running on Dec Aplha 1000 running DU4.0B.
>
> Could someone please help??
>
Many thanks to Alan Garde who suggested:
> this might be the solution for this problem or it might be a different one ;)
>
> $ORACLE_HOME/otrace/admin/process.dat can grow past the size of shared memory. Truncate this file (cat /dev/null > process.dat) before trying to restart oracle.

This solved my problem instantly.

And many thanks to Bryan Fredrick at the Minnesota Pollution Control
Agency
who also did some explaining (thanks) and a more thorough solution:
> In Oracle 7.3, Oracle incorporated new optimizer code that they acquired when
> the purchased RDB from Digitial. With this new code Oracle installed the
> Oracle*Trace facility by default. The Oracle trace facility keeps track of a
> bunch of data in the SGA and this data grows with time, eventually causing the
> SGA to exceed available memory. As a convenience, Oracle also saves the data in
> the files $ORACLE_HOME/otrace/admin/{collect.dat,regid.dat,process.dat}, SO THAT
> IT CAN RESTORE THE DATA TO THE SGA WHEN A NEW SERVER IS STARTED. Amazingly, if
> you ran out of memory before when you tried to allocate memory for the SGA,
> reloading the same data also causes the same problem (with a SHMAT error like
> you're reporting).
>
> The fix: delete the files $ORACLE_HOME/otrace/admin/*.dat files and recreate
> them with the utility otrccref (just run it, no parameters, and default *.dat
> files will be created). THEN, make sure you have the environment variable set
> EPC_DISABLED=TRUE ; export EPC_DISABLED
> and restart the database (you may want to shutdown any listeners or other Oracle
> processes and restart them after setting the variable). You MUST have this
> variable set whenever you start the database (system startup, backups,
> manual-restarts, etc), or the otrace data will begin growing again.
>
> Here's what a default-sized otrace *.dat files come up as on my system, if yours
> are much larger, you have the problem:
>
> saturn.pca.state.mn.us> cd $ORACLE_HOME/otrace/admin
> saturn.pca.state.mn.us> ls -l *.dat
> -rw-rw-rw- 1 oracle7 dba 5452 Nov 12 01:00 collect.dat
> -rw-rw-rw- 1 oracle7 dba 342432 Apr 29 01:02 process.dat
> -rw-rw-rw- 1 oracle7 dba 14432 Apr 29 01:02 regid.dat

--
Kristberg Agust Karlsson
Lyngby Business College
DK-2800 Lyngby Denmark
http://delfi.lyngbyes.dk/~kak
Received on Wed Apr 29 1998 - 17:00:06 NZST

This archive was generated by hypermail 2.4.0 : Wed Nov 08 2023 - 11:53:37 NZDT