Restart Oracle database under Linux

Source: Internet
Author: User
Tags sqlplus

Restart the Oracle database and listener under Linux:


Method 1:

Log in to Linux with root SSH and open the terminal to enter the following command:

CD $ORACLE _home #进入到oracle的安装目录
Dbstart #重启服务器
Lsnrctl Start #重启监听器
CD $ORACLE _home #进入到oracle的安装目录
Dbstart #重启服务器
Lsnrctl Start #重启监听器

-----------------------------------

Method 2:

SQL code

CD $ORACLE _home/bin #进入到oracle的安装目录
./dbstart #重启服务器
./lsnrctl Start #重启监听器

-----------------------------------

Method 3:

(1) Log in to the database as Oracle, command: su–oracle
(2) Enter Sqlplus console, command: Sqlplus/nolog
(3) Login with system Administrator, command: Connect/as sysdba
(4) Start the database, command: Startup
(5) If the database is closed, command: Shutdown immediate
(6) Exit Sqlplus Console, command: Exit
(7) Enter the Listener console, command: LSNRCTL
(8) Start Listener, command: Start
(9) Exit the Listener console, command: Exit
(10) Restart database end

-----------------------------------

Method 4: (self-written script)

1) Startup script (dbstart.sh)

Lsnrctl start
Sqlplus/nolog <<eof
Connect/as SYSDBA
Startup
Exit
Eof

$sh dbstart.sh can

----------

2) Close script (dbstop.sh)

Lsnrctl stop
Sqlplus/nolog <<eof
Connect/as SYSDBA
Shutdown immediate;
Exit
Eof

$sh dbstop.sh can


===============================================


$ su-oracle
$ lsnrctl Stop
$ sqlplus "/as sysdba"
sql> shutdown immediate;
Sql> quit
$ lsnrctl Start
$ sqlplus/nolog
Sql> Connect/as SYSDBA
Sql> startup;


===============================================


There are two main steps in Linux to start Oracle: One is to start the listener, the other is to launch the instance (generally forget this step), the specific commands are as follows, to provide you with reference:

1: Connect the server
Telnet IP

2: Enter Admin user and password
User-name:oracle
Password:oracle

3: Enter the Oracle root directory
CD $ORACLE _home/bin

4: Enter the monitor
./lsnrctl

5: Start Listener
Start

6: Exit Monitoring
Exit

7: Enter Sqlplus
Sqlplus/nolog

8: Connect using administrator
Connect as Sysdba

9: Enter user and password
User-name:oracle
Password:oracle

10: Start Oracle Instance
Startup


Restart Oracle database under Linux

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.