Oracle 服务器启后,使用Toad 客户端连接oracle 时候,遇到下面的错误:
oracle ORA-12514: TNS: no listener
TNS: listener does not currently know of SID give in connect descriptor
第一步:启动TNS监听
[oracle@oracle ~]$ lsnrctl start
LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 06-AUG-2014 20:07:41
Copyright (c) 1991, 2009, Oracle. All rights reserved.
Starting /opt/oracle/11g/bin/tnslsnr: please wait...
TNSLSNR for Linux: Version 11.2.0.1.0 - Production
System parameter file is /opt/oracle/11g/network/admin/listener.ora
Log messages written to /opt/oracle/diag/tnslsnr/oracle/listener/alert/log.xml
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(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 06-AUG-2014
20:07:43
Uptime 0 days 0 hr. 0
min. 0 sec
Trace Level
off
Security ON: Local OS
Authentication
SNMP OFF
Listener Parameter File /opt/oracle/11g/network/admin/listener.ora
Listener Log File /opt/oracle/diag/tnslsnr/oracle/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=1521)))
The listener supports no services
The command completed successfully
第二步:启动数据库
[oracle@oracle ~]$ startup (正常启动数据库)
或
[oracle@oracle ~]$ startup (强制关闭数据库+ 正常启动数据库)