Results 1 to 4 of 4
  1. #1
    Join Date
    Feb 2004
    Posts
    45

    Unanswered: Oracle automatic shutdown and sigterm

    Like several others on this forum I have tried to implement automatic shutdown for My oracle server (Enterprise 9i on RH 9) by creating a script in /etc/init.d and then placing a link to this script in /etc/rc0.d, /etc/rc5.d...

    I've looked into why the script is not working and found that shutdown sends a sigterm to all running processes (including oracle threads) before running the /etc/init.d scripts. Once the oracle processes receive the sigterm, they do not allow connections, so the script in /etc/init.d, which connects as sysdba in order to do a shutdown, can't get oracle's attention.

    If you are running such a shutdown script in /etc/init.d and you know it's working (i.e. your alert log shows no recovery activity when you start the server again), please let Me know how you got around this problem.

    Thanks !
    It was working just 5 minutes ago - I promise !

  2. #2
    Join Date
    Aug 2003
    Location
    Where the Surf Meets the Turf @Del Mar, CA
    Posts
    7,776
    Provided Answers: 1
    FWIW - I don't use scripts in the rc*.d folders to start & stop Oracle,
    but if I did I would place them in rc3.d.
    In my terms, you have a race condition & Oracle is losing the race.
    You simply need to make sure the Oracle shutdown script runs before the OS starts killing the (background Oracle) processes.
    You can lead some folks to knowledge, but you can not make them think.
    The average person thinks he's above average!
    For most folks, they don't know, what they don't know.
    Good judgement comes from experience. Experience comes from bad judgement.

  3. #3
    Join Date
    Feb 2004
    Posts
    45
    anacedent, I think you are right about not being able to use /etc/init.d scripts because of the sigterm issue. I guess that means we have to grow up and start managing (*cough* *choke* *gasp*) our server....
    BTW, the machine is normally at runlevel 5. When a shutdown happens, doesn't it change to runlevel 0 ?
    It was working just 5 minutes ago - I promise !

  4. #4
    Join Date
    Apr 2002
    Location
    California, USA
    Posts
    482
    You should give the dbshut process to complete before continuing with the script. By default the command in this script is just "shutdown" . You can change it to "shutdown immediate" and also put a sleep 30 in your shell script.

    And yes, you have to have the symbolic links in level 6 for the Kxxoracle - shutdown & startup script


    Hope that helps,

    clio_usa - OCP 8/8i/9i DBA

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •