How Do I Start Oracle Service in UNIX or Linux?

I am using a Solaris UNIX based server. How can I start a Oracle service / server in UNIX from a shell prompt? How can I start and stop Oracle database on a Linux based server?

In order to start Oracle service in a UNIX or Linux based system you need to login as a Oracle user. [donotprint]
Tutorial details
DifficultyEasy (rss)
Root privilegesNo
RequirementsNone
Time5m
[/donotprint]

ADVERTISEMENTS

How To Startup Oracle Database on a Unix/Linux

Use the su - username command to login as oracle user. Open the Terminal or login using ssh and type the following command to login
$ su - oracle

Start Oracle server in UNIX/Linux

Now, use the lsnrctl command to start service (usually located at /home/oracle/oracle/product/10.2.0/db_1/bin directory):
$ lsnrctl start
Next start database:
$ dbstart
If above is not working try to login as sysdba:
$ sqlplus '/ as sysdba'
At SQL> type startup command:

SQL> startup

Stop Oracle service in UNIX/Linux

To stop Oracle service type following two commands:
$ lsnrctl stop
$ dbshut

If above failed login as sysdba user:
$ sqlplus '/ as sysdba'
At SQL> type shutdown command:

SQL> shutdown

See “Stopping and Starting Oracle Software” for information.

🐧 Get the latest tutorials on SysAdmin, Linux/Unix, Open Source/DevOps topics:
CategoryList of Unix and Linux commands
File Managementcat
FirewallCentOS 8 OpenSUSE RHEL 8 Ubuntu 16.04 Ubuntu 18.04 Ubuntu 20.04
Network Utilitiesdig host ip nmap
OpenVPNCentOS 7 CentOS 8 Debian 10 Debian 8/9 Ubuntu 18.04 Ubuntu 20.04
Package Managerapk apt
Processes Managementbg chroot cron disown fg jobs killall kill pidof pstree pwdx time
Searchinggrep whereis which
User Informationgroups id lastcomm last lid/libuser-lid logname members users whoami who w
WireGuard VPNCentOS 8 Debian 10 Firewall Ubuntu 20.04

ADVERTISEMENTS
19 comments… add one
  • Carros Brasília Jun 2, 2008 @ 17:21

    I’m traying to start oracle but it is consuming 90% of a quad core server.
    Any tip to solve this problem?

  • Markus Jun 5, 2008 @ 19:09

    I ran these commands in Fedora 9 (Oracle 11g), but it’s saying:

    ORACLE_HOME_LISTNER is not SET, unable to auto-start Oracle Net Listener
    Usage: /u01/app/oracle/product/11.1.0/db_1/bin/dbstart ORACLE_HOME

  • shrish awasthi Apr 5, 2009 @ 7:18

    hi
    i am a system eng. and i missing some script so plz let me know i have a linur server and 10g 0racle databasse and its for flight information display system so i add a new display system and configured it after that i used a commend cd /solids/Disckonmodule/UPT_TFT then enter
    after that i update the that one tft who is new one
    #./TFTupd.sh PDD011 whatever name but display not come and befour it i updated same type display

    so plz help me
    thanks and waiting fo rrespons

  • Mohammed Arif Sep 16, 2009 @ 16:40

    su – oracle

    It is saying su-oracle not found. Please help in this.

    • yogendra Nov 12, 2013 @ 5:23

      First make oracle user and also add this user to group.

  • Mohammed Arif Sep 16, 2009 @ 19:01

    # su – oracle

    I enter the above su – oracle in # prompt. then it’s giving message like this

    3004-500 User “oracle” does not exist.

    • Anonymous May 12, 2010 @ 12:17

      means your id your id in not in that group or may not in sudo fentry.

    • wmohs May 12, 2010 @ 12:19

      hi
      this means your id is not under oracle group or may be not in sudo entry.

  • Mohammed Arif Sep 17, 2009 @ 20:52

    Thanks for this site. I got some help from this site. Last time I got error, I enter su – oracle.
    Later I found the oracle installed oracle8 directory. su – oracle8 it success. Working fine.
    Thanks.

  • rakesh Jan 6, 2011 @ 0:23

    su -oracle
    Here oracle is a user.
    you need to create a oracle user first,then try the above command,it works

  • rohit Jul 28, 2012 @ 15:23

    i m trying to connect with oracle
    su – oracle
    -bash-3.00$
    what can i do ?give this error..

  • vasu Sep 17, 2012 @ 8:08

    Hi rohit,you r in oracle promt.but os shaows bash promt.dont worry about in that issue.already u r in oracle promt.

  • artificer Jul 10, 2014 @ 15:48

    for the above procedure to work the environments variables should be set. (oraenv)

  • samuel Jul 30, 2014 @ 11:06

    Great article, thanks

  • J-Sequeiros Dec 18, 2014 @ 17:15

    Manual is especially good for those who want to learn the management of a database in oracle

  • Mohammed Dec 31, 2014 @ 13:38

    in my office Oracle dataBase and Oracle Application enable to start.can anyone tell me how to start And Stop the Oracle service in Linux O/S .its very Urgent. Do the needful .Thanks

  • sQze Sep 17, 2015 @ 16:52

    Maybe “service oracle-xe restart”

  • surya Jan 8, 2016 @ 20:02

    Hello,
    Thanks for this article.
    i have a doubt..?
    i’m able to start and stop by logging to oracle but my doubt is that when it got created after installing oracle ?

  • sanam Apr 1, 2017 @ 12:33

    i m new to linux can somebody help me out how to start oracle dba (12g m using) through shell script and m using bourne shell only, in ubuntu os.

Leave a Reply

Your email address will not be published.

Use HTML <pre>...</pre>, <code>...</code> and <kbd>...</kbd> for code samples.