我的操作是安装oracle之后、尝试连接
[oracle@linux64 ~]$ sqlplus / as sysdba
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL>
SQL>
SQL>
SQL> set linesize 2000;
SQL> select * from v$instance;
INSTANCE_NUMBER INSTANCE_NAME HOST_NAME VERSION STARTUP_TIME STATUS PAR THREAD# ARCHIVE LOG_SWITCH_WAIT LOGINS SHU DATABASE_STATUS INSTANCE_ROLE ACTIVE_ST BLO
1 trade linux64 11.2.0.1.0 05-SEP-15 OPEN NO 1 STOPPED ALLOWED NO ACTIVE PRIMARY_INSTANCE NORMAL NO
通过这个查询 应该说明我库应该是配置了,监听也起来了、我想试着重启一下监听。就先查看了下监听的状态、然后stop监听、再start 监听就起不来了
ORACLE安装完成后直接查看监听状态
[oracle@linux64 ~]$ lsnrctl status
LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 05-SEP-2015 19:27:02
Copyright (c) 1991, 2009, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))
STATUS of the LISTENER
Alias LISTENER
Version TNSLSNR for Linux: Version 11.2.0.1.0 - Production
Start Date 05-SEP-2015 18:58:31
Uptime 0 days 0 hr. 28 min. 31 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /home/oracle/oracle/product/11R2/network/admin/listener.ora
Listener Log File /home/oracle/oracle/diag/tnslsnr/linux64/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=linux64)(PORT=1521)))
Services Summary...
Service "trade" has 1 instance(s).
Instance "trade", status READY, has 1 handler(s) for this service...
Service "tradeXDB" has 1 instance(s).
Instance "trade", status READY, has 1 handler(s) for this service...
The command completed successfully
关闭监听
[oracle@linux64 ~]$ lsnrctl stop
LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 05-SEP-2015 19:27:35
Copyright (c) 1991, 2009, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))
The command completed successfully
再次打开监听
[oracle@linux64 ~]$ lsnrctl start
LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 05-SEP-2015 19:27:40
Copyright (c) 1991, 2009, Oracle. All rights reserved.
Starting /home/oracle/oracle/product/11R2/bin/tnslsnr: please wait...
TNSLSNR for Linux: Version 11.2.0.1.0 - Production
System parameter file is /home/oracle/oracle/product/11R2/network/admin/listener.ora
Log messages written to /home/oracle/oracle/diag/tnslsnr/linux64/listener/alert/log.xml
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=linux64)(PORT=1521)))
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))
STATUS of the LISTENER
Alias LISTENER
Version TNSLSNR for Linux: Version 11.2.0.1.0 - Production
Start Date 05-SEP-2015 19:27:40
Uptime 0 days 0 hr. 0 min. 0 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /home/oracle/oracle/product/11R2/network/admin/listener.ora
Listener Log File /home/oracle/oracle/diag/tnslsnr/linux64/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=linux64)(PORT=1521)))
The listener supports no services
The command completed successfully
----再次查看监听状态
[oracle@linux64 ~]$ lsnrctl status
LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 05-SEP-2015 19:27:44
Copyright (c) 1991, 2009, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))
STATUS of the LISTENER
Alias LISTENER
Version TNSLSNR for Linux: Version 11.2.0.1.0 - Production
Start Date 05-SEP-2015 19:27:40
Uptime 0 days 0 hr. 0 min. 4 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /home/oracle/oracle/product/11R2/network/admin/listener.ora
Listener Log File /home/oracle/oracle/diag/tnslsnr/linux64/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=linux64)(PORT=1521)))
The listener supports no services
The command completed successfully
[oracle@linux64 ~]$ lsnrctl status
LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 05-SEP-2015 19:27:47
Copyright (c) 1991, 2009, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))
STATUS of the LISTENER
Alias LISTENER
Version TNSLSNR for Linux: Version 11.2.0.1.0 - Production
Start Date 05-SEP-2015 19:27:40
Uptime 0 days 0 hr. 0 min. 7 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /home/oracle/oracle/product/11R2/network/admin/listener.ora
Listener Log File /home/oracle/oracle/diag/tnslsnr/linux64/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=linux64)(PORT=1521)))
The listener supports no services
The command completed successfully
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。