linux – oracle lsnrctl TNS-12545:连接失败,因为目标主机或对象不存在

前端之家收集整理的这篇文章主要介绍了linux – oracle lsnrctl TNS-12545:连接失败,因为目标主机或对象不存在前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我正在尝试连接到我的oracle数据库.我无法让听众开始.这是我尝试过的.

$lsnrctl start

  1. LSNRCTL for Linux: Version 10.2.0.4.0 - Production on 20-JAN-2012 08:19:58
  2.  
  3. Copyright (c) 1991,2007,Oracle. All rights reserved.
  4.  
  5. Starting /u01/app/oracle/product/10.2.0/db_1/bin/tnslsnr: please wait...
  6.  
  7. TNSLSNR for Linux: Version 10.2.0.4.0 - Production
  8. Log messages written to /u01/app/oracle/product/10.2.0/db_1/network/log/listener.log
  9. Error listening on: (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
  10. TNS-12545: Connect Failed because target host or object does not exist
  11. TNS-12560: TNS:protocol adapter error
  12. TNS-00515: Connect Failed because target host or object does not exist

$cat ./admin/tnsnames.ora

  1. # TNSNAMES.ORA Network Configuration File:
  2. # /u01/app/oracle/product/10.2.0/db_1/network/admin/tnsnames.ora
  3. #
  4.  
  5. EXTPROC_CONNECTION_DATA.test =
  6. (DESCRIPTION =
  7. (ADDRESS_LIST =
  8. (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC))
  9. )
  10. (CONNECT_DATA =
  11. (SID = DEVDB)
  12. (PRESENTATION = RO)
  13. )
  14. )
  15.  
  16. DEVDB =
  17. (DESCRIPTION =
  18. (ADDRESS_LIST =
  19. (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
  20. )
  21. (CONNECT_DATA =
  22. (SERVICE_NAME = DEVDB.test)
  23. )
  24. )
  25.  
  26. DEBDB.test =
  27. (DESCRIPTION =
  28. (ADDRESS_LIST =
  29. (ADDRESS = (PROTOCOL = TCP)(HOST = DEVDB.test)(PORT = 1521))
  30. )
  31. (CONNECT_DATA =
  32. (SERVICE_NAME = DEVDB.test)
  33. )
  34. )

$hostname
test

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

  1. $lsnrctl start
  2.  
  3. LSNRCTL for Linux: Version 10.2.0.4.0 - Production on 20-JAN-2012 11:38:51
  4.  
  5. Copyright (c) 1991,Oracle. All rights reserved.
  6.  
  7. Starting /u01/app/oracle/product/10.2.0/db_1/bin/tnslsnr: please wait...
  8.  
  9. TNSLSNR for Linux: Version 10.2.0.4.0 - Production
  10. Log messages written to /u01/app/oracle/product/10.2.0/db_1/network/log/listener.log
  11. Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=oracletest)(PORT=1521)))
  12.  
  13. Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
  14. STATUS of the LISTENER
  15. ------------------------
  16. Alias LISTENER
  17. Version TNSLSNR for Linux: Version 10.2.0.4.0 - Production
  18. Start Date 20-JAN-2012 11:38:51
  19. Uptime 0 days 0 hr. 0 min. 0 sec
  20. Trace Level off
  21. Security ON: Local OS Authentication
  22. SNMP OFF
  23. Listener Log File /u01/app/oracle/product/10.2.0/db_1/network/log/listener.log
  24. Listening Endpoints Summary...
  25. (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=oracletest)(PORT=1521)))
  26. The listener supports no services
  27. The command completed successfully

解决方法

你的listener.ora中有空HOST =.我会把它编辑为HOST = my.ip.address.如果应用程序在同一主机上,即使HOST = 127.0.0.1也可以.您之前是否正确运行过netca(建议初学者使用)?

猜你在找的Linux相关文章