Results 1 to 6 of 6
  1. #1
    Join Date
    Dec 2002
    Location
    Brazil
    Posts
    59

    Unanswered: How to startup and shutdown an instance automatically?

    Hi,

    Here I have two oracle instances 8i in a Linux Red Heat Server.
    My doubt is: what do I have to do to startup and shutdown my instances during the startup and shutdown of my server automatically?
    I mean, is there a special setting in the database or do I have to create scripts.
    Please send me your advices, but these actions must be automatic, because I don't want do give this responsability to my operators.....
    So when my operator shutdowns the server, something automatic must happens before the server shutdowns to shutdown the instances, understand?
    The same must happens when I start the server, so the instances must startup automatically without any manual action...

    Thank you all... Bye!!!
    Nadia

  2. #2
    Join Date
    Jul 2003
    Posts
    2,296
    you could use Oracles dbstart and dbstop and attach them to whatever runtime environment you use.

    HOWEVER, from what I understand, dbstop does not actually shutdown the db if you issue a shutdown. The db is technically in a state of recovery (shutdown abort).

    Either way, Oracle has put NO TIME into updating these scripts. If you look at them you will find them attempting to connect incorrectly along with other discrepancies. You will need to do editing to both scripts.

    Also, I could never get the listener to start on it's own so I put a line in the
    dbstart script to start the lsitener right after it started the db. This was the only
    way I could get the listener to autostart.
    - The_Duck
    you can lead someone to something but they will never learn anything ...

  3. #3
    Join Date
    Jul 2003
    Posts
    2,296
    I found the below which came recommended from a RedHat website:
    This seems to be a substitute for the oracle dbstart/dbstop scripts

    Look up: Oracle9i RHL Run Package
    Code:
    http://www.gurulabs.com/downloads.html
    - The_Duck
    you can lead someone to something but they will never learn anything ...

  4. #4
    Join Date
    Dec 2002
    Location
    Brazil
    Posts
    59
    Hi,

    So, this is the action I took:

    =>I updated my oratab located in /etc/oratab.
    Now it is like this:
    orcl:/usr/oracle/product/8.1.7:Y
    cisp:/usr/oracle/product/8.1.7:Y
    #these two are my actual instances (orcl,cisp) where cisp was created recently.

    Now I have some doubts:

    1) Do I need to configure anything else to provide the automatic startup and shutdown of my 2 instances?

    2) I have a file in /etc/rc.local with this content:
    touch /var/lock/subsys/local
    su - oracle<<EOF
    svrmgrl
    connect internal
    startup
    quit
    EOF

    su - oracle<<EOF
    lsnrctl start
    EOF

    Do I need to update this file with my recent instance "cisp" or dbstart is able to start my 2 instances automatically without this rc.local???

    3) I was checking the dbshut located in /oracle_home/bin and I discovered that shutdown mode is normal. So do you think its's recommended to change this script in order to provide a shutdown immediate????

    Please, I will be waiting for your answers.
    Sorry, but my oracle was installed by another dba who isn't here anymore and I don't have a testing environment to test my doubts.
    Nadia

  5. #5
    Join Date
    Jul 2003
    Posts
    2,296
    that won't be enough.
    you need to set up your environment since at bootime the user is
    root and not the oracle user.

    you would also need to put your link files into the proper run-level
    directory.

    who -r <-- shows what runlevel you bootup on

    if runlevel = 3 then goto /etc/rc3.d <-- create your links there
    - The_Duck
    you can lead someone to something but they will never learn anything ...

  6. #6
    Join Date
    Apr 2002
    Location
    California, USA
    Posts
    482
    The complete startup/shutdown script with the symbolic links are posted Automatic Startup and Shutdown of Oracle on Linux


    Hope that helps,

    clio_usa - OCP DBA 8/8i/9i

Posting Permissions

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