连接Oracle 9i时ORA-12514: TNS: 监听进程不能解析在连接描述符中给出的 SERVICE_NAME 错误的解决

“tnsping 监听名”  没有问题 但是连接具体某一个库却报错时

解决方法:
1. 打开<OracleHome>/network/admin/listener.ora文件,找到:

   LISTENER =

  (DESCRIPTION_LIST =

    (DESCRIPTION =

      (ADDRESS_LIST =

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

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

 

      )

      (ADDRESS_LIST =

        (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC0))

      )

    )

  )

 

SID_LIST_LISTENER =

  (SID_LIST =

    (SID_DESC =

      (SID_NAME = PLSExtProc)

      (ORACLE_HOME = D:\oracle\ora92)

      (PROGRAM = extproc)

    )

     )

  )

  2. 添加:
          (SID_DESC =

       (GLOBAL_DBNAME = orcl)

       (ORACLE_HOME = D:\oracle\ora92)  

       (SID_NAME = ORCL)

     )

  3. 最后变成:

# LISTENER.ORA Network Configuration File: D:\oracle\ora92\network\admin\listener.ora

# Generated by Oracle configuration tools.

 

LISTENER =

  (DESCRIPTION_LIST =

    (DESCRIPTION =

      (ADDRESS_LIST =

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

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

 

      )

      (ADDRESS_LIST =

        (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC0))

      )

    )

  )

 

SID_LIST_LISTENER =

  (SID_LIST =

    (SID_DESC =

      (SID_NAME = PLSExtProc)

      (ORACLE_HOME = D:\oracle\ora92)

      (PROGRAM = extproc)

    )

    (SID_DESC =

       (GLOBAL_DBNAME = orcl)

       (ORACLE_HOME = D:\oracle\ora92)  

       (SID_NAME = ORCL)

     )

  )

 

你可能感兴趣的:(ORA-12514)