数据库IP地址是192.168.56.3$tnsping paimaryTNS Ping Utility for Linux: Version 11.2.0.1.0 - Production on 14-OCT-2011 10:53:29Copyright (c) 1997, 2009, Oracle.  All rights reserved.Used parameter files:TNS-03505: Failed to resolve name
listener.ora文件
 cat listener.ora
# listener.ora Network Configuration File: /u01/app/oracle/product/11.2.0.1/db_1/network/admin/listener.ora
# Generated by Oracle configuration tools.SID_LIST_LISTENER =
  (SID_LIST = 
    (SID_DESC =
      (SID_NAME = PLSExtProc)
      (ORACLE_HOME = /u01/app/oracle/product/11.2.0.1/db_1)
      (PROGRAM = extproc)
    )
    (SID_DESC =
      (GLOBAL_DBNAME = orcl)
      (ORACLE_HOME =  /u01/app/oracle/product/11.2.0.1/db_1)
      (SID_NAME = orcl)
    ) 
  )   
    
LISTENER =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.56.3)(PORT = 1521))
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC0))
    )
  )
tnsname.ora 文件
 cat tnsname.ora 
#tnsnames.ora Network Configuration File: /u01/app/oracle/product/11.2.0.1/db_1/network/admin/tnsnames.ora
# Generated by Oracle configuration tools.
PRIMARY =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.56.3)(PORT = 1521))
    )
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = orcl)
    )
  )ORCL =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.56.2)(PORT = 1521))
    )
    (CONNECT_DATA =
      (SERVICE_NAME = orcl)
    )
  )EXTPROC_CONNECTION_DATA =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC0))
    )
    (CONNECT_DATA =
      (SID = PLSExtProc)
      (PRESENTATION = RO)
    )
  )状态
[oracle@dbs admin]$ lsnrctl statusLSNRCTL for Linux: Version 11.2.0.1.0 - Production on 14-OCT-2011 10:54:56Copyright (c) 1991, 2009, Oracle.  All rights reserved.Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.56.3)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 11.2.0.1.0 - Production
Start Date                14-OCT-2011 10:32:49
Uptime                    0 days 0 hr. 22 min. 6 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /u01/app/oracle/product/11.2.0.1/db_1/network/admin/listener.ora
Listener Log File         /u01/app/oracle/diag/tnslsnr/dbs/listener/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.56.3)(PORT=1521)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC0)))
Services Summary...
Service "PLSExtProc" has 1 instance(s).
  Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
Service "orcl" has 1 instance(s).
  Instance "orcl", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully然后是自己ping自己
$ping 192.168.56.3
PING 192.168.56.3 (192.168.56.3) 56(84) bytes of data.
64 bytes from 192.168.56.3: icmp_seq=1 ttl=64 time=0.186 ms
64 bytes from 192.168.56.3: icmp_seq=2 ttl=64 time=0.096 ms求那位大仙能帮忙看看为什么

解决方案 »

  1.   

    TNS-03505 Failed to resolve nameCause: The service name you provided could not be found in TNSNAMES.ORA, an Oracle Names server, or a native naming service.Action: Verify that you entered the service name correctly. You may need to ensure that the name was entered correctly into the network configuration.
      

  2.   


    你这回复的太不负责任了查oerr我也会
      

  3.   

    监听检查一下,还要看一下/etc/hosts 里name ip