LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 12-13-2012, 01:32 PM   #1
mlnm
Member
 
Registered: Jun 2011
Posts: 96

Rep: Reputation: Disabled
Automatically starting oracle 11g database on system startup


I installed oracle 11gR2 on my rhel 5.8 server,i need the oracle database to be automatically up.For that i have set /etc/oratab autostartup to yes.And then i added a startup scrip to /etc/init.d ,and added it to services .It working fine when i manually stop and start.But when server restarts ,it database goes down.Please provide valid suggestions.Thank you in advance..
 
Old 12-13-2012, 03:11 PM   #2
kenneth_phough
Member
 
Registered: Dec 2005
Location: Birmingham, AL
Distribution: CentOS, REHL, Vine Linux
Posts: 67

Rep: Reputation: 3
have you done
Code:
chkconfig --add dbora
 
Old 12-13-2012, 04:59 PM   #3
mlnm
Member
 
Registered: Jun 2011
Posts: 96

Original Poster
Rep: Reputation: Disabled
yes i did chkconfig --add dbora and chkconfig dbora on.I did everything according to the tutorials but still after rebooting my oracle DB goes down.Could you please post working script for automatic start of oracle DB when server reboots.
 
Old 12-13-2012, 05:24 PM   #4
Habitual
LQ Addict
 
Registered: Jan 2011
Location: Youngstown, Ohio
Distribution: LM17.1/Xfce4.11.8
Posts: 7,159
Blog Entries: 10

Rep: Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968
Code:
sudo chkconfig -l db*
that's an El, not a One.
 
Old 12-14-2012, 07:18 PM   #5
mlnm
Member
 
Registered: Jun 2011
Posts: 96

Original Poster
Rep: Reputation: Disabled
tried sudo chkconfig -l db* ,it says "command not found".But actual problem is i cant even dbsatrt manually like $ORACLE_HOME/bin/dbstart it give s following errors:

touch: cannot touch `$ORACLE_HOME/startup.log': No such file or directory
chmod: cannot access `$ORACLE_HOME/startup.log': No such file or directory
Processing Database instance "$ORACLE_SID": log file $ORACLE_HOME/startup.log
./dbstart: line 347: $ORACLE_HOME/startup.log: No such file or directory

But actually startup.log files exists inside $ORACLE_HOME and it has sufficient privileges.
Cant figure out where its going wrong..
 
Old 12-14-2012, 08:37 PM   #6
Habitual
LQ Addict
 
Registered: Jan 2011
Location: Youngstown, Ohio
Distribution: LM17.1/Xfce4.11.8
Posts: 7,159
Blog Entries: 10

Rep: Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968
Code:
sudo su -
chkconfig -l | grep db*
?

For what it's worth:
Oracle should NOT be started using crontab.

Define:
"when i manually stop and start." as what user?

Linux Start Oracle As a Service

Last edited by Habitual; 12-14-2012 at 08:44 PM.
 
Old 12-16-2012, 07:24 PM   #7
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.8, Centos 5.10
Posts: 17,240

Rep: Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324
Quote:
touch: cannot touch `$ORACLE_HOME/startup.log': No such file or directory
chmod: cannot access `$ORACLE_HOME/startup.log': No such file or directory
Processing Database instance "$ORACLE_SID": log file $ORACLE_HOME/startup.log
./dbstart: line 347: $ORACLE_HOME/startup.log: No such file or directory

But actually startup.log files exists inside $ORACLE_HOME and it has sufficient privileges.
Could be SELinux issue.

I'd also check the content of that script to ensure $ORACLE_HOME value being used is what you think it is.
eg add 'set -xv' at the top of the script.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Installing Oracle 11g Database Requirements carlosinfl Linux - Server 2 12-08-2010 01:24 PM
starting oracle database in linux at startup using rc.local morad_dba Linux - Newbie 2 08-24-2010 05:03 PM
Starting MySQL automatically on Slackware 10 on system startup abtimoteo Slackware 2 09-24-2007 02:40 AM
LXer: A First Look at Oracle 11g database on Debian GNU/Linux LXer Syndicated Linux News 0 08-20-2007 02:30 AM
LXer: Oracle names 11g Database price LXer Syndicated Linux News 0 08-15-2007 01:41 AM


All times are GMT -5. The time now is 10:20 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration