蒸小金瓜的做法大全:ORACLE 10G 连不上服务器,ERROR - ORA-12514: TNS: 监听程序当前无法识别连接描述符中请求的服务

来源:百度文库 编辑:九乡新闻网 时间:2024/04/29 04:42:23
前些天装好ORACLE 正常使用,但是今天启动连不上了, TNSPING 也能通,sqlplus能够登陆,但是NET ASSITANT 测试不通,解决如下:

1. Open the ""/network/admin/listener.ora" file in the host,and you will see:
   SID_LIST_LISTENER =
   (SID_LIST =
     (SID_DESC =
       (SID_NAME = PLSExtProc)
       (ORACLE_HOME = D:\oracle\product\10.2.0\db_1)
       (PROGRAM = extproc)
     )
   )
2. Add the following lines after the 7th line in the above
            (SID_DESC =
       (GLOBAL_DBNAME = ORACLE)
       (ORACLE_HOME = D:\oracle\product\10.2.0\db_1)  
       (SID_NAME = ORACLE)
      )
3. At last the content of the file become to the following section:
SID_LIST_LISTENER =
   (SID_LIST =
     (SID_DESC =
       (SID_NAME = PLSExtProc)
       (ORACLE_HOME = D:\oracle\product\10.2.0\db_1)
       (PROGRAM = extproc)
     )
     (SID_DESC =
       (GLOBAL_DBNAME = ORACLE)
       (ORACLE_HOME = D:\oracle\product\10.2.0\db_1)  
       (SID_NAME = ORACLE)
      )
   )
4. Save the file and restart the TNSListener service in the host. That's OK !  我现在的监听文件# listener.ora Network Configuration File: c:\oracle\product\10.2.0\db_1\NETWORK\ADMIN\listener.ora
# Generated by Oracle configuration tools.SID_LIST_LISTENER =
  (SID_LIST =
    (SID_DESC =
      (SID_NAME = PLSExtProc)
      (ORACLE_HOME = c:\oracle\product\10.2.0\db_1)
      (PROGRAM = extproc)
    )
    (SID_DESC =
       (GLOBAL_DBNAME = orcl)
       (ORACLE_HOME = c:\oracle\product\10.2.0\db_1)  
       (SID_NAME = orcl)
      )
  )LISTENER =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
  )