打开SQL*plus时出现无监听程序怎么办?

打开SQL*plus时出现无监听程序怎么办?,第1张

先看是什么系统,windows 的话 看看监听服务有没有启动,linux 或unix shell 下用 lsnrctl start 尝试一下看能不能启动监听 , 上述没用的话 用netca重新配置一下监听

服务器

[oracle@ghy-database-test ~]$ lsnrctl stop

LSNRCTL for Linux: Version 12.1.0.2.0 - Production on 22-SEP-2014 16:39:35

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

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=ghy-database-test)(PORT=1521)))

The command completed successfully

客户端

C:\Documents and Settings\Administrator>sqlplus sys/Clark3721@testdb as sysdba

SQL*Plus: Release 10.2.0.1.0 - Production on 星期一 9月 22 16:39:39 2014

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

ERROR:

ORA-12541: TNS: 无监携含李听程序

请输入用户老郑名:

服务器

[oracle@ghy-database-test ~]$ lsnrctl start

LSNRCTL for Linux: Version 12.1.0.2.0 - Production on 22-SEP-2014 16:41:04

.............................

The command completed successfully

[oracle@ghy-database-test ~]$ lsnrctl status

LSNRCTL for Linux: Version 12.1.0.2.0 - Production on 22-SEP-2014 16:41:46

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

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=ghy-database-test)(PORT=1521)))

STATUS of the LISTENER

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

Alias LISTENER

Version TNSLSNR for Linux: Version 12.1.0.2.0 - Production

Start Date22-SEP-2014 16:41:04

Uptime0 days 0 hr. 0 min. 46 sec

Trace Level off

Security ON: Local OS Authentication

SNMP OFF

Listener Parameter File /u01/app/辩迟oracle/product/12.1.2/db/network/admin/listener.ora

Listener Log File /u01/app/oracle/diag/tnslsnr/ghy-database-test/listener/alert/log.xml

Listening Endpoints Summary...

(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=ghy-database-test)(PORT=1521)))

(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))

(DESCRIPTION=(ADDRESS=(PROTOCOL=tcps)(HOST=ghy-database-test)(PORT=5500))(Security=(my_wallet_directory=/u01/app/oracle/admin/testdb/xdb_wallet))(Presentation=HTTP)(Session=RAW))

Services Summary...

Service "testdb" has 1 instance(s).

Instance "testdb", status READY, has 1 handler(s) for this service...

Service "testdbXDB" has 1 instance(s).

Instance "testdb", status READY, has 1 handler(s) for this service...

Service "testpdb1" has 1 instance(s).

Instance "testdb", status READY, has 1 handler(s) for this service...

Service "testpdb2" has 1 instance(s).

Instance "testdb", status READY, has 1 handler(s) for this service...

Service "testpdb3" has 1 instance(s).

Instance "testdb", status READY, has 1 handler(s) for this service...

Service "testpdb4" has 1 instance(s).

Instance "testdb", status READY, has 1 handler(s) for this service...

The command completed successfully

客户端

C:\Documents and Settings\Administrator>sqlplus sys/Clark3721@testdb as sysdba

SQL*Plus: Release 10.2.0.1.0 - Production on 星期一 9月 22 16:42:46 2014

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

连接到:

Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production

With the Partitioning, OLAP, Advanced Analytics and Real Application Testing opt

ions

SQL>

方法一:

在oracle_home下找到lsnrctl.exe 输入 start

方法二

可能认不到实例

在cmd下运行

set oracle_sid=自己数据库闭举的实例名(大多数尺歼orcl)

网上还有很多解决办法

也许不见得管用,这种问题具体问题具体分析比较好。介绍的这2种您的机器还不行。就去修改一个TNSNAMES.ORA。

***************************************************************

SID_LIST_LISTENER =

(SID_LIST =

(SID_DESC =

(SID_NAME = PLSExtProc)

(ORACLE_HOME = E:\oracle\product\10.2.0\db_1)

(PROGRAM = extproc)

)

(SID_DESC =

(SID_NAME = TESTDB)

(ORACLE_HOME = E:\oracle\product\10.2.0\轿困碧db_1)

)

)

LISTENER =

(DESCRIPTION_LIST =

(DESCRIPTION =

(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))

(ADDRESS = (PROTOCOL = TCP)(HOST = xyz123)(PORT = 1521))

)

)

Listener 改为上面的样子(ORACLE_SID为TESTDB,如果实际不是,自己改一下).

然后lsnrctl stop

lsnrctl start


欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/yw/12383369.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2023-05-25
下一篇 2023-05-25

发表评论

登录后才能评论

评论列表(0条)

保存