Linux Start Oracle As a Service

by Vivek Gite on March 8, 2006 · 8 comments

How do I start the Oracle database server as a service under Linux operating systems?

Starting the Oracle database server is very easy under Linux:

a) Login as an oracle user

b) First start the Oracle listener processes using lsnrctl utility

c) Next start the Oracle database using dbstart utility that reads the oratab file (/etc/oratab)

d) Connect to server using sql plus client or isql pluse web based client

Type the following commands:
$ su - oracle
$ lsnrctl start
$ dbstart

To make the entire process easy we have a shell script that starts and stops Oracle database.

Download script to /tmp directory and rename it as oracle

Copy script to /etc/init.d directory:
# cp /tmp/oracle /etc/init.d/oracle
Create a soft link (Run level 3):

# cd /etc/rc3.d/
# ln -s ../init.d/oracle S100oracle
# ln -s ../init.d/oracle K100oracle

Alternatively, use the chkconfig command to add script:
# chkconfig --add oracle
# chkconfig --list oracle

Please note that you can just use script directly, to start the Oracle type the following command:
# /etc/init.d/oracle start
To stop the Oracle type the following command:
# /etc/init.d/oracle stop

Featured Articles:

Share this with other sys admins!
Facebook it - Tweet it - Print it -

{ 8 comments… read them below or add one }

1 gokalp May 7, 2008

Thanks a lot

Reply

2 abid mirza February 20, 2009

i did worked, thanks a lot

Reply

3 amit April 16, 2009

it’s working..
thanks a lot..

Reply

4 william August 11, 2009

it works
thanks a lot!

Reply

5 Daniel September 15, 2010

The download link has been blocked.
Safe Browsing
Diagnostic page for bash.cyberciti.biz
What is the current listing status for bash.cyberciti.biz?
Site is listed as suspicious – visiting this web site may harm your computer.
Part of this site was listed for suspicious activity 3 time(s) over the past 90 days.
What happened when Google visited this site?
Of the 17 pages we tested on the site over the past 90 days, 15 page(s) resulted in malicious software being downloaded and installed without user consent. The last time Google visited this site was on 2010-09-14, and the last time suspicious content was found on this site was on 2010-09-14.
Malicious software is hosted on 1 domain(s), including superstoreviagra.com/.
1 domain(s) appear to be functioning as intermediaries for distributing malware to visitors of this site, including simplyguide.com/.
This site was hosted on 1 network(s) including AS36351 (SOFTLAYER).
Has this site acted as an intermediary resulting in further distribution of malware?
Over the past 90 days, bash.cyberciti.biz did not appear to function as an intermediary for the infection of any sites.
Has this site hosted malware?
No, this site has not hosted malicious software over the past 90 days.
How did this happen?
In some cases, third parties can add malicious code to legitimate sites, which would cause us to show the warning message.
Could you please fix it?
Thank you.

Reply

6 Vivek Gite September 15, 2010

This has been already fixed, but Google will take day or two to remove the same. Try wget.

wget http://bash.cyberciti.biz/dl/122.sh.zip

HTH

Reply

7 bill October 20, 2010

cheers. was very helpful.
on RHEL5U4.
Can you explain what the

# set username
SUSER=”suser”
# set password
SPASS=”spass”

are for?

Reply

8 clinton fisher November 18, 2010

thank you for the script.
do i need to modify the script to use it in Ubuntu 10.10 Desktop , Debian base

Reply

Leave a Comment

You can use these HTML tags and attributes for your code and commands: <strong> <em> <ol> <li> <u> <ul> <blockquote> <pre> <a href="" title="">
What is 6 + 4 ?
Please leave these two fields as-is:
Solve the simple math so we know that you are a human and not a bot.




Previous post:

Next post: