Here's a solution to Oracle Startup / Shutdown on RH6

I had a hard time getting Red Hat 6.0 to startup and shutdown
Oracle properly. Red Hat's slick rc scripts look cool, but hide
the problem unless you do some serious reading.
This script still isn't perfect, mainly because it can't
shutdown if oracle users are still logged in. This is a problem
with the dbshut scripts. I try to avoid hacking Oracle's bin
directory, but if you really want to go down, change the
shutdown lines to shutdown immediate. Oracle, please provide an
option to dbshut to fix this! :-)
My changes to the book version fix the following:
1. It creates a file /var/log/dbora to log the startup output to
give you some visibility after the fact.
2. Creating the /var/lock/subsys/dbora file after startup makes
the shutdown work. Otherwise rc won't even try. Deleting it
makes changes between run levels work right.
3. The startup is NOT backgrounded so that if you are watching
it boot you can at least gauge the time it takes before the
startup.
4. It starts the listener too.
5. It checks the log file for startup errors and makes the
screen say FAILED in red if it sees any errors.
5. It allows dbshut some time to finish before unmounting. My
dual xenon machine goes down do fast dbshut wouldn't finish
downing both of my sids.
# dbora -start/stop Oracle
#action
ORA_HOME=/home/oracle;export ORA_HOME
ORA_OWNER=oracle;export ORA_OWNER
if [ ! -f $ORA_HOME/bin/dbstart -o ! -d $ORA_HOME ]
then
echo "Oracle startup: cannot start"
exit
fi
case "$1" in
'start')
su - $ORA_OWNER -c "$ORA_HOME/bin/dbstart" >
/var/log/dbora.log
su - $ORA_OWNER -c "$ORA_HOME/bin/lsnrctl start" >>
/var/log/dbora.log
touch /var/lock/subsys/dbora
'stop')
su - $ORA_OWNER -c $ORA_HOME/bin/dbshut &
sleep 15
rm -f /var/lock/subsys/dbora
esac
if egrep -q "ORA-" /var/log/dbora.log; then
exit -1
else
exit 0
fi
Note that the links prescribed by the book are also incorrect.
Linux's rc levels do NOT run sequentially. Therefore, you need a
start and stop on the same level. If you want to save some RAM
on the serve by not running X, you'll want level 4 scripts and
level 5 scripts. So, Create all these links (as ROOT).
ln -s /etc/rc.d/init.d/dbora /etc/rc.d/rc4.d/K10dbora
ln -s /etc/rc.d/init.d/dbora /etc/rc.d/rc4.d/S99dbora
ln -s /etc/rc.d/init.d/dbora /etc/rc.d/rc5.d/K10dbora
ln -s /etc/rc.d/init.d/dbora /etc/rc.d/rc5.d/S99dbora
To be really safe also create these links. This way there is no
escaping a proper oracle shutdown.
ln -s /etc/rc.d/init.d/dbora /etc/rc.d/rc0.d/K10dbora
ln -s /etc/rc.d/init.d/dbora /etc/rc.d/rc1.d/K10dbora
ln -s /etc/rc.d/init.d/dbora /etc/rc.d/rc2.d/K10dbora
ln -s /etc/rc.d/init.d/dbora /etc/rc.d/rc3.d/K10dbora
ln -s /etc/rc.d/init.d/dbora /etc/rc.d/rc6.d/K10dbora
Have fun!
null

It isn't necessary to create the symlinks for the rc scripts
manually--that's what the "chkconfig" command is for.
Mike Mitchell (guest) wrote:
: I had a hard time getting Red Hat 6.0 to startup and shutdown
: Oracle properly. Red Hat's slick rc scripts look cool, but hide
: the problem unless you do some serious reading.
: This script still isn't perfect, mainly because it can't
: shutdown if oracle users are still logged in. This is a problem
: with the dbshut scripts. I try to avoid hacking Oracle's bin
: directory, but if you really want to go down, change the
: shutdown lines to shutdown immediate. Oracle, please provide
an
: option to dbshut to fix this! :-)
: My changes to the book version fix the following:
: 1. It creates a file /var/log/dbora to log the startup output
to
: give you some visibility after the fact.
: 2. Creating the /var/lock/subsys/dbora file after startup makes
: the shutdown work. Otherwise rc won't even try. Deleting it
: makes changes between run levels work right.
: 3. The startup is NOT backgrounded so that if you are watching
: it boot you can at least gauge the time it takes before the
: startup.
: 4. It starts the listener too.
: 5. It checks the log file for startup errors and makes the
: screen say FAILED in red if it sees any errors.
: 5. It allows dbshut some time to finish before unmounting. My
: dual xenon machine goes down do fast dbshut wouldn't finish
: downing both of my sids.
: # dbora -start/stop Oracle
: #action
: ORA_HOME=/home/oracle;export ORA_HOME
: ORA_OWNER=oracle;export ORA_OWNER
: if [ ! -f $ORA_HOME/bin/dbstart -o ! -d $ORA_HOME ]
: then
: echo "Oracle startup: cannot start"
: exit
: fi
: case "$1" in
: 'start')
: su - $ORA_OWNER -c "$ORA_HOME/bin/dbstart" >
: /var/log/dbora.log
: su - $ORA_OWNER -c "$ORA_HOME/bin/lsnrctl start" >>
: /var/log/dbora.log
: touch /var/lock/subsys/dbora
: 'stop')
: su - $ORA_OWNER -c $ORA_HOME/bin/dbshut &
: sleep 15
: rm -f /var/lock/subsys/dbora
: esac
: if egrep -q "ORA-" /var/log/dbora.log; then
: exit -1
: else
: exit 0
: fi
: Note that the links prescribed by the book are also incorrect.
: Linux's rc levels do NOT run sequentially. Therefore, you need
a
: start and stop on the same level. If you want to save some RAM
: on the serve by not running X, you'll want level 4 scripts and
: level 5 scripts. So, Create all these links (as ROOT).
: ln -s /etc/rc.d/init.d/dbora /etc/rc.d/rc4.d/K10dbora
: ln -s /etc/rc.d/init.d/dbora /etc/rc.d/rc4.d/S99dbora
: ln -s /etc/rc.d/init.d/dbora /etc/rc.d/rc5.d/K10dbora
: ln -s /etc/rc.d/init.d/dbora /etc/rc.d/rc5.d/S99dbora
: To be really safe also create these links. This way there is no
: escaping a proper oracle shutdown.
: ln -s /etc/rc.d/init.d/dbora /etc/rc.d/rc0.d/K10dbora
: ln -s /etc/rc.d/init.d/dbora /etc/rc.d/rc1.d/K10dbora
: ln -s /etc/rc.d/init.d/dbora /etc/rc.d/rc2.d/K10dbora
: ln -s /etc/rc.d/init.d/dbora /etc/rc.d/rc3.d/K10dbora
: ln -s /etc/rc.d/init.d/dbora /etc/rc.d/rc6.d/K10dbora
: Have fun!
null

Similar Messages

  • Oracle Startup/Shutdown

    Having trouble with EM in a windows server environment running 10G
    When i startup/shutdown my server do i need to stop the listener, dbconsole and agent?
    Everytime i reboot my TEST server EM stops working. I have checked the windows services start ok - all do with no errors. but i get the listeneer starting sometimes and sometime not. The agent and DB instance connection instances show failed on the http://myserver:1158/em page.
    I have checked tnsnames and listener.ora.
    Is there a process of things to start/stop when rebooting my server?
    Also whe i try to start them manually a page is displayed saying enter logon credential but the credentials i enter .e.g. sys-password123 are not accepted. Does anyone have any idea what the credential i should be inputting here is it oracle-oralce or something?
    Please note i have done loads of reading but can't find a solution to my problem thanks to all who take time to read/reply to what may seem a very basic question

    By default the Oracle services are set to automatically start. When you reboot your server the services start and you should be able to connect. However if you try to connect right after the reboot, most probably this error will show up since the Enterprise Manager requires the database to be already registered against the listener, which may take a while (not more than 60 sec),
    Verify this checklist:
    1. The listener is up and running. LSNRCTL STATUS
    2. The database is registered against the listener. You may issue the command LSNRCTL SERVICES.
    3. You may force the database to be registered against the listener by issuing the ALTER SYSTEM REGISTER; command from a sqlplus prompt.
    One more things you should take care of is the IP assignment method, if you have a dynamic IP address assignment you should configure a loopback adapter and and have the Loopback Adapter's IP address registered at the hosts file along with the hostname. If you fail to do so you may find EM will be requesting you for the logon credentials when you attempt to access the Performance tab or any other administrative task.
    You may read this reference for further Enterprise Manager troubleshooting --> Enterprise Manager DB Control Console.
    ~ Madrid

  • Automated Oracle Startup & Shutdown

    I am trying to get make my Oracle database shutdown and startup
    automatically at boot, but am having a hard time getting this to
    work properly. I have created a file in /etc/rc.d/init.d called
    dbora:
    case "$1" in
    'start')
    su - oracle -c $ORACLE_BASE/admin/bin/dbstart.sh &
    'stop')
    su - oracle -c $ORACLE_BASE/admin/bin/dbshut.sh &
    esac
    I also created the following links in EVERY (out of frustration)
    /etc/rc.d/rc#.d directory:
    lrwxrwxrwx 1 root root 22 Jul 1 10:12 S99dbora -
    /etc/rc.d/init.d/dboralrwxrwxrwx 1 root root 22 Jul 1 10:12 K30dbora -
    /etc/rc.d/init.d/dboraThe problem does not really appear to be linked to the actual
    database shutdown or startup, but rather with LINUX. I have
    replaced the contents of dbstart.sh & dbshut.sh with a simple
    echo redirect to file to prove this out. Specifically, here is
    what is happening:
    * Running "dbora start" or "dbora stop" manually always works.
    * Neither "dbora start" or "dbora stop" work when booting or
    switching runlevels, although the message STARTING DBORA does
    scroll past the console.
    I have several people look at this here and no one can figure
    out why this isn't working. Can you assist?
    null

    Peter,
    Normally the problem here is that the environment is not set, or
    is not being set correctly OR that things that Oracle needs to be
    available have already been killed (lower run level) or have not
    been started (higher run level).
    Check that the environment is OK when the dbora script is run and
    check that your scripts are called in the right order of things
    when moving between run levels.
    Regards,
    Mark
    Pete Petersen (guest) wrote:
    : I am trying to get make my Oracle database shutdown and startup
    : automatically at boot, but am having a hard time getting this
    to
    : work properly. I have created a file in /etc/rc.d/init.d called
    : dbora:
    : case "$1" in
    : 'start')
    : su - oracle -c $ORACLE_BASE/admin/bin/dbstart.sh &
    : 'stop')
    : su - oracle -c $ORACLE_BASE/admin/bin/dbshut.sh &
    : esac
    : I also created the following links in EVERY (out of
    frustration)
    : /etc/rc.d/rc#.d directory:
    : lrwxrwxrwx 1 root root 22 Jul 1 10:12 S99dbora
    : > /etc/rc.d/init.d/dbora
    : lrwxrwxrwx 1 root root 22 Jul 1 10:12 K30dbora
    : > /etc/rc.d/init.d/dbora
    : The problem does not really appear to be linked to the actual
    : database shutdown or startup, but rather with LINUX. I have
    : replaced the contents of dbstart.sh & dbshut.sh with a simple
    : echo redirect to file to prove this out. Specifically, here is
    : what is happening:
    : * Running "dbora start" or "dbora stop" manually always works.
    : * Neither "dbora start" or "dbora stop" work when booting or
    : switching runlevels, although the message STARTING DBORA does
    : scroll past the console.
    : I have several people look at this here and no one can figure
    : out why this isn't working. Can you assist?
    null

  • HA Oracle startup/shutdown question

    Environment:
    2 Sunfire V890's running solaris 2.9 and SC3.1U4
    Hello All,
    I am having a problem with oracle startup and shutdown in my cluster. In order to get oracle to startup after a failover, shutdown what have you, I need to implement the following procedure as a pre/post oracle startup operation/script. Can anyone tell me if there is a place or hook in the HAOracle agent where I can add my own operation? I would rather avoid having to write a GDS agent in order to do this, if it is at all possilble.
    Thanks,
    George Cebulka
    PS
    Please Note: (This is a DBA thing, not mine!)
    ************** Begin *********************
    After a failover or startup we need following to avoid the �authentication error�
    1. remove the sqlnet.ora soft link from $ORACLE_HOME/network/admin
    1. rm /global/oracle/oracledb/oraclev10201/network/admin/sqlnet.ora
    2. Create a new soft link to sqlnet.ora in $ORACLE_HOME/network/admin as following
    1. ln �s /global/pitt/dba/network/net8/sqlnet.ora /global/oracle/oracledb/oraclev10201/network/admin/sqlnet.ora
    3. startup the database and listeners (using cluster database).
    4. Now database is up and running and we need to turn on radius authentication for which we need this post stuff
    5. Remove the sqlnet.ora link
    1. rm /global/oracle/oracledb/oraclev10201/network/admin/sqlnet.ora
    6. Create a new soft link to replace sqlnet.ora with radius sqlnet.ora
    1. ln �s /global/pitt/dba/network/net8/sqlnet.ora.radius /global/oracle/oracledb/oraclev10201/network/admin/sqlnet.ora
    *************** End ******************

    You could also try the following:
    Create two GDS agents, where you need to include the steps to disable the pmf action script, which I describe in a blog at
    http://blogs.sun.com/TF/entry/disabling_pmf_action_script_with .
    This is needed since your scripts will not leave a process running for PMF.
    1. GDS resource (for this example I call it ora-prestart-rs):
    Start_command: It will do the steps to implement the original sqlnet.ora file + the steps from the blog
    Probe_command: /bin/true
    Stop_command: not needed
    2. GDS resource (for this example I call it ora-poststart-rs):
    Start_command: It will do the steps to setup the link for the radius sqlnet.ora file + the steps from the blog
    Probe_command: /bin/true
    Stop_command: It will do the steps to re-implement the original sqlnet.ora file
    Then you create the following resource dependencies (here I assume the name for the SUNW.oracle_server resource is ora-rs):
    scrgadm -c -j ora-rs -y Resource_dependencies=ora-prestart-rs
    scrgadm -c -j ora-poststart-rs -y Resource_dependencies=server-dwdd-rs
    Maybe you need to setup the same dependencies to include the SUNW.oracle_listerner resource. You did not mention which of those is facing problems.
    Of course, I never tried this. But this would enable you to use the HA Oracle agent unchanged.
    Greets
    Thorsten
    PS: I forgot to also mention that you need to set the Restart_type extension property for the SUNW.oracle_server resource to RESOURCE_GROUP_RESTART:
    scrgadm -c -j ora-rs -y Restart_type=RESOURCE_GROUP_RESTART
    That way a triggered restart by ora-rs will allways force the RG to go through stop/start - and only then the link will get set back to the sqlnet.ora the SUNW.oracle_server needs to work correctly.
    Note again - this is theory and needs proper testing.
    Message was edited by:
    Thorsten.Frueauf

  • Oracle Startup/Shutdown with SQLPLUS and ORADIM in Windows...

    I am a newbie to the Windows platform. SQLPLUS will not allow me to issue a STARTUP command. This is what I get when I attempt to SHUTDOWN IMMEDIATE and subsequently issue a STARTUP MOUNT/NOMOUNT or any STARTUP command for that matter. The SHUTDOWN command works successfully but the subsequent startup fails with an ORA-12514: TNS:listener does not currently know of service requested in connect descriptor message.
    D:\>set ORACLE_SID=NMPC00
    D:\>set ORACLE_HOSTNAME=TAX-DEV-ORA-01
    D:\>set ORACLE_HOME=D:\app\oracle\product\11.2.0\dbhome_1
    D:\>sqlplus sys@NMPC00 as sysdba
    SQL*Plus: Release 11.2.0.1.0 Production on Sat Oct 23 11:41:56 2010
    Copyright (c) 1982, 2010, Oracle. All rights reserved.
    Enter password:
    Connected to:
    Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    SQL> shutdown immediate
    Database closed.
    Database dismounted.
    ORACLE instance shut down.
    SQL> startup mount
    ORA-12514: TNS:listener does not currently know of service requested in connect descriptor
    SQL>
    When I look at the Windows service, it still reports 'Started' despite the fact that I shutdown the instance. What is the proper protocol for shutting down and starting up an Oracle instance in Windows. Do I have to coordinate these activities with the ORADIM -STARTUP / -SHUTDOWN commands?

    I am also newbie to oracle and running into the similar problem when trying to start oracle database using windows command prompt and getting the below error:
    Command prompt is being run as administrator on windows7 O/S
    C:\ORACLE\product\11.2.0\dbhome_1\BIN>oradim -SHUTDOWN -SID O22BVGI -SHUTTYPE srvc,inst -SHUTMODE nornal
    ORA-01031: insufficient privileges
    The reason behind this to do it is , I need a batch script for stopping and restarting the oracle database instance using a Pfile which will contain the initialization parameters.
    Please can someone help!
    sqlnet.ora is:
    SQLNET.AUTHENTICATION_SERVICES= (NTS)
    NAMES.DIRECTORY_PATH= (TNSNAMES, ONAMES, HOSTNAME)
    Kind Regards
    Sam
    Edited by: 808116 on Nov 7, 2010 4:21 PM

  • Oracle startup/shutdown triggers

    Hi,
    I have a scenerion appreciated the inputs/suggestions.
    We have 750 db's from oracle 8i to 11g .
    i will take one db as test db and i will create a table in this db and from all db's a trigger has to fire whenever database is down or up and update this test table in test db.
    may be test table structure contains hostname, db name , db status(1 for down, 0 for up), timestamp
    Thanks in advance .
    Prakash

    Hi thanks for all the inputs.
    We use OEM grid still we want this project to execute.
    The steps we need to do is .
    1.     Determine how/if we can create a system-level trigger on all of our Oracle databases (we currently have versions as low as 8.1.7 and up to 11.2).
    2.     The trigger will update a remote table before a shutdown or after a startup.
    3.     The remote database (which we will use for testing) is test.
    4.     The table to be updated is test.DB_STATUS
    SQL> desc p201710.db_status
    Name Null? Type
    SERVER_NAME VARCHAR2(50)
    DB_NAME VARCHAR2(50)
    DB_STATUS CHAR(1)  '1' = down, '0' = up
    STATUS_TS DATE
    5.     Create a dynamic link at the time the trigger fires to connect to this database. Do not use a TNS alias in the connector.
    6.     Query the table first to see if a record already exists with that servername+dbname combination.
    7.     If not, add a record and record the status and the sysdate. If so, just update that record. (We do not want more than 1 record for each database.)
    8.     Determine risks involved with this activity and devise a strategy to mitigate them.
    apprecited the inputs.
    Thanks
    Prakash
    Edited by: user9356823 on Jun 17, 2010 3:07 AM

  • Oracle Startup/Shutdown Procedure

    Hi All,
    We have Oracle 10G R2 on AIX 5 with ASM managed storage.
    My question is what are the steps to shutdown oracle database. I mean should we stop the ASM instance first or simple shutdown database command will do all work. Similarly what are the steps to start the database. How ASM instance will be started and how listner will be up?
    Thanks

    Hi,
    Below link may help you
    http://www.dba-oracle.com/art_dbazine_ault_start_stop_db.htm
    Thanks,

  • Automating Oracle Startup/Shutdown

    I have been unable to start up Oracle automatically after
    rebooting the system. I am able to start it as the root user and
    executing /etc/init.d/oracle8i script but for some reason it
    won't do it automatically. I have done the ln -
    s /etc/init.d/oracle8i /etc/rc3.d/S99oracle8i and thought it
    would work but it hasn't. Any ideas?

    Try to use /etc/oratab file

  • STARTUP/SHUTDOWN의 PROCEDURE와 종류

    제품 : ORACLE SERVER
    작성날짜 : 2002-04-12
    STARTUP/SHUTDOWN의 PROCEDURE와 종류
    ===================================
    Purpose
    가장 기본적인 Oracle의 startup/shutdown 각 mode와 그 특징에 대해 알아보자.
    Explanation
    ORACLE을 사용하려면 먼저 데이타베이스를 기동하여야 한다.
    ORACLE의 기동은 startup, 기동 중인 ORACLE을 사용하지 못하도록
    운영을 중지하도록 하는 것은 shutdown command를 이용해 이루어진다.
    여기에서는 startup, shutdown 시의 procedure와 startup, shutdown의
    종류에 대해 설명한다.
    1. STARTUP PROCEDURE
    stratup은 3단계의 procedure로 구성된다.
    1) 인스턴스 start
    ORACLE을 운영하기 위한 background process(dbwr, lgwr, smon, pmon 등)를
    생성하며 또한 init<SID>.ora의 parameter 값들을 읽어 SGA도 allocate한다.
    startup 시 이 procedure까지 수행하기 위하여는 sqldba(v7.2까지) 또는
    svrmgrl(v7.3 이상)에서 startup nomount를 하면 된다.
    2) mount the database
    인스턴스 start 후 데이타베이스를 mount하는 단계로 mount에서는 control
    file을 open한다. 이 단계까지만 start하는 경우에는 특별한 데이타베이스
    유지 보수 작업이 필요시 수행한다. 특별한 데이타베이스 유지 보수 작업이란
    redo log의 add, rename, media recovery의 수행 등의 작업을 의미한다.
    startup 시 mount 단계까지 수행하려면 startup mount를 수행하면 된다.
    1)에서 인스턴스를 start한 후 mount 단계로 넘어가려면 alter database
    mount를 수행하면 된다.
    3) open the database
    데이타베이스의 open은 mount 후 데이타베이스를 사용할 수 있는 환경으로
    만들어 주는 단계로서 모든 online datafile과 online redo log file을 open하고
    사용할 수 있도록 하여 준다. 데이타베이스가 중지된 상태에서 한번에 open까지
    모두 수행하기 위해서는 startup만 하면 된다. 2)에서처럼 데이타베이스를 mount
    후 open 시에는 alter database open을 수행하면 된다. (단, 인스턴스 start에서
    바로 database open을 수행할 수 없다.)
    2. STARTUP의 종류
    startup은 sqldba(v7.2까지) 또는 svrmgrl(v7.3 이상)에서 수행한다.
    1) startup
    이는 일반적인 ORACLE 기동 방법으로 startup이 완료되면 모든 user가
    데이타베이스를 access할 수 있다.
    2) startup restrict
    일반 user의 ORACLE 사용을 제한하기 위하여 startup하는 방법으로
    ORACLE user중 create session+restricted session이라는 system privilege를
    갖고 있는 user만이 데이타베이스를 사용 할 수 있다. 이는 데이타베이스 구조를
    조정하거나 data의 export, import시 등 일반 user의 사용을 제한하는 경우에
    사용한다.
    3) startup force
    shutdown normal 또는 shutdown immediate시 정상적으로 종료되지 않는 경우
    데이타베이스의 인스턴스를 강제로 kill시키고 startup하도록 한다.
    4) startup parallel
    OPS 환경으로 데이타베이스를 운영하는 경우 하나의 데이타베이스를 여러 개의
    node에서 공유한다. 이때 여러 인스턴스에서 데이타베이스를 공유하기 위해서는
    startup parallel로 기동 하여야 한다. 1)의 startup은 exclusive mode로서
    OPS로 데이타베이스 환경이 되어 있더라도 startup만 하면 여러개의 인스턴스가
    하나의 데이타베이스를 공유할 수 없다. 이는 데이타베이스가 exclusive mode로
    기동되었기 때문이다. OPS에서 데이타베이스를 공유하기 위해서는 반드시
    startup parallel로 기동하여야 한다.
    3. SHUTDOWN PROCEDURE
    shutdown은 데이타베이스의 운영을 중단하기 위해 수행하는 것으로 startup
    procedure와는 반대로 작동한다. 즉 먼저 데이타베이스를 close하고 두번째
    데이타베이스를 dismount하며 마지막으로 인스턴스를 shutdown 한다.
    4. SHUTDOWN의 종류
    shutdown도 startup처럼 sqldba(v7.2까지), svrmgrl(v7.3 이상)에서 수행한다.
    1)shutdown
    이는 일반적인 shutdown 방법으로 shutdown이 진행 중에는 새로운 user가
    데이타베이스에 세션을 맺을 수 없으며 또한 기존에 connect되어 있는 user가
    있는지 확인하여 connect된 user가 없다면 데이타베이스를 shutdown하고 user가
    있다면 connect된 user가 disconnect될 때까지 shutdown을 하지 않고 기다린다.
    2) shutdown immediate
    현재 데이타베이스를 사용 중인 user가 있지만 데이타베이스를 shutdown해야
    하는 경우 shutdown immedaite를 수행한다. shutdown immediate를 수행하면
    현재 진행 중인 SQL이 중단되고 commit되지 않은 transaction을 rollback하고
    connect되어 있던 user를 강제로 disconnect시키고 shutdown을 수행하게 된다.
    단, 다량의 data를 update하는 작업을 수행 중 shutdown immediate를 수행하면
    곧바로 database가 shutdown되지 않는다.
    이는 rollback하는 데 많은 시간을 소비하기 때문이다.
    3) shutdown abort
    connect된 user가 long transaction을 수행하고 있지만 급하게 데이타베이스를
    shutdown 하여야 하는 경우 shutdown abort를 하게 된다. shutdown abort를
    수행하면 ORACLE 인스턴스를 바로 shutdown하므로 shutdown immediate와는 달리
    commit되지 않은 transaction들을 rollback하지 않고 데이타베이스를 shutdown
    한다. 그러므로, long transaction이 있더라도 빨리 shutdown 할 수 있다.
    단, shutdown abort는 rollback하지 않고 shutdown하므로 데이타베이스에
    이상 현상을 초래할 가능성을 가지고 있다.

  • Running Oracle startup or shutdown bat file from Java code

    I have two bat files for the startup and shutdown of Oracle instance which works fine from the command prompt. But my requirement is to run it through a Java program. Please reply with full Java code. Also mention how I would get the status of the bat files that it is successfully executed or not and if not what is the error.

    Your program is working fine, but there is another problem. What's happening now is I have to open the Login screen after the startup of oracle server is complete, but the next line of my program after Runtime.exec is the LoginScreen.show which immediately shows the login screen after executing Runtime.exec and when I am giving the login name and password and press enter, it shows Oracle not available exception, because the startup process is still in progress. I want to stop the execution of my next line of code until and unless my process of Oracle startup is complete.

  • Broken image links on APEX 3.0 in Oracle 10g XE? Here's the solution

    You're on Oracle 10g XE and you've just upgraded your APEX from 2.0 to 3.0. You log into APEX Admin and there's tons of broken image links. You look into the Oracle documentation for APEX and it instructs you to copy the Images folder into your htmldb directory if you're using Oracle 10g standard, etc. But you're using Oracle 10g XE and there is no Images folder anywhere to be seen!
    HERE'S THE SOLUTION:
    http://daust.blogspot.com/2006/03/where-are-images-of-application.html
    Excerpt from the website:
    In OracleXE these resources (Images) are stored directly in the database, using the Oracle XMLDB feature. You can access the resources and modify them directly by using the WebDAV feature of the XMLDB.
    (1) With Internet Explorer, just go to File > Open > http://127.0.0.1:8080/i (check "open as webfolder")
    Then, copy the contents of your apex/images folder into this webfolder. It will take about 10 minutes. When it's done, refresh your Apex 3.0 website and lo and behold! Images! :)
    Be sure to thank Dietmar Aust for his solution to this problem, provided on his website: http://daust.blogspot.com/2006/03/where-are-images-of-application.html

    Another option: Try the Oracle Database XE and Application Express 3.0.1 install guide.
    C.

  • ORACLE DATABASE의 AUTOMATIC STARTUP/SHUTDOWN

    제품 : ORACLE SERVER
    작성날짜 : 1995-11-21
    오라클 database의 AUTOMATIC STARTUP/SHUTDOWN
    ============================================
    시스템이 startup 하면서 오라클도 함께 startup하거나 시스템을 shutdown
    할 때 오라클도 같이 shutdown 하는 것이 가능하다. 그 방법은 OS마다 차이가
    있는데 여기서는 UNIX 에 기반한 여러 플랫폼에 대해서 알아보기로 한다.
    본 내용에서 가장 많이 사용되는 화일은 다음과 같다.
    $ORACLE_HOME/bin/dbstart
    $ORACLE_HOME/bin/dbshut
    /etc/oratab 또는 /var/opt/oracle/oratab
    dbstart 와 dbshut 은 오라클을 startup/shutdown 시키는 스크립트인데
    이것은 automatic startup/shutdown 시에만 사용하도록 하고 평상 시의
    경우에는 사용하지 않도록 한다.
    oratab 화일은 일반 텍스트 화일로서 시스템에 설치된 오라클 인스턴스에
    대한 정보를 가지고 있는데 보통 3개의 필드로 이루어져 있으며 첫번재
    필드는 ORACLE_SID, 두번째 필드는 ORACLE_HOME, 세번째 필드는 Y 또는 N
    으로 구성되어 있다. 해당 인스턴스를 autostartup 시키려면 꼭 Y로
    세팅되어 있어야 한다.
    SYSTEM V
    System V 에 기반한 시스템은 /etc/rc<n>.d 디렉토리에 초기화 스크립트를
    가지고 있다. 여기서 <n> 은 해당 스크립트의 run-level 을 의미한다.
    일반적으로 run-level 0은 power shutdown mode 이고 run-level 2는 multi-user
    mode 이다. 각각의 디렉토리에 들어있는 초기화 스크립트는 다음과 같은 형태의
    이름을 갖고 있다.
    K{two-digit number][descriptive filename]
    예를 들면 S75cron, K30tcp 등이 있을 수 있다.
    S로 시작되는 스크립트는 startup 시에 실행되는 것이고 K 로 시작하는 것은
    shutdown 시에 실행된다.
    two-digit number가 의미하는 것은 스크립트가 실행되는 순서인데 숫자가 작은
    것부터 먼저 실행된다. 따라서 오라클 스크립트는 보통 다음과 같은 이름을 갖게 된다.
    S99oracle, K01oracle
    이와 같이 설정하면 시스템이 startup 될 때 모든 초기화가 끝난 후 마지막으로
    오라클이 startup 되며 시스템을 shutdown 할 때에는 오라클을 가장 먼저 shutdown
    하게 된다.
    BSD UNIX
    BSD 에 기반한 시스템은 시스템이 startup 될 때 초기화 화일로
    /etc/rc*(예를 들면, /etc/rc, /etc/rc.local) 를 사용한다.
    시스템을 shutdown 할 때에는 보통은 /etc/shutdown 만 실행하게 되므로
    특별히 실행되는 스크립트가 없지만 /etc/rc.shutdown 이 실행되는
    플랫폼도 있다.
    이제 각 플랫폼별로 자세히 알아보기로 한다.
    주의 : <oracle_owner> 는 oracle owner id 로 대체
    <$ORACLE_HOME> 은 oracle home directory 명으로 대체
    (1)SunOS 4.1.3
    SunOS 4.1.3 에서는 /etc/rc.local 을 startup 스크립트로 사용한다. 즉
    시스템이 startup 되면서 /etc/rc.local 이 실행된다. 따라서 이 화일의 끝에
    다음과 같은 라인을 추가하면 된다.
    su <oracle_owner> -c <$ORACLE_HOME>/bin/dbstart
    예를 들어 oracle owner 가 oracle7 이고 $ORACLE_HOME 이 /home/oracle
    이라면 다음과 같이 해주면 된다.
    su oracle7 -c /home/oracle/bin/dbstart
    여기서 /home/oracle 대신에 $ORACLE_HOME 과 같은 환경변수를 이용하여
    세팅하면 안된다.
    SunOS 에서는 시스템이 shutdown 될 때 실행되는 스크립트는 따로 없다.
    따라서 dbshut 을 실행시키는 방법은 다음과 같은 스크립트를 만들어서
    시스템을 shutdown 시킬 때 /etc/shutdown 을 실행시키지 말고 대신
    이것을 실행시켜야 한다.
    #!/bin/csh
    su <oracle_owner> -c <$ORACLE_HOME>/bin/dbshut
    /etc/shutdown $*
    만약 오라클을 shutdown 하지 않고 시스템을 shutdown 하면 다음에
    오라클을 startup 하려고 할 때 startup이 되지 않는다. 이 경우에는
    $ORACLE_HOME/dbs/sgadef<SID>.dbf 화일을 지우고 startup 시키면 된다.
    (2)OSF/1(DIGITAL UNIX)
    /etc/inittab : 초기화 과정을 콘트롤
    /sbin/rc3 : run-level 3 에서 사용되는 script
    /sbin/rc0 : run-level 0 에서 사용되는 script
    /sbin/rc3.d/S99oracle : /sbin/init.d/oracle 로 link
    /sbin/rc0.d/K01oracle : /sbin/init.d/oracle 로 link
    /etc/initab 화일에는 초기화 과정에 대한 정보가 들어 있다.
    예를 들면 다음과 같다.
    s3:3:wait:/sbin/rc3 < /dev/console > /dev/console 2>&1
    이렇게 설정하면 run-level 3 일 경우 /sbin/rc3 스크립트가 실행된다.
    /sbin/rc3 은 /sbin/rc3.d 디렉토리에 들어있는 스크립트를 실행한다. 만약
    스크립트 이름이 K 로 시작하면 이것은 stop 파라미터를 갖고 실행되어서 이
    스크립트에 지정된 프로세스를 정지시킨다. 한편, 스크립트가 S 로 시작하면
    /sbin/rc3 는 이 스크립트에 startup 파라미터를 부여하고 여기서 지정된
    프로세스를 실행시킨다. 따라서 /sbin/rc3.d/S99oracle 을 사용하여
    dbstart를 실행한다.
    shutdown 과정도 거의 비슷하다. /etc/inittab 에 다음과 같은 라인을 추가
    한다.
    s0:0:wait:/sbin/rc0 off < /dev/console > /dev/console 2>&1
    이것은 /sbin/rc0 를 실행시키는데 /sbin/rc0 는 /sbin/rc0.d 디렉토리에
    들어있는 스크립트를 실행시킨다. 스크립트의 이름이 S 로 시작하면 run
    time parameter 로 start 를 사용하게 되고 K 로 시작하면 stop 을
    사용한다.
    따라서 /sbin/rc0.d/K01oracle 스크립트는 stop 파라미터를 갖고
    실행되며 이 스크립트는 $ORACLE_HOME/bin/dbshut 스크립트를 실행시켜서
    오라클을 shutdown 시킨다.
    /sbin/rc3.d/S99oracle과 /sbin/rc0.d/K01oracle은 모두 /sbin/init.d/oracle
    에 대한 symbolic link 이다. /sbin/init.d/oracle 에 대한 symbolic link 는
    이들 외에 더 있을 수 있다.
    (3)Solaris 2.3 & SCO UNIX
    /etc/inittab : 초기화 과정을 콘트롤
    /etc/rc2 : run-level 2 에서 사용되는 스크립트
    /etc/rc0 : run-level 0 에서 사용되는 스크립트
    /etc/rc2.d/S99dbstart : /etc/init.d/dbstart 에 대한 link
    /etc/rc0.d/K01dbshut : /etc/init.d/dbshut 에 대한 link
    /var/opt/oracle/oratab
    Solaris 의 경우는 OSF/1 과 매우 유사하다. 차이점이라고 한다면 /sbin
    디렉토리 대신에 /etc 디렉토리에 필요한 스크립트가 들어있다는 것이다.
    rc0.d, rc2.d 같은 디렉토리는 실제로 /etc 디렉토리에 위치하고 있으며
    rc0, rc2 와 같은 스크립트는 /etc/init.d 에 존재하는 같은 이름의 스크립트에
    대한 symbolic link이다.
    /etc/init.d/dbstart 와 /etc/init.d/dbshut 스크립트의 내용은 각각 다음과
    같이 한줄로 구성되어 있다.
    su - <oracle_owner> -c <$ORACLE_HOME>/bin/dbstart
    su - <oracle_owner> -c <$ORACLE_HOME>/bin/dbshut
    Solaris 에서는 start, stop 같은 파라미터는 /etc/init.d/dbstart,
    /etc/init.d/dbshut 에서는 무시된다.
    /etc/init.d/dbstart, /etc/init.d/dbshut 화일은 owner가 oracle owner id
    이여야 한다.
    /etc/init.d/README 를 읽어보면 좀 더 자세한 내용이 설명되어 있으니 참조하기
    바란다.
    (4)AIX
    /etc/inittab : 시스템 초기화 화일
    /etc/rc : 시스템 초기화 스크립트
    /etc/mkitab : /etc/inittab 을 수정하는 유틸리티
    /etc/shutdown : 시스템 shutdown 스크립트
    AIX 에서는 오라클 autostartup 방법은 여러가지가 가능하지만 shutdown 은
    한가지만 가능하다. 우선 autostartup 은 다음과 같은 방법 가운데 하나를
    사용하면 된다.
    a)/etc/mkitab 를 사용하여 /etc/inittab 에 entry 를 추가한다. 즉,
    /etc/mkitab "<oracle_owner>:2:wait:/bin/su <oracle_owner> -c
    <$ORACLE_HOME>/bin/dbstart > /dev/console 2>&1"
    이렇게 하면 /etc/inittab 화일에 dbstart 기능이 추가된다. 이렇게 하면
    시스템이 뜨면서 run-level 2일 경우 오라클이 자동으로 startup 된다.
    b)다음과 같은 방법도 가능하다.
    /etc/mkitab "rcoracle:2:wait:/etc/rc.oracle > /dev/console 2>&1"
    그리고, root 소유의 /etc/rc.oracle 스크립트를 다음과 같이 작성한다.
    su <oracle_owner> <<EOF
    <$ORACLE_HOME>/bin/dbstart
    EOF
    c)/etc/rc 스크립트의 마지막에 다음을 추가한다.
    /bin/su <oracle_owner> - c <$ORACLE_HOME>/bin/dbstart
    AIX 에서 시스템 shutdown 은 /etc/shutdown 에 의한다. 시스템을 내릴 때
    오라클을 shutdown 하려면 별도의 시스템 shutdown 스크립트(root 소유로)를
    다음과 같이 만들어서 /etc/shutdown 을 사용하지 말고 이것을 사용해야 한다.
    #!/bin/sh
    /bin/su <oracle_owner> -c <$ORACLE_HOME>/bin/dbshut
    /etc/shutdown $*
    (5)HP/UX
    /etc/rc : 시스템 startup 화일
    /etc/shutdown : 시스템 shutdown 실행 화일
    /etc/shutdown.d : 시스템 shutdown 디렉토리
    HP/UX 에서는 시스템 startup 시에 /etc/rc 가 실행된다. 따라서 다음 라인을
    /etc/rc 스크립트의 마지막에 추가하면 auto startup 이 가능해진다.
    su <oracle_owner> -c <$ORACLE_HOME>/bin/dbstart
    시스템의 shutdown 은 /etc/shutdown 화일을 실행하여 수행된다. 이 프로그램은
    /etc/shutdown.d 디렉토리에 들어있는 스크립트를 실행시키는데 다음과 같은
    세 가지 방법 가운데 하나로 auto shutdown 을 세팅할 수 있다.
    a)$ORACLE_HOME/bin/dbshut 화일을 /etc/shutdown.d 디렉토리 아래에 copy
    b)/etc/shutdown.d/dbshut 을 $ORACLE_HOME/bin/dbshut 으로 symbolic link 지정
    c)다음과 같은 스크립트 작성
    #!/bin/sh
    su <oracle_owner> -c <$ORACLE_HOME>/bin/dbshut
    단,이 스크립트는 root의 소유이고 root에 의해서만 실행 가능해야 한다.
    만약 V6 와 V7 을 동시에 사용하는 경우라면 V7 에서 제공하는 dbshut을
    사용하도록 한다.

    Dear Alexdelarg,
    First launch the "Services" applet from the Windows NT Control Panel. Double-click on the "OracleService<SID>" service and verify that "Startup Type" is set to "Automatic", "Log On As" is set to "System Account", and that the "Allow Service to Interact with Desktop" check box is disabled.
    Then launch REGEDIT and check that the Value String ORA_<SID>AUTOSTART within the key My Computer\HKEYLOCAL_MACHINE\SOFTWARE\ORACLE is set to "TRUE".
    If the above does not rectify your startup problem, try issuing the following command from the Command Prompt:
    <ORACLE_HOME>\bin\oradim -edit -sid <SID> -startmode auto
    where <ORACLE_HOME> is the full path of your Oracle8i Server software and <SID> is the Service Identifier of your database.
    Hope this helps!

  • Oracle 8i Automatic Startup/shutdown on NT

    After installing Oracle 8.1.6 on Win NT/2000 and creating a database a new service is created too (OracleServiceSID). My problem is that this new service (which works like oradim starting srvc,inst) does not startup the db when rebooting the machine. I need always manual startup/shutdown with a script that uses svrmgrl while in Oracle guides it seems that would be enough to start the service. Every parameter in the registry is set according to these guides to permit automatic startup/shutdown but only the service, not the db, starts and stops automatically. Where is my error?
    Thanks
    Alex
    null

    Dear Alexdelarg,
    First launch the "Services" applet from the Windows NT Control Panel. Double-click on the "OracleService<SID>" service and verify that "Startup Type" is set to "Automatic", "Log On As" is set to "System Account", and that the "Allow Service to Interact with Desktop" check box is disabled.
    Then launch REGEDIT and check that the Value String ORA_<SID>AUTOSTART within the key My Computer\HKEYLOCAL_MACHINE\SOFTWARE\ORACLE is set to "TRUE".
    If the above does not rectify your startup problem, try issuing the following command from the Command Prompt:
    <ORACLE_HOME>\bin\oradim -edit -sid <SID> -startmode auto
    where <ORACLE_HOME> is the full path of your Oracle8i Server software and <SID> is the Service Identifier of your database.
    Hope this helps!

  • Automatic startup/shutdown script - 3 Oracle Home

    Hi All,
    We have a server which has 3 Oracle Home - 8i/9i/10g.
    So i am confused about configuring automatic startup/shutdown scripts.
    Can you guys please let me know how to setup automatic startup/shutdown for these multiple Oracle Homes.
    Thanks,
    Kumar.

    Bellow is a HP-UX script that can help. Create three scripts like oracle8, oracle9, oracle10 with correct path values. and than decide the runlevels and create soft links for the scripts you created, for example;
    Under /sbin/rc3.d
    ln -s /sbin/init.d/oracle10 S999oracle10
    Under /sbin/rc1.d and /sbin/rc2.d
    ln -s /sbin/init.d/oracle10 C9oracle10
    AUTOMATIC STARTUP/SHUTDOWN SCRIPT
    $vi /sbin/init.d/oracle10
    #!/sbin/sh
    # NOTE: This script is not configurable! Any changes made to this
    # scipt will be overwritten when you upgrade to the next
    # release of HP-UX.
    # WARNING: Changing this script in any way may lead to a system that
    # is unbootable. Do not modify this script.
    # NOTE:
    # For ORACLE:
    PATH=/usr/sbin:/usr/bin:/sbin
    export PATH
    ORA_HOME="/oracle/app/oracle/product/10.2.0"
    ORA_OWNR="oracle"
    rval=0
    set_return() {
    x=$?
    if [ $x -ne 0 ]; then
    echo "EXIT CODE: $x"
    rval=1
    fi
    case $1 in
    start)
    # Oracle listener and instance startup
    echo -n "Starting Oracle: "
    su - $ORA_OWNR -c "$ORA_HOME/bin/dbstart /oracle/app/oracle/product/10.2.0"
    echo "OK DB started"
    stop)
    # Oracle listener and instance shutdown
    echo -n "Shutdown Oracle: "
    su - $ORA_OWNR -c "$ORA_HOME/bin/dbshut /oracle/app/oracle/product/10.2.0"
    echo "OK DB shutdown"
    reload|restart)
    $0 stop
    $0 start
    echo "usage: $0 {start|stop}"
    esac
    exit $rval

  • Oracle Automatic Startup & Shutdown

    My automatic Database startup/Shutdown script won't work while system reboot. I have Oracle 8.1.7/Sun solaris. When I ran the script by hand it works fine both for startup and shutdown but not while system reboot. I am putting the script in the proper run levels rc0.d and rc3.d.
    even /etc/rc0.d/K01oracle and /etc/rc3.d/S90oracle is working fine.
    Could someone please tell me what am i missing.
    Appreciate your help
    -Jay

    Hi,
    Have you settled your issue? I would think the problem was caused by the environment under which the script was run. Normally the rc scripts are run as root and the PATH will not be set to run Oracle executables. So inside the script if you run the startup script as the user who has execute permission to the Oracle executables and whose path is SET in .profile then it should work.

Maybe you are looking for

  • MIGO in MM

    during GR in MIGO transaction i have following error "period 003/2008 is not open for account type S and G/L 400000" some one can help me to resolve the error thanks

  • Windows 8.1, Military CAC, Dual Persona PIV Cert, DEE-mail Access Problem

    I am not able to access the military e-mail system, Defense Enterprise E-mail (DEE) from my new computer.  My new computer is a Dell Venue 11 Pro Tablet that runs Windows 8.1 with the latest updates.  In addition, hardware wise, I have a CAC (Common

  • Set Parameter problem

    my code is like this START-OF-SELECTION. SELECT * FROM SBOOK UP TO 10 ROWS. WRITE: / sbook-carrid, sbook-connid, sbook-fldate, sbook-bookid.   HIDE:  SBOOK-CARRID, SBOOK-CONNID,          SBOOK-FLDATE, SBOOK-BOOKID. ENDSELECT. AT LINE-SELECTION. set p

  • Re-Install Portal

    iam planning to re-install the sneak preview of EP. What is the correct of re-install completely from the system? anybody?plz..

  • Error in channel

    When accesing a channel created using JSPProvider i get the following error in Portal Server 6.1: ERROR: ProviderCommands.genHelp(): can not get helpURL for: scLibraryProvider com.sun.portal.providers.ProviderException: providerAdapter.getHelp(): com