Auto start/shut on oracle 9i in linux
Hi all,
I just finished the installation of oracle 9iR2 on RHEL4.
Can u give me some information to configure auto start/shut option on RHEL4
See the Oracle9i Installation Guide
Release 2 (9.2.0.1.0) for UNIX Systems: AIX-Based Systems, Compaq Tru64 UNIX, HP 9000 Series HP-UX, Linux Intel, and Sun Solaris relevant section
Similar Messages
-
Auto start Oracle instance in linux
Can I configure oracle to auto start an oracle instance in linux environment ?
Here are the steps to enable the oracle service start automatically during the system boot
Login as root in Linux box to execute the following steps
1. the flag set to Y in /etc/oratab file with the respective instance
2. Copy the oracle script in /etc/init.d folder
3. change the permission < chmod 755 <script filename>
4. add the service <chkconfig --add <script filename>
5 Put the service auto on <chkconfig <script filename> on >
6. To verify the oracle service startup automatic < service <script filename> stop > < service <script filename> start >
Regards
N Jandial -
Auto Start/Stop Oracle Database Lintener DBConslone on Linux
Dear all
I have install oracle 10.2.0 on redhat 4.7 every time i have to start manualy.
it try with following scrip / process but database not starting automatically.
Please any one can provide steps for auto start and stop oracel services on RedHat 4.7
Once the instance is created, edit the "/etc/oratab" file setting the restart flag for each instance to 'Y'.
TSH1:/u01/app/oracle/product/10.2.0:Y
Next, create a file called "/etc/init.d/dbora" as the root user, containing the following.
#!/bin/bash
#chkconfig: 345 95 10
#description: init script to start/stop oracle database 10g, TNS listener, EMS and isqlplus
case $1 in
start)
su - oracle -c 'lsnrctl start'
su - oracle -c 'dbstart'
su - ora10g -c 'isqlplusctl start'
su - oracle -c 'emctl start dbconsole'
stop)
su - oracle -c 'emctl stop dbconsole'
su - oracle -c 'isqlplusctl stop'
su - oracle -c 'dbshut'
su - oracle -c 'lsnrctl stop'
restart)
su - oracle -c 'emctl stop dbconsole'
su - oracle -c 'isqlplusctl stop'
su - oracle -c 'dbshut'
su - oracle -c 'lsnrctl stop'
su - oracle -c 'lsnrctl start'
su - oracle -c 'dbstart'
su - ora10g -c 'isqlplusctl start'
su - oracle -c 'emctl start dbconsole'
esac
create service on linux
Actions >> System Settings >> Server Settings >> Services Then
Actions >> Add Service Then
Service Name = dbora Then Press Ok
chmod a+x /etc/init.d/dbora
Check is it running this service properly
service dbora stop
service dbora start
showing error
:bad interperter : no such file or directory
Please forward me process/steps for auto start/stop oracel services:bad interperter : no such file or directorymeans that it could not find the interpreter which should be used to interpret the script.
most probably this is caused by the shebang (#!/bin/bash)
the default location of bash on RHEL (OEL/CentOS) is /bin/bash, which means that the shebang looks correct.
can you make the shebang:
#!/bin/bash -xso shelltracing is put on and execute script again?
this will make clear if it is the shebang in your script, or in another script. -
Auto start oracle in linux - error
1. edited the "/etc/oratab" file setting flag to 'Y'.
soni:/home/oracle/oracle/product/10.2.0/db_1:Y
2 connect wih root user
- created empty file (/etc/init.d/dbora)
copied from (http://www.oracle-base.com/articles/linux/AutomatingDatabaseStartupAndShutdownOnLinux.php)
#!/bin/sh
# chkconfig: 345 99 10
# description: Oracle auto start-stop script.
# Change the value of ORACLE_HOME to specify the correct Oracle home
# directory for your installation.
ORACLE_HOME=/home/oracle/oracle/product/10.2.0/db_1
# Change the value of ORACLE to the login name of the
# oracle owner at your site.
4.
chmod 750 /etc/init.d/dbora
5.
chkconfig --add dbora
When I try this root user i get error
# /etc/init.d/dbora start
/etc/profile: line 51: syntax error near unexpected token `then'
/etc/profile: line 51: `if[ \$USER= "oracle" ]; then'
-bash: c: No such file or directory
I restarted the database, but DB didnt start automatically...
Edited by: The_Rock on Jun 10, 2010 9:47 PMThe_Rock wrote:
# /etc/init.d/dbora start
/etc/profile: line 51: syntax error near unexpected token `then'
/etc/profile: line 51: `if[ \$USER= "oracle" ]; then'
-bash: c: No such file or directoryThe /etc/profile line 51 seems to be incorrect. No space between the "+if+" and the bracket condition.
E.g.
/home/billy> if[ \$USER = "oracle" ]; then echo true;else echo false;fi
bash: syntax error near unexpected token `then'
/home/billy> if [ \$USER = "oracle" ]; then echo true;else echo false;fi
falseWhy do you use a leading slash for the +$USER+ variable? It changes it from a variable to a literal.
/home/billy> echo $USER
billy
/home/billy> echo \$USER
$USERLiteral "+$USER+" will never equal literal "+oracle+". -
Auto-start OC4J process after Linux reboot
Oracle 11gR2, OC4J 10g (10.1.3.5.0), RHEL5 64 bit
Hi All,
I am trying to figure out how to get my oc4j process start at boot time. I already have a dbora script setup. I tried adding the following line to my dbora/dbstart script but it did not do anything:
#!/bin/sh
# chkconfig: 345 99 10
description: Oracle auto start-stop script.
ORACLE_OC4J_HOME=/u02/oc4j
JAVA_HOME=/usr/java/jdk1.6.0_21/
su - $ORACLE_OWNER -c "$ORACLE_OC4J_HOME/bin/oc4j -start"
I read somewhere that I may need to put the entire path like:
/usr/bin/java -jar /path/to/oc4j.jar &
Just not sure where and how to put that path in the file.
Thanks for your help all.
JrOraDBAHi,
To run oc4j in the background, on Linux
Execute the following command:
nohup ./oc4j -start &
to run oc4j in the background. The 'nohup' command ignores the hangup signal (closing the terminal window) and enables oc4j to continue running in the background.
In rare cases, oc4j will not shutdown cleanly with the standard command:
./oc4j -shutdown -port 23791 -oc4jadmin <admin_pwd>
In those cases, try the following command:
java -jar admin_client.jar deployer:oc4j:localhost oc4jadmin <admin_pwd> -shutdown
to stop the oc4j service.
Thanks,
Sharmela -
How we can control auto start/stop of db/listener on Unix/linux?
How we can control auto start/stop of db/listener on Unix/linux?
http://download-uk.oracle.com/docs/html/B10812_01/chapter2.htm#BABGDGHF
-
DB and listner auto start with linux problem
Dear all :
i can't set DB auto start with linux
my db version 10g linux 5
I followed these steps :
edit the "/etc/oratab" file setting the restart flag for each instance to 'Y'.
TSH1:/u01/app/oracle/oracle/product/10.2.0/db_1:Y
create a file called "/etc/init.d/dbora" as the root user, containing the following.
#!/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=/u01/app/oracle/oracle/product/10.2.0/db_1
ORA_OWNER=oracle
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/lsnrctl start"
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
su - $ORA_OWNER -c "$ORA_HOME/bin/lsnrctl stop"
esac
chmod 750 /etc/init.d/dbora
chkconfig --level 345 dbora on
# ln -s /etc/init.d/dbora /etc/rc.d/rc3.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/K01dbora
# ln -s /etc/init.d/dbora /etc/rc.d/rc5.d/S99dboraFollow this part of Oracle Doc,
Automating Shutdown and Startup
http://download.oracle.com/docs/cd/B19306_01/server.102/b15658/strt_stp.htm#sthref249
Also run your script manually see if it will run sucessfully.
/etc/init.d/dbora start
/etc/init.d/dbora stop -
Error in Setting Auto Start for Oracle DB on Sun Solaris 10
Hi Gurus,
I am trying to set my DB to auto start when server reboots. Fllowing is my setting and the error. The issue is that the DB starts but LISTENER is not running...
Please please help me...
This is what I used for setting the auto start.
Thanks,
Jayant
SETTING:
=======
#!/sbin/sh
#Match ORACLE_HOME with whatever is in ~oracle/.profile!!!
ORACLE_HOME=<whatever is Orcale home is>
case $1 in
start)
su - oracle -c $ORACLE_HOME/bin/dbstart
su - oracle -c "$ORACLE_HOME/bin/lsnrctl start"
exit 0
stop)
su - oracle -c "$ORACLE_HOME/bin/lsnrctl stop"
su - oracle -c $ORACLE_HOME/bin/dbshut
esac
You're not done yet! You now have to dl
ln -s ../init.d/oracle /etc/rc3.d/S95oracle
ln -s ../init.d/oracle /etc/rc0.d/K15oracle
chmod 0755 /etc/init.d/oracle
ERROR:
======
LSNRCTL for Solaris: Version 10.2.0.1.0 - Production on 02-DEC-2006 10:09:24
Copyright (c) 1991, 2005, Oracle. All rights reserved.
Message 1070 not found; No message file for product=network, facility=TNSTNS-12545: Message 12545 not found; No message file for product=network, facility=TNS
TNS-12560: Message 12560 not found; No message file for product=network, facility=TNS
TNS-00515: Message 515 not found; No message file for product=network, facility=TNS
Solaris Error: 2: No such file or directory
root@zngds1gk #Bingo.... I got it.
Thanks for your hint about the ./.profile. I was setting env variables in .cshrc file and my default shell for "oracle" user was sh.
Then I changed the default shell for oracle user to csh and viola..... it works.
root@zngds1gk # su - oracle
$ id
uid=100(oracle) gid=101(dba)
$ setenv
HOME=/space/oracle
PATH=/space/oracle/app/oracle/product/10.2.0/Db_2/bin:/usr/bin:
LOGNAME=oracle
HZ=100
TERM=xterm
SHELL=/bin/sh
$ exit
root@zngds1gk # usermod -u 100 -s /bin/csh oracle
root@zngds1gk # su - oracle
zngds1gk%
zngds1gk% setenv
HOME=/space/oracle
PATH=/space/oracle/app/oracle/product/10.2.0/Db_2/bin:/usr/bin:
LOGNAME=oracle
HZ=100
TERM=xterm
SHELL=/bin/csh
zngds1gk% cat .cshrc
umask 022
setenv ORACLE_BASE /space/oracle/app/oracle
setenv ORACLE_SID adm
setenv DISPLAY 47.102.212.108:0.0
setenv ORACLE_HOME /space/oracle/app/oracle/product/10.2.0/Db_2
setenv PATH /space/oracle/app/oracle/product/10.2.0/Db_2/bin:$PATH
And now it works...
Thanks.
~Jayant -
Starting Oracle-Xe on Linux fedora core 5
Dear fourm members,
I had Installed Oracle Xe on linux fedora core 5 and configure it.
When i try to start the oracle Xe server I get the follwing error.
# /etc/init.d/oracle-xe start
Starting Oracle Net Listener.
Starting Oracle Database 10g Express Edition Instance.
Failed to start Oracle Net Listener using /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/bin/tnslsnr and Oracle Express Database using /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/bin/sqlplus.
what can i do to start the service.Failed To Start Oracle Net Listener
-
Oracle 11g XE won't auto start
Installed XE (11g) on a XP machine. When system is restarted listener service starts but DB service doesn't. It is set to auto start. If I manually start the DB service it starts without issue and we can use the system.
I've even set the service to try to restart in case of a failure (to see if that made a difference.....nope).
Any ideas?Hi,
What's set to registry?
HKEY_LOCAL_MACHINE -> SOFTWARE -> ORACLE -> [HOME0] -> ORA_[SID]_AUTOSTART
Regards, -
Oracle 8i for Linux Starter Kit
Hello,
Need an Oracle God to help me with 8i for linux!
I am would like to learn about oracle database software. Just purchased the Starter Kit that includes 8.1.6 Enterprise Edition. Now I have done some research on the install for this and found out that it is very difficult. I tried to cookbook together the install from various posts/oracle web site/etc. I was successful in getting it to install, but could not get the stubs patch to install.
I now have a fresh install of Mandrake 8.0. No changes have been made to glibc.
First question is where to get the correct glibc rpm to keep the installer from crashing, and from causing other problems to my system. MandrakeUpdate was smoking crack and fetching a different file for glibc 2.2.2-5, then it said that it would conflict with gcc or something like that. I want to make sure I am getting the appropriate
files.
Second, on page 19 of the book, I do ok until it comes to setting the environment variables. Am I supposed to login as my Oracle user, an type '$HOME/.bash_profile' to set these variables? This relates to the problem with the stubs patch saying that ORACLE_HOME was not in the environment.
Third, I am using this link to get to the stubs file.
http://download.oracle.com/otn/linux/oracle8i/glibc-2.1.3-stubs.tar.gz
My plan is this.
1. Update the appropriate glibc rpm to allow the installer to run.
2. Install Oracle based on the books instruction verbatim.
3. Do not install the educational database. First install the stubs as above.
Questions.
Will a custom install allow me to keep the installer from attempting the database?
Once the stubs are installed, where is dbassist located to install the database after the fact?
Please Please help me with this situation. I would really like to learn databases, Oracle in particular. If this does not work, I doubt that I can return the book, considering the cd is open.
Thanks in advance for any kind assistance.
Jerold Von Hemel
jerold at vonhemel dot com
nullHere is a mini update since my last post...
ok, by updating my glibc stuffs from 2.2.2-4 to 2.2.2-5 I am able to get the runinstaller to work (it echos a bunch of 'map failed' in the console though I wonder if there is something wrong with that)... however since I am only doing now at work I can only try to install on my laptop which is does not have enough HD space. I am down to 230M left and there is no way it will install so I will try it again on my PC after I go home today. Btw, here are the files that I have updated:
glibc-2.2.2-5mdk.i586.rpm
glibc-devel-2.2.2-5mdk.i586.rpm
glibc-profile-2.2.2-5mdk.i586.rpm
ldconfig-2.2.2-5mdk.i586.rpm
nscd-2.2.2-5mdk.i586.rpm
You can get these from any mirror sites I think. Or run your MandrakeUpdate under the Config/Packaging menu (you need to select a mirror site by clicking mirror site update).
As for the SRPMS/glibc-2.2.2-5mdk.src.rpm...
I can't find this file in any of the mirror site.
However, now I am facing another issue. I tried the "echo $ORACLE_HOME" as suggested but it returns me with an empty line same as I try a make up env like "echo $dafadas"... so does this means that it is not reading the ORACLE_HOME in my .bash_profile in the oracle account? I also notice that even I did all the same procedures, while in RH6.2 the oracle install path is my $ORACLE_HOME, in Mandrake8 the path is /home/oracle/OraHome1? I stopped at this step and didn't go forward because 1, there is not enough HD space to continue and 2, I am not sure that the path is correct. If anyone reached this state and went beyond please let me know if I am on the right track or not...
P.S. I remember doing that same thing about not installing the database during the installation for oracle 8.0.5; however, I couldn't access to the database even using my oracle account later on. I don't know if that is a permission problem or something like that.
Thanks in advance
Mimic -
Newbie: Starting an Oracle Database on Linux
I am doing support for an Oracle Database installed on Red Hat. My problem is that I do not know how to start the oracle database. I had to reboot the Linux box and the database did not restart.
What do I need to do to start the database?
Also the Linux does not have the GUI installed, I am working from the command prompt.
Any help is greatly appreciated.
Thanks in advance.
Rayif u are using oracle 8i, you can use de command:
$svrmgrl
svrmgrl> startup;
if u are using 9i:
$sqlplus /nolog
sqlplus>connect /as sysdba;
sqlplus> startup;
Hope this helps.
Cynthia Pulido
Monterrey, Mexico
[email protected] -
Auto Start/Shutdown db on Linux (RHEL-4)
Hello,
I have posted a thread in Database General forum :
Auto Start/Shutdown db on RHEL 4
and there one suggestation i got that i have to raise my problem here itself only.
Kindly look into the issue and help me.
Thanks & Regards
Girish SharmaI see you start this service at sequence "99". This is good, but there are other 99-level startup scripts as well. These are processed in alphabetical order. Do this:
$ ls /etc/rd5d.d/S99*
So, "dbora" will run even before rc.local and that may not be a good thing.
Also, checking:
$ ls /etc/rc5.d/K* | head -n15
will show you the order in which services are shut down, again in alphabetical order.
These steps may help:
# /sbin/chkconfig dbora off
# /sbin/service dbora stop
# cd /etc/init.d/
# /sbin/chkconfig --del dbora
# mv dbora xxx-dbora
# vi xxx-dbora
# /sbin/chkconfig --add xxx-dbora
# /sbin/chkconfig xxx-dbora on
# /sbin/service xxx-dbora start
What we are doing is:
1) Remove existing dbora service
2) Rename the service to something that shows last in an ls(1) command
3) Edit the xxx-dbora script to change the chkconfig info from "99 10" to "99 01"
4) Installed the service.
Now, the start-up is done as the very last action and shutdown as the very first.
Does this make any difference? -
Auto start listener & DB in Linux
Hello, I have installed oracle 10g on Red Hat 2.1 Ent. Ed. I have also modified the /etc/oratab file for auto starting the service. The service start auto but i have two problems, 1) The listener does not start automatically 2) When trying to connect from SQL*PLUS, it says Shared Memory Realm does not exists. The Database has to be started manually connecting sys as sysdba. How can i configure the two things to start automatically? Any idea? Thanks.
Follow steps at the end of this article:
http://www.oraclebase.com/articles/9i/Oracle9iInstallationOnRedHat21.php
Script will start DB automaticaly during boot and also stops database during OS shutdown. -
Oracle8i on Windows 2000 Server - Oracle Instance don't auto start
I've installed the Oracle 8.1.7 on a Dell Pentium III server running Windows 2000 Server operational system. During the installation the Oracle Instance was started up, but after I reboot the computer, the Oracle Listener service and the Oracle service was started in automatic mode but the Oracle Instance do not started though.
My Oracle DBA teacher ask me to run Oradim and edit the Oracle configuration startup parameters. I did, but it didn't solve the problem. The values on Windows registry of the ORA_<SID>_AUTOSTART key is "true". The Dba Studio also gets information form the Oracle server and all the fields seems to be correct with auto-start option, but it didn't work out.
Can someone point me to any text I can read about installation troubles on Windows 2000 Server ?
Thanks in advance.
Jayme.Hi
I don't have an 8i db to test on but I think it works the same as on 9i.
Check the following parameters in your registry in the key HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE\HOME0:
ORA_<YOUR_SID>_AUTOSTART=TRUE
ORA_<YOUR_SID>_PFILE=<full path and file name of your init file>
Maybe you are looking for
-
What is diffrernce between key figures and characteristics?
Hi all, I am a newbie to SAP BI....i am doing Masters in ERP(SAP)....I have confusion about what is basic difference between key figures and characteristics? Why do we have to define attributes in characteristics? If any one can refer me a thread tha
-
Problem with safari on new i phone
i am having a problem with safari on my new i phone the address bar is covering up some of the top of the web page and it will not let me scroll up any more has any els had this problem and can any on help
-
How do I pass input values from an OTL timecard to a Fast Formula (FF)?
Hi - I hope my question is a simple one, but after hours of searching I have a feeling it is not. I currently have a FF rule that checks if benefit hours were entered in whole or half day increments. If not, an error is shown after 'Continue' is clic
-
Prblem in album sync with iPhone
Hi, I have a problem with the new apple Photos app on my Macbook Air. I converted the library from iPhoto (and unfortunately deleted the iPhoto library). I had Albums in iPhoto that i choose to sync with my iPhone via itunes. this was working OK with
-
The HTTPS page used to upload and manage files is accessing non secure resources (the icons) causing IE8 users to receive the following security warning: "Do you want to view only the webpage content that was delivered securely? This webpage contains