Linux下启动oracle_无名小仙男

  1. 切换到oracle用户: su - oracle
  2. 进入sqlplus控制台:sqlplus /nolog;
  3. 以系统管理员登录:connect / as sysdba;
  4. 启动数据库:startup
  5. exit退出sqlplus控制台,然后进入监听控制器:lsnrctl
  6. 启动监听:start
  7. exit退出监听控制器

演示示例:

[root@pppCentos ~]# su - oracle
[oracle@pppCentos ~]$ sqlplus /nolog

SQL*Plus: Release 11.2.0.3.0 Production on Thu Jul 26 08:27:49 2018

Copyright (c) 1982, 2011, Oracle.  All rights reserved.

SQL> connect / as sysdba;
Connected to an idle instance.
SQL> startup
ORACLE instance started.

Total System Global Area 3023110144 bytes
Fixed Size          2232192 bytes
Variable Size        2197815424 bytes
Database Buffers      805306368 bytes
Redo Buffers           17756160 bytes
Database mounted.
Database opened.
SQL> lsnrctl             
SP2-0042: unknown command "lsnrctl" - rest of line ignored.
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
[oracle@pppCentos ~]$ lsnrctl

LSNRCTL for Linux: Version 11.2.0.3.0 - Production on 26-JUL-2018 08:29:34

Copyright (c) 1991, 2011, Oracle.  All rights reserved.

Welcome to LSNRCTL, type "help" for information.

LSNRCTL> start
Starting /home/oracle/app/oracle/product/11.2.0/dbhome_1/bin/tnslsnr: please wait...

TNSLSNR for Linux: Version 11.2.0.3.0 - Production
System parameter file is /home/oracle/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
Log messages written to /home/oracle/app/diag/tnslsnr/pppCentos/listener/alert/log.xml
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=pppCentos)(PORT=1521)))
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=pppCentos)(PORT=1521)))
TNS-12535: TNS:operation timed out
 TNS-12560: TNS:protocol adapter error
  TNS-00505: Operation timed out

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 11.2.0.3.0 - Production
Start Date                26-JUL-2018 08:30:41
Uptime                    0 days 0 hr. 1 min. 3 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /home/oracle/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
Listener Log File         /home/oracle/app/diag/tnslsnr/pppCentos/listener/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=pppCentos)(PORT=1521)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
Services Summary...
Service "orcl" has 1 instance(s).
  Instance "orcl", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully
LSNRCTL> exit
[oracle@pppCentos ~]$ exit
logout
[root@pppCentos ~]# 
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值