我正在尝试连接到我的oracle数据库.我无法让听众开始.这是我尝试过的.

$lsnrctl start

LSNRCTL for Linux: Version 10.2.0.4.0 - Production on 20-JAN-2012 08:19:58

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

Starting /u01/app/oracle/product/10.2.0/db_1/bin/tnslsnr: please wait...

TNSLSNR for Linux: Version 10.2.0.4.0 - Production

Log messages written to /u01/app/oracle/product/10.2.0/db_1/network/log/listener.log

Error listening on: (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))

TNS-12545: Connect Failed because target host or object does not exist

TNS-12560: TNS:protocol adapter error

TNS-00515: Connect Failed because target host or object does not exist

$cat ./admin/tnsnames.ora

# TNSNAMES.ORA Network Configuration File:

# /u01/app/oracle/product/10.2.0/db_1/network/admin/tnsnames.ora

#

EXTPROC_CONNECTION_DATA.test =

(DESCRIPTION =

(ADDRESS_LIST =

(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC))

)

(CONNECT_DATA =

(SID = DEVDB)

(PRESENTATION = RO)

)

)

DEVDB =

(DESCRIPTION =

(ADDRESS_LIST =

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

)

(CONNECT_DATA =

(SERVICE_NAME = DEVDB.test)

)

)

DEBDB.test =

(DESCRIPTION =

(ADDRESS_LIST =

(ADDRESS = (PROTOCOL = TCP)(HOST = DEVDB.test)(PORT = 1521))

)

(CONNECT_DATA =

(SERVICE_NAME = DEVDB.test)

)

)

$hostname

test

以下是在具有类似设置的其他计算机上成功启动的示例.没有listner.ora文件只是tnsnames.ora.

$lsnrctl start

LSNRCTL for Linux: Version 10.2.0.4.0 - Production on 20-JAN-2012 11:38:51

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

Starting /u01/app/oracle/product/10.2.0/db_1/bin/tnslsnr: please wait...

TNSLSNR for Linux: Version 10.2.0.4.0 - Production

Log messages written to /u01/app/oracle/product/10.2.0/db_1/network/log/listener.log

Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=oracletest)(PORT=1521)))

Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))

STATUS of the LISTENER

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

Alias LISTENER

Version TNSLSNR for Linux: Version 10.2.0.4.0 - Production

Start Date 20-JAN-2012 11:38:51

Uptime 0 days 0 hr. 0 min. 0 sec

Trace Level off

Security ON: Local OS Authentication

SNMP OFF

Listener Log File /u01/app/oracle/product/10.2.0/db_1/network/log/listener.log

Listening Endpoints Summary...

(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=oracletest)(PORT=1521)))

The listener supports no services

The command completed successfully

Logo

魔乐社区(Modelers.cn) 是一个中立、公益的人工智能社区,提供人工智能工具、模型、数据的托管、展示与应用协同服务,为人工智能开发及爱好者搭建开放的学习交流平台。社区通过理事会方式运作,由全产业链共同建设、共同运营、共同享有,推动国产AI生态繁荣发展。

更多推荐