Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> Re: Tru64 UNIX files: "lkDBNAME" & "sgadefSID.dbf"

Re: Tru64 UNIX files: "lkDBNAME" & "sgadefSID.dbf"

From: Stephane Faroult <sfaroult_at_oriole.com>
Date: Fri, 28 Jun 2002 13:53:24 -0800
Message-ID: <F001.0048BE5C.20020628135324@fatcity.com>


ltiu wrote:
>
> 1) lkDBName is the lock file for the database currently running.
>
> If you try to run another instance of the same DB, it will look for this file
> and if it finds it, it will give you an error telling you that it is already
> running.
>
> 2) No answer for this.

 Don't know about the full contents, but the shmid of the SGA is located somewhere near the beginning. Here is how it goes :

  You start Oracle, it reads init.ora, computes how much shared memory it needs, allocates it using the shmget() system call which returns a system-generated handle (shmid). This is written to sgadef.  Then you start a session. You run your SQL*Plus, it fork()s and exec()s the oracle program (your shadow process). Needs to map the shared memory int its own address space, something done with the shmat() call which takes as argument this (int) handle. Damn, what handle should I use? Eh, what about looking into a file? And there you are.  Don't know how they do it now. Perhaps some kind of signal-based dialog, identifying say 'our' smon and trying to break ice. Doesn't keep me awake at night, yawn.

>
> >Greetings fellow-Listers,
> >
> >On a couple of our Tru64 Unix machines which still have Oracle 7.3.4 running
>
> >on them, I have occasionally noticed the following kinds of files in the
> >$ORACLE_HOME/dbs directory :
> >
> >(1) lkDBNAME
> >This file is formed by "lk" + the database name. There is a file for each
>
> >and every database that was ever created on this machine and the file never
>
> >goes away.
> >
> >The permissions for each are "--w-------", and is owned by "oracle". There
>
> >are 0 records in each.
> >
> >
> >(2) sgadefSID.dbf
> >This file is formed by "sgadef" + the SID + ".dbf". There is one of these
>
> >files only for each of the databases that are currently up and running.
> >Each disappears once the corresponding database is brought down.
> >
> >The permissions for each are "-rw-r-----" and is also owned by "oracle".
> >There are 784 records in each and the contents are binary so there is
> >nothing to be seen by us decimal creatures.
> >
> >
> >Does anybody know what these are and what their function is?
> >
> >Thanks very much,
> >
> >JDamiano
> >

-- 
Regards,

Stephane Faroult
Oriole Software
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Stephane Faroult
  INET: sfaroult_at_oriole.com

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).
Received on Fri Jun 28 2002 - 16:53:24 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US