How to automatically start Oracle on SUSE Linux

I have Oracle 11g installed on a server running SUSE Linux 11. I followed the official Oracle instructions to try to implement the Oracle for an automatic start.

My/etc/oratab file contains the following:

sidname:/opt/oracle/product/11gR2/db:Y

I created a /etc/init.d/dbora file that contains the following:

#! /bin/sh  -x
#
# Change the value of ORACLE_HOME to specify the correct Oracle home
# directory for your installation.

ORACLE_HOME=/opt/oracle/product/11gR2/db
#
# Change the value of ORACLE to the login name of the
# oracle owner at your site.
#
ORACLE=oracle

PATH=${PATH}:$ORACLE_HOME/bin
HOST=`hostname`
PLATFORM=`uname`
export ORACLE_HOME PATH
#
if [ ! "$2" = "ORA_DB" ] ; then
   if [ "$PLATFORM" = "HP-UX" ] ; then
      remsh $HOST -l $ORACLE -n "$0 $1 ORA_DB"
      exit
   else
      rsh $HOST -l $ORACLE  $0 $1 ORA_DB
      if [ "$PLATFORM" = "Linux" ] ; then
          touch /var/lock/subsys/dbora
      fi
      exit
   fi
fi
#
case $1 in
'start')
        $ORACLE_HOME/bin/dbstart $ORACLE_HOME &
        ;;
'stop')
        $ORACLE_HOME/bin/dbshut $ORACLE_HOME &
        ;;
*)
        echo "usage: $0 {start|stop}"
        exit
        ;;
esac
#
exit

So I ran the following commands:

chgrp dba /etc/init.d/dbora
chmod 750 /etc/init.d/dbora
ln -s /etc/init.d/dbora /etc/rc.d/rc0.d/K01dbora
ln -s /etc/init.d/dbora /etc/rc.d/rc3.d/S99dbora
ln -s /etc/init.d/dbora /etc/rc.d/rc5.d/S99dbora
shutdown -r now

After the reboot, Oracle did not work:

server:~ # ps -fea | grep ora
root      2681  2563  0 21:18 ?        00:00:00 hald-addon-storage: no polling on /dev/fd0 because it is explicitly disabled
root      2688  2563  0 21:18 ?        00:00:00 hald-addon-storage: polling /dev/sr0 (every 2 sec)
root      4491  4333  0 21:19 pts/1    00:00:00 grep ora
server:~ # ps -fea | grep lsnr
root      4493  4333  0 21:19 pts/1    00:00:00 grep lsnr

Oracle works very well after the start of the instance (by logging in as "sys as sysdba" sqlplus and the command 'boot') and the listener. But it will not start automatically after the server is restarted. Why is this?

I got it to work.  I had to change the file released to look like this:

#! /bin/sh  -x
#
# Change the value of ORACLE_HOME to specify the correct Oracle home
# directory for your installation.

ORACLE_HOME=/opt/oracle/product/11gR2/db
#
# Change the value of ORACLE to the login name of the
# oracle owner at your site.
#
ORACLE=oracle

PATH=${PATH}:$ORACLE_HOME/bin
export ORACLE_HOME PATH

touch /var/lock/subsys/dbora

case $1 in
'start')
        su - $ORACLE $ORACLE_HOME/bin/dbstart $ORACLE_HOME &
        ;;
'stop')
        su - $ORACLE $ORACLE_HOME/bin/dbshut $ORACLE_HOME &
        ;;
*)
        echo "usage: $0 {start|stop}"
        exit
        ;;
esac
#
exit

Then I had to delete the files auto_listener.sh and startup.log in $ORACLE_HOME because they were incorrectly owned by root.

Tags: Database

Similar Questions

  • automatically start oracle...?

    Hi all,

    I installed oracle 11 GR 2 successfully in redhat 6.4 on my pc. After that, I want to

    do auto-start when pc starts. I used the follwing script: -.

    #! / bin/bash

    #

    # oracledb - little shell script for autostart your databases oracle and Auditor

    #

    # chkconfig: 2345 90 90

    # Source function library.

    . /etc/init.d/functions

    # Source network configuration.

    . sysconfig

    PROG = oracledb

    LOCKFILE = / var/lock/subsys / $prog

    ORACLE_HOME=/opt/Oracle/app/Oracle/product/11.2.0/dbhome_1

    ORACLE_USER = oracle

    Start() {}

    ["$NETWORKING" = "no"] & & exit 1

    If [f $LOCKFILE]; then

    echo $0 already running.

    Output 1

    FI

    echo - n $"Starting oracle database."

    known - $ORACLE_USER - c "start ORACLE_HOME/bin/lsnrctl $".

    Su - $ORACLE_USER-c "$ORACLE_HOME/bin/dbstart $ORACLE_HOME.

    known - $ORACLE_USER - c "$ORACLE_HOME/bin/emctl start dbconsole.

    RETVAL = $?

    ECHO

    [$RETVAL - eq 0] & & touch $LOCKFILE

    return $RETVAL

    }

    Stop() {}

    If [! f $LOCKFILE]; then

    echo $0 already stopped

    Output 1

    FI

    echo - n $"Stoping oracle database."

    known - $ORACLE_USER - c "judgment of $ORACLE_HOME/bin/lsnrctl.

    Su - $ORACLE_USER-c "$ORACLE_HOME/bin/dbshut $ORACLE_HOME.

    known - $ORACLE_USER - c "$ORACLE_HOME/bin/emctl stop dbconsole.

    RETVAL = $?

    ECHO

    [$RETVAL - eq 0] & & rm-f $LOCKFILE

    return $RETVAL

    }

    case '$1' in

    'Start')

    beginning

    ;;

    'stop')

    stop

    ;;

    "restart")

    stop

    beginning

    ;;

    'status')

    If [f $LOCKFILE]; then

    echo $0 began.

    on the other

    echo $0 stopped.

    FI

    ;;

    *)

    echo "use: $0 [start |]» stop | status].

    Output 1

    ESAC

    Exit 0

    I did like this: -.

    # cp /etc/rc.d/init.d/oracledb oracledb

    # chkconfig - add oracledb

    # chkconfig oracledb on

    everything is ok except

    After restarting pc

    https://localhost:1158 / em

    404 not found

    to do this: -.

    $sqlplus / as sysdba

    SQL > startup;

    then

    " https://localhost:1158 / em "works very well "

    question of making the autostart oracle database and I wouldn't need to explicitly

    start as sysdba

    ------------------------

    If I manually give the orders

    $lsnrctl start

    successful

    $dbstart $ORACLE_HOME

    and

    $dbshut $ORACLE_HOME

    immediately after the gift of command, it shows no output. How will I know whether it is successful or not.

    and finally

    $emctl start dbconsole

    works very well (no error)

    what I would do.

    Thanks in advance.

    A manual start with dbstart work? Have you checked your file/etc/oratab to see if entries for ORACLE_SID: ORACLE_HOME: Y?

    If you do not have oratab, just run root.sh as user root

    replace chkconfig with---> chkconfig: 35 99 10

    chmod 755 /etc/init.d/dbora

    Register the Service with

    / sbin/chkconfig--add released

    Kind regards

    Suntrupth

  • How to automatically start apps in order under Windows?

    I am writing from an XP laptop (have not found a suitable replacement yet) but it would be good to know how to do this on any version of Windows, but I would like to know how to start automatic apps on connect to open a folder, my Live Mail app opens upwards (preferably only after WiFi is connected) , then Chrome and preferably so that they see in the right order in the taskbar.

    In addition, if there are a few settings for Live Mail Sync only after the WiFi connection, it would be good to know.

    Anything you can give me I'll take!

    Friday, June 13, 2014 17:12:20 + 0000, dhinged wrote:

    I am writing from an XP laptop (have not found a suitable replacement yet) but it would be good to know how to do this on any version of Windows, but I would like to know how to start automatic apps on connect to open a folder, my Live Mail app opens upwards (preferably only after WiFi is connected) , then Chrome and preferably so that they see in the right order in the taskbar.

    Start them from a file batch with them listed in the order you want.
    If necessary, add instructions in the waiting orders file specified
    amount of time. See
    http://social.technet.Microsoft.com/forums/SystemCenter/en-us/e7c9c73d-c6c6-44BF-9874-6044fcb8b322/how-to-pause-a-batch-file-for-30-seconds

  • Have Windows XP, 3 on Dell Vostro 1320. How to automatically start in the morning? K Kinnett

    I just want my phone to turn the morning. Vostroo my wife 1500 turns on automatically, but I can't remember how it has been implemented. Thank you, Ken

    [Moved from comments]

    It is in the BIOS.
    http://www.JustAnswer.com/computer/3ti9h-Vostro-230-turn-automatically.html

  • How to automate startup EBS on Linux

    Hi hussein/helios,

    How to automate startup on EBS on Linux please.
    The customer asked that when they start/stop Linux servers (for example during maintenance or holidays)
    There are no need to stop or start the EBS.

    Can you give me links note metalink on how to do this?


    Thank you very much

    MsK

    Hello

    See the following threads.

    Autostart of Services
    Re: Autostart of Services

    Auto startup of the Oracle Services did not
    Re: Auto startup of the Oracle Services did not work

    Kind regards
    Hussein

  • How to start Oracle HTTP server automatically during the startup of the server?

    I installed the software of Oracle 11 g (fusion).

    I use only the Oracle HTTP component in any merger software for my Apex 4.0 to work.

    Now to start the Oracle HTTP server is a command:

    opmnctl startall


    (1) I wanted my Oracle HTTP server starts automatically each time my server reboots (Windows 2008 R2).

    How do I do that? Is there a place in Windows (autoexec) or somewhere I can copy the above command
    If the operating system runs this command every time when the server is restarted, instead of me manually
    execution of the command.



    Thanks in advance.

    I have a Linux script that does this. Maybe you can convert:

    #! / bin/bash

    ###############################################################################
    # Description: Script starting and stopping iAS and reboot after shutdown #.
    # File: iasora #.
    ###############################################################################

    # Global Variables - change as needed.
    #
    #
    IAS_FILE = "/ u01/app/oracle/product/midtier/bin/emctl." PID.
    RETRIES = 3

    # Set the script excution environment

    . / Home/Oracle/ias10g_midtier. Profile

    # Determine and perform actions based on the command line parameter

    case '$1' in

    implementation)

    LOOP_COUNTER = 1
    up to [f $IAS_FILE]
    do
    echo 'date '.
    "ECHO"
    echo "Starting Oracle iAS components."

    sleep 2

    Su - oracle-c ' $ORACLE_HOME/opmn/bin/opmnctl startall verbose; output.

    echo "Starting Oracle iAS Server Control Application"

    sleep 2

    Su - oracle - c "$ORACLE_HOME/bin/emctl start iasconsole '.

    If [! f $IAS_FILE]
    then
    If ['$LOOP_COUNTER"- eq"$RETRIES"]
    then
    echo "I give up. The file does not exist on the server.
    Echo "or something else failed."
    ECHO «»
    # At this point we could not download the file, send an alert...
    mailx-s 'cannot restart iAS' [email protected]<>

    on the other
    echo "the next restart attempt will be in 15 seconds... Please wait. »
    LOOP_COUNTER = ' expr $LOOP_COUNTER + 1' # increment the counter.
    sleep 15

    FI
    FI

    fact

    touch/var/lock/subsys/iasora

    sleep 30
    ECHO «»
    ECHO «»

    ;;

    *)

  • How to start Oracle service automatically?

    Hello

    I use Linux server with Oracle10g. Often my server is restarted, in this scenario, I want to restart all the databases andllistener. Please inform me how automatically start Services/instances Oracle while rebooting the server?


    Thank you
    Goussard

    You must create the new service which will start and stop databases and listeners when the server is restarted.
    Linux new services are created under /etc/init.d - and then it should start/stop script for oracle having created new service must be added and run levels are configured.

    You can start by reading this link:
    http://www.Linux.com/articles/46892

    In order to understand the overall process.

  • Oracle instance startup when starting (Oracle 10 g on Suse Linux 10.2)

    Dear Oracle expoerts,

    I have a problem with a server, Oracle 10g R2 to start on Suse Linux 10.2 at boot time.

    I created a startup script (see below) and this startup script works perfectly if I call it with
    /etc/init.d/Oracle start as user root.

    But during system startup it doen't work.

    I've placed links to
    /etc/rc3.d/S99oracle
    and
    /etc/rc3.d/K01oracle

    As you can see in my script I also wrote that all calls to my boot option to be independent of
    Variable environment since during my desperate attempts to start the database, I thought that I had a problem with my
    environment variables.

    Now I can not find any reason why the belkow script should not working at boot time.

    I'm happy for any help.

    Best regards

    Daniel


    #! / bin/sh - x
    #
    # Change the value of ORACLE_HOME to specify the right Oracle home
    # To your installation directory.
    ORACLE_HOME=/home/Oracle/Oracle/product/10.2.0/Db_1
    ORACLE = oracle # user der Oracle data base browser
    PATH = ${PATH}: $ORACLE_HOME/bin
    HOST = "hostname".
    Platform = 'uname '.
    export ORACLE_HOME PATH


    case '$1' in
    implementation)
    /Home/Oracle/Oracle/product/10.2.0/Db_1/bin/lsnrctl start
    echo "Listener started.
    Su oracle - c /home/oracle/oracle/product/10.2.0/db_1/bin/emctl start dbconsole
    echo 'EM started... ". »
    /Home/Oracle/Oracle/product/10.2.0/Db_1/bin/DBSTART $ORACLE_HOME
    echo "dbstart called...". »
    Su-oracle - c ' /home/oracle/oracle/product/10.2.0/db_1/bin/sqlplus s / as SYSDBA @/ home/oracle/Systemskripte/startupDB.sql ' &
    ;;
    stop)
    judgment of su oracle - c $ORACLE_HOME/bin/lsnrctl &
    Oracle - c $ORACLE_HOME/bin/emctl known stop dbconsole &
    Oracle to su - c $ORACLE_HOME/bin/dbshut $ORACLE_HOME &
    ;;
    *)
    echo "use: $0 {start |}". stop}.
    output
    ;;
    ESAC
    #
    output

    Hello

    I don't know if its standard location, but I have on SLES script /etc/profile.d/oracle.sh
    Please modify this script and db should start automatically.

    Kind regards
    Tom
    http://OracleDBA.cz

  • How to start Oracle Linux Builder

    Hi all

    Can someone please by telling how to start Oracle Linux Builder?

    Thanks and best regards to all

    Hello

    There should be a rwbuilder.sh script
    in ORACLE_HOME/bin for 10.1.2.
    in ORACLE_INSTANCE/config/reports/bin for 11g

    Of course, you must have a "X display server" facing up and running and the DISPLAY variable must be on this 'X display server.

    Example:

    Export DISPLAY = 123.456.789.12:0
    $ORACLE_HOME/bin/rwbuilder.sh

    Concerning

  • R12 Quick Installation on Suse Linux or Oracle Linux fails

    Hello

    I tried several combinations of operating systems to try and install correctly using the Oracle R12 / quick installation but I could not. My last attempt was on Suse Linux 10. When the installation wizard is complete, database checks are successful but HTTP server is unresponsive and all subsequent checks fail.

    The reading of google and the various threads on this forum, I found that for Oracle Linux, we must apply the patch that contains libdb.so.2. Since then, I do not have an account to support oracle, I cannot get this fix and based on rules, no body can send it in an email, which means that we can not install this distribution on Oracle Linux without having to pay for the supported. Since then, it is a learning exercise without the use of serious production of R12 apps, we do not have any arrangement with Oracle support.

    For Suse, I also have the same problem, but when I try to start the opmn manually using opmnctl beginning, she responds with message, began. But when I use opmn stopall, the computer stops responding. Now, I don't know yet how to start debugging this problem.

    I would give just to try to install it or there at - it a hope?

    Thank you.

    Hello

    I finally managed to install R12 on Suse Linux Enterprise 10 SP3. I decided to start again after a repair for the past two days. Here's the process:

    a. install Suse Enterprise 10 SP3 with office and all development packages offered in the facility.

    b. click the computer--> install the software--> search for the 'db1 '. It will give you two or more packages. Install db1_185xx (from Berkley). This provides a required libdb.so.2.

    c. then go through the installation as outlined in the instructions using rapidwiz.

    It fills correctly and I can see the login screen now.

    Now, I need to know how to put in place to automatically start all services after startup.

    Thank you for your help.

    Kind regards

    Sohail naima.

  • Problem to start Oracle 10 G Enterprise Linux

    Hi guys! Please I need help.
    Recentlly I installed Oracle 10 g on Linux Enterprise 5.4, the finished good, instalation I loged in isqlplusselect a few example of table, but then when I reboot to start computer oracle can't, I changed/var/opt/oracle/oratab the opsion 'Y' in oracle sid: oracle home.
    When I manually start isqlplus and try to connect, I get this error "ERROR ORA 12541: TNS: no listner, I tried to start id form/oracle/bin, but I gess, it's not working."
    Can someone help me with this, I mean how can I start to oracle, and what I need to chang for automatic start
    Thank you

    OK, here's what you need to do to 10.2.0.1 (I guess that's what you mean by 10 gr 2):

    1. open the dbstart script located in /home/oracle/product/10.2.0/db_1/bin

    2. search for all occurrences of the string "/ ade/vikrkuma_new/oracle" and replace it with "$ORACLE_HOME". This is a known bug fix.

    3. edit/etc/oratab and set option to Y for the database that you want to start automatically.

    4. create a file /etc/init.d/dbora as root with the following content (defining the correct values for ORA_HOME and ORA_OWNER):

    #!/bin/sh
    # chkconfig: 345 99 10
    # description: Oracle auto start-stop script.
    #
    # 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=+path_to_your_oracle_installation+
    ORA_OWNER=+your_database_sid+
    
    if [ ! -f $ORA_HOME/bin/dbstart ]
    then
    echo "Oracle startup: cannot start"
    exit
    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
    

    5 set permissions for the new file (replace "dba" with defined during the installation of Oracle dba OS group):

    # chgrp s/n /etc/init.d/dbora
    # chmod 750 /etc/init.d/dbora

    6. run:

    # chkconfig--level 345 released on

    Restart and test if the DB starts correctly.

    I hope this helps.

    And by the way, I'm not Russian, Bulgarian. But you were close enough ;)

  • [LINUX] Start Oracle DB

    I installed DB Oracle 11g on Linux.
    When the installation is complete, I could create a new DB (using DBCA) and connect from a client (Navicat).

    I have however to restart my system, and now, as nothing is begun, I can't understand how to start it.
    The dbstart tool runs for 1 second (I gave my ORACLE_BASE), starting a process that is listening on port 1521, that's all.

    Before restarting, 1 GB of RAM was used for the Oracle DB, now 5 MB just for the tnslsnr.

    My client tells me that the listener does not know my SID. The DBCA tool also won't start.

    -What did I do wrong? Thank you for helping us to be a starter.

    (DESCRIPTION = (ADDRESS = (PROTOCOL = tcp)(HOST=127.0.0.1) (PORT = 1521)))

    This listener can only respond to clients that exists / has its source on the DB Server System.
    Customer remote can NOT Exchange package with this listener.

    A possible solution is the following

    lsnrctl stop
    MV listener.ora listener.ora.sav
    lsnrctl start

    Wait 1 + minutes then after rsults from the bottom

    lsnrctl status
    lsnrctl service

  • schedule the automatic start of oracle 10g R2 on RHEL5

    Hi master,

    I use oracle 10g R2 on RHEL 5. I want to program the automatic start of the oracle on linux start database.

    for that I have referefed the docs and plan its in the file/etc/rc3.d. but it does not work.

    It is written in the docs that this charger friub fron of process this file and start their beds according to their number.

    the file is as follows...

    #! / bin/sh
    #chkconfig: 346 99 10
    Description #: Oracle automatic start-stop script.
    #
    # Change the value of ORACLE_HOME to specify the right Oracle home
    # To your installation directory.

    ORACLE_HOME=/U01/app/Oracle/product/10.2.0/Db_1
    #
    # Change the value of the ORACLE of the connection of the
    owner of oracle # on your site.
    #
    ORACLE = oracle

    PATH = ${PATH}: $ORACLE_HOME/bin
    HOST = "hostname".
    Platform = 'uname '.
    export ORACLE_HOME PATH
    #
    If [!] "$2" = "ORA_DB"]; then
    If ['$PLATFORM' = "HP - UX"]; then
    Remsh $HOST-l $ORACLE n ' $0 $ 1 ORA_DB.
    output
    on the other
    rsh $HOST-l $ORACLE $0 $ 1 ORA_DB
    output
    FI
    FI
    #
    case $1 in
    'Start')
    $ORACLE_HOME/bin/dbstart $ORACLE_HOME
    ;;
    'stop')
    $ORACLE_HOME/bin/dbshut $ORACLE_HOME
    ;;
    *)
    echo "use: $0 {start |}". stop}.
    output
    ;;
    ESAC
    #
    output

    What should I look for?

    my listening service is also not automatically get started. I have to manually...

    any suggestion?

    Thanks and greetings
    VD

    Published by: vikrant dixit on December 23, 2008 21:58

    VD,
    This link willl helpp
    http://www.Oracle-base.com/articles/Linux/AutomatingDatabaseStartupAndShutdownOnLinux.php
    HTH
    Aman...

  • How can I prevent all automatic starts iTunes?

    Hello

    Is someone can you PLEASE advise me how I can prevent ITunes turning prematurely gray?  It starts with persistence without asking for confirmation.  I want to be able to achieve is to prevent ITunes automatically start under ANY circumstances.

    I have already completed THE steps to ignore my IPhone and IPad and Itunes isn't in any login script (as far as I can see).   Something is always load up and leads me into the wall

    What seems to be incited ITunes at startup was a message saying that my Session of Apple (or something like that) had expired and I had to reconnect again...

    I found a solution a little backward... but I wonder if an Itunes update has restored this infuriating behavior and to make it worse, I remember not where I found the solution.

    Guidance would be MUCH appreciated.

    Steve

    Hacks to stop Bluetooth speaker to start iTunes-

    http://forums.MacRumors.com/ShowPost.php?p=19045335 & postcount = 4

    LincDavis August 2015 post - https://discussions.apple.com/message/28821151#28821151

  • iBooks automatically starts an audio book... How to stop? Help please - thx!

    ... When I plug Apple EarPods, helmet or an audio jack in my car, iBooks automatically starts an audiobook... it happens all the time when I want to just listen to a song or answer the phone! How to stop?

    Help please - thx!

    I have this problem as well on an iPhone 6. I went to Audible for listening to audio books, but iBooks keeps opening and automatic reading a book that I wasn't even listening when I plug in my headphones. Sometimes there is a delay, then I will listen to something on Audible for a few seconds, and then it stops and be interrupted by iBooks from. It is really unpleasant.

    I really don't want anything to play automatically when I plug my headphones.

Maybe you are looking for

  • Can not download mail after upgrade to 31.3.0

    Having recently updated for Thunderbird 31.3.0, I can no longer get my office email (Gmail-hosted). I press SHIFT - F5 and get the error "unable to connect to your IMAP server. It may have exceeded the maximum number of connections to this server. If

  • ProBook 6465b: disabling secure boot

    Hello I can't disable Secure Boot on my ProBook 6465 b. I can't find a menu item in the configuration of the BIOS. firmware version: 68LTU worm. F.61

  • Cannot send my videos at home.

    Whenever I try to send a video at home, I took, it asks if I want to send with the mailbox or just send it. Neither work. These videos are from 20 to 30 seconds! It is said many times there is an error or the file is too large for the server. As iOS

  • HP printers will print not with reloaded cartridges?

    Maybe it's a bit long but I want to do it is as understandable as possible and get some HONEST response (s) from all the staff at HP. I was having some printing problems with my printer of 2410XI Photosmart and posted my Questions a few days ago. I g

  • Problem starting OptiPlex 9020

    I have an optiplex 9020 having a blinking cursor for about 10 to 15 seconds before the screen startup Dell and after the Dell splash screen. I have the latest version of the BIOS and use an SSD as boot drive and SATA drive as a secondary drive, the b