Using dbstart and dbshut scripts to automate DB startup in Oracle 8.1.7 (LINUX)
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 5 of 5

Thread: Using dbstart and dbshut scripts to automate DB startup in Oracle 8.1.7 (LINUX)

  1. #1
    Join Date
    Jun 2001
    Location
    NY
    Posts
    226

    Angry

    Dear Members
    I have successfully installed and created an Oracle 8.1.7 database on linux. However, I am still having problems automating startup of the database when my linux system boots up or automatic shutdown when the system is switched off. The dbstart/dbshut scripts works just fine when run at the command prompt after the system has been started.

    Please explain to me how I can automatically have these scripts ran when I boot or shut down my linux systems in order to start or shutdown my databases.
    roukie-dba

  2. #2
    Join Date
    Jun 2001
    Posts
    132
    this might be helpful.

    http://www.arsdigita.com/ad-training/acs-install/oracle

    with installation guide and startup/shutdown scripts and more.
    You think I'm going to have an affair with you? --Stanley Kowalski

  3. #3
    Join Date
    Jun 2001
    Location
    NY
    Posts
    226

    automating startup/shutdown on 8.1.7 (linux)

    Thanks a lot "TheSlob" for your reply and useful link.
    The dbstart and dbshut scripts in 8.1.7 does run correctly when invoked from the shell though. Can the moderator PLEASE outline the steps for me to use the dbstart and dbshut scripts that came with my 8.1.7 Oracle for Linux to automate the startup and shutdown??
    Thanks in advace
    roukie-dba

  4. #4
    Join Date
    Jun 2000
    Location
    Madrid, Spain
    Posts
    7,447
    I dont know if you have read the installation guide but it comes with the steps to use these 2 scripts.

    Cut from the installation.pdf obtained from otn.racle.com

    Automate Database Startup and Shutdown (Optional)
    You can configure your system to automatically start Oracle databases when your
    system starts up and to shut down Oracle databases when your system shuts down.
    Automating database startup is optional, but automatic shutdown is recommended
    because it guards against improper shutdown of the database.
    The dbstart and dbshut scripts are located in the $ORACLE_HOME/bin directory
    and can be used to automate database startup and shutdown.
    The dbstart and dbshut scripts reference the same entries in the oratab file, so
    the scripts must apply to the same set of databases. For example, you cannot have
    dbstart automatically start up databases sid1, sid2, and sid3, and dbshut
    shut down only databases sid1 and sid2. You can, however, specify that dbshut
    shut down a set of databases while dbstart is not used at all. To do this, include
    the dbshut entry in the shutdown file but omit the dbstart entry from the system
    startup files.
    This process must be completed for every new database that you want to configure
    for automated startup and shutdown. Perform the following tasks to set up the
    dbstart and dbshut scripts so that they are called at system startup:
    1. Edit the etc/oratab file.
    Database entries in the oratab file appear in the following format:
    ORACLE_SID:ORACLE_HOME:{Y|N}
    where Y or N specifies whether you want the dbstart and dbshut scripts to
    start up and shut down the database. Find the entries for all the databases that
    you want to start up. They are identified by the sid in the first field. Change
    the last field for each to Y.
    2. Create a file named dbora in the /etc/init.d directory (if it does not already
    exist).
    3. Create entries similar to the following at the end of the dbora file (if they do
    not already exist). Be sure to give the full path of the dbstart utility.
    #!/bin/sh
    # 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
    ORA_HOME=/u01/app/oracle/product/8.1.7
    ORA_OWNER=oracle
    if [! -f $ORA_HOME/bin/dbstart]
    then
    echo "Oracle startup: cannot start"
    exit
    See Also: For a description of system startup and shutdown
    procedures, check the init command in your Linux Intel
    documentation.
    fi
    case "$1" in
    ístartí)
    # 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í)
    # 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 &
    ;;
    esac
    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

    If you dont have this download it from Technet

  5. #5
    Join Date
    Jun 2001
    Location
    NY
    Posts
    226

    Thank you very much

    Pando and "theslob" thank you both very much for all the help, not forgetting all the other members and moderators of this outstanding forum.
    roukie-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
  •  



Click Here to Expand Forum to Full Width