Home  >  Article  >  Backend Development  >  How to start Oracle under Linux

How to start Oracle under Linux

零到壹度
零到壹度Original
2018-03-27 13:08:458422browse

This article mainly shares with you how to start Oracle under Linux, hoping to help everyone.

1. Steps to start Oracle

Starting Oracle under Linux is divided into the following two steps:

  • 1.1. Start lsnrctl monitoring.

  • #1.2. Start the database instance.

2. Start oracle monitoring

First log in to the server and switch to oracle user.

<span style="font-family: 微软雅黑, "Microsoft YaHei"; font-size: 14px;">[admin@dataserver ~]$ su - oracle<br/>密码:<br/>[oracle@dataserver ~]$<br/></span>

How to start Oracle under Linux

Next, check the running status of the oracle listener and view it through the lsnrctl status command.

If the oracle monitoring is not started, execute the following to start monitoring, pass the command lsnrctl start, the results are as follows:

How to start Oracle under Linux
Above The feedback is that the monitoring startup failed because the IP 30.85.227.24 it is monitoring is not the IP of the server, so this IP needs to be adjusted to the current IP of the server.

Under the oracle user, enter the directory /u01/app/oracle/product/11.2.0/dbhome_1/network/admin and modify the listener.ora file. Note that this directory varies depending on the specific server.
How to start Oracle under Linux

listener.ora file opens. The content is as follows. Just adjust the HOST IP in it.

After adjusting the listening IP, restart the listener and execute lsnrctl start

At this point, the oracle listener is started successfully!

How to start Oracle under Linux

3. Start the oracle instance

Log in to oracle as the system user

<span style="font-family: 微软雅黑, "Microsoft YaHei"; font-size: 14px;">[oracle@dataserver admin]$ sqlplus /nolog<br/><br/>SQL*Plus: Release 11.2.0.1.0 Production on 星期五 4月 15 15:23:04 2016<br/>Copyright (c) 1982, 2009, Oracle.  All rights reserved.<br/><br/>SQL> conn as sysdba<br/>Enter user-name: system<br/>Enter password: <br/>Connected to an idle instance.0<br/></span>

Then start the instance through the startup command:

<span style="font-family: 微软雅黑, "Microsoft YaHei"; font-size: 14px;">SQL> startup<br/>ORACLE instance started.<br/><br/>Total System Global Area 4.0620E+10 bytes<br/>Fixed Size          2216024 bytes<br/>Variable Size        2.3354E+10 bytes<br/>Database Buffers     1.7180E+10 bytes<br/>Redo Buffers           84054016 bytes<br/>Database mounted.<br/>Database opened.<br/>SQL> <br/><br/></span>

4. Close the oracle instance

Through shutdown Command to shut down the oracle instance.

<span style="font-family: 微软雅黑, "Microsoft YaHei"; font-size: 14px;">SQL> shutdown<br/>Database closed.<br/>Database dismounted.<br/>ORACLE instance shut down.<br/>SQL> <br/></span>

           

The above is the detailed content of How to start Oracle under Linux. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn