No relevant resource is found in the selected language.

This site uses cookies. By continuing to browse the site you are agreeing to our use of cookies. Read our privacy policy>Search


To have a better experience, please upgrade your IE browser.


eSight V300R009C00 Single-Node System Software Installation Guide (SUSE Linux) 09

Rate and give feedback:
Huawei uses machine translation combined with human proofreading to translate this document to different languages in order to help you better understand the content of this document. Note: Even the most advanced machine translation cannot match the quality of professional translators. Huawei shall not bear any responsibility for translation accuracy and it is recommended that you refer to the English document (a link for which has been provided).
Configuring Automatic Startup for the Oracle Database

Configuring Automatic Startup for the Oracle Database

Add the Oracle database and listener startup programs to the automatic startup programs for the operating system. When the operating system restarts, the Oracle database and listener also starts.


  1. Log in to the Oracle database server as the root user.
  2. Modify the service name configuration.

    # vi /etc/oratab

    One or more items in the format ORACLE_SID:$ORACLE_HOME:<N|Y> are contained in the dbora file. Modify the item corresponding to ORACLE_SID (for example, eSight) to Y.


  3. Access the init.d directory.

    # cd /etc/init.d

  4. Create the orcl file, add the following commands in the file, the /opt/oracle/product/11.2.0/db_1 is the installation path of the Oracle database, save and close the file.

    # vi orcl

    #! /bin/bash 
    # Provides:          oracle  
    # Required-Start: $remote_fs $syslog $time postfix 
    # Should-Start:      $network  
    # Required-Stop:     $remote_fs $syslog 
    # Should-Stop:       $network  
    # Default-Start:     3 5 
    # Default-Stop:      0 1 2 4 6 
    # Short-Description: automatic start oracle 
    # Description:       Start/Stop Oracle Database 
    ### END INIT INFO 
    case "$1" in 
     if [ -f $LOCKFILE ]; then 
          echo $0 already running. 
          exit 1 
     echo -n $"Starting Oracle Database:" 
     su - $ORACLE_USER -c "$ORACLE_HOME/bin/lsnrctl start ESIGHTLISTENER" 
     su - $ORACLE_USER -c "$ORACLE_HOME/bin/dbstart" 
     su - $ORACLE_USER -c "$ORACLE_HOME/bin/emctl start dbconsole" 
     chmod 640 $ORACLE_HOME/startup.log 
     touch $LOCKFILE 
     if [ ! -f $LOCKFILE ]; then 
          echo $0 already stopping. 
          exit 1 
     echo -n $"Stopping Oracle Database:" 
     su - $ORACLE_USER -c "$ORACLE_HOME/bin/lsnrctl stop ESIGHTLISTENER" 
     su - $ORACLE_USER -c "$ORACLE_HOME/bin/dbshut" 
     su - $ORACLE_USER -c "$ORACLE_HOME/bin/emctl stop dbconsole" 
     rm -f $LOCKFILE 
     $0 stop 
     $0 start 
     if [ -f $LOCKFILE ]; then 
          echo $0 started. 
          echo $0 stopped. 
     echo "Usage: $0 [start|stop|status]" 
     exit 1 
    exit 0     

  5. Change permissions on the file.

    # chmod 700 /etc/init.d/orcl

  6. Run the following commands to configure automatic startup for the Oracle database when the Linux operating system starts:

    # chkconfig --add orcl

    # chkconfig orcl on

Updated: 2019-05-17

Document ID: EDOC1100011860

Views: 92715

Downloads: 138

Average rating:
This Document Applies to these Products
Related Documents
Related Version
Previous Next