DBAsupport.com Forums - Powered by vBulletin
Results 1 to 3 of 3
  1. #1
    Join Date
    Dec 2000


    I wanted to do an automatic shutdown and startup of db in a solaris 7 and from the forums prev discussion and docs i created a file dbora in /etc/init.d
    # Set ORA_HOME to be equivalent to the ORACLE_HOME
    # from which you wish to execute dbstart and
    # dbshut
    # set ORA_OWNER to the user id of the owner of the
    # Oracle database in ORA_HOME
    if [! -f $ORA_HOME/bin/dbstart]
    echo "Oracle startup: cannot start"
    case "$1" in
    # Start the Oracle databases:
    # The following command assumes that the oracle login will not prompt the
    # user for any values
    su - $ORA_OWNER -c $ORA_HOME/bin/dbstart &
    # Stop the Oracle databases:
    # The following command assumes that the oracle login will not prompt the
    # user for any values
    su - $ORA_OWNER -c $ORA_HOME/bin/dbshut &

    I have stopped here:

    after that the doc says to
    4. Link dbora by entering:
    # ln -s /etc/init.d/dbora /etc/rc0.d/K10dbora
    # ln -s /etc/init.d/dbora /etc/rc2.d/S99dbora

    i assumed that when u eexec the above a copy of the above file is created in K10dbora and S99dbora (IMO -that the dir are created when u execute the cmds), and a link to the origianl file is maintained and in ls -l the links should be 2(if i am correct).

    can i go ahead from step 4- from what i have said - please correct me if i am wrong.

    the next Q is how would i know if the db has been shutdown using the above file during a system shutdown.the problem arose bcos of the power outages in California.is there anyway to find if this file is executed and successful.
    and does the system pass the shutdown or startup as arguments to the dbora file bcos the case..esac has them.
    any help is appreciated.
    PS: I am new to UNIX.

  2. #2
    Join Date
    Oct 2000
    Saskatoon, SK, Canada
    If I had understood your question correctly, when you create a link, what happens in Unix is that it would create a pointer to the file. As a result making modification at one place get reflected to all the pointer locations. When you choose that link, what happens is you would be reading the files from its original location, there by you are restraining yourself from having to manage multiple files.

    Now comming to the point of K... and S... file suffixes, they get executed at different points. I don't know which gets exected at boot time and which one at the shutdown time.

    To know whether the program got executed during the boot time or not, check the boot log and it would reveal the informations.

    Please let us know if you have any more questions.


    Life is a journey, not a destination!

  3. #3
    Join Date
    Feb 2001
    K => Kill / Stop
    S => Start

    BTW, these scripts are executed only when the system goes through the normal init levels to shutdown. If there is a power outage and the system has a hard crash or if you issue a reboot the kill scripts will not work


Posting Permissions

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

Click Here to Expand Forum to Full Width

We have made updates to our Privacy Policy to reflect the implementation of the General Data Protection Regulation.