Linux start oracle as a service

Starting Oracle database server is very easy on Linux oses. You need to following steps to start oracle as a service:

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

Here are all 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 chkconfig command to add script:

# chkconfig --add oracle
# chkconfig --list oracle

Please note that you can just use script directly, to start Oracle type command:

# /etc/init.d/oracle start

To stop Oracle type command:

# /etc/init.d/oracle stop

Want to read Linux tips and tricks, but don't have time to check our blog everyday? Subscribe to our daily email newsletter to make sure you don't miss a single tip/tricks. Subscribe to our weekly newsletter here!

{ 3 comments… read them below or add one }

1 gokalp 05.07.08 at 10:56 am

Thanks a lot

2 abid mirza 02.20.09 at 10:00 am

i did worked, thanks a lot

3 amit 04.16.09 at 12:06 pm

it’s working..
thanks a lot..

Leave a Comment

You can use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Previous post: How do I list files inside compressed tar ball (gzip’d tar’d) archive?

Next post: Howto: Linux Add User To Group