ORA-12505解决办法

第一次用的时候一点问题都没有,后来把oracleservice和listening两个服务停掉之后再用就出现:

ORA-12505, TNS:listener does not currently know of SID given in connect descriptor

 

 

解决办法是修改D:\app\Administrator\product\11.1.0\db_1\NETWORK\ADMIN下的listener.ora

改成:

 

# listener.ora Network Configuration File: d:\app\Administrator\product\11.1.0\db_1\network\admin\listener.ora
# Generated by Oracle configuration tools.

SID_LIST_LISTENER =
  (SID_LIST =
    (SID_DESC =
      (SID_NAME = PLSExtProc)
      (ORACLE_HOME = D:\app\Administrator\product\11.1.0\db_1)
      (PROGRAM = extproc)
    )
    (SID_DESC =
      (GLOBAL_DBNAME = orcl)
      (ORACLE_HOME = D:\app\Administrator\product\11.1.0\db_1)
      (SID_NAME = orcl)
    )
  )
LISTENER =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
      (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
    )
  )

 

重启oracleservice和listening两个服务即可。

你可能感兴趣的:(oracle循序渐进)