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

阅读更多

今天下午安装了oracle,

在安装过程中出现了一个错误,需要在一个配置文件里添加win7对应的代码块。

过程较简单,就不详细描述了。

在用oracle sql developer新建连接的时候报错,

Listener refused the connection with the following error:
ORA-12505, TNS:listener does not currently know of SID given in connect descriptor
后来用sql plus 登录的时候发现scott用户被锁定了。
也不知道为啥就被锁定了,经过一阵子纠结在网上找到了相应的解决方法,
使用sysdba登录, sys / as sysdba
alter user scott account unlock;
alter user scott identified by tiger;
解除了了scott的锁定,并将密码修改成初始的tiger
之后再找到D:\app\Administrator\product\11.1.0\db_1\NETWORK\ADMIN
此目录下的listener.ora文件并修改

修改后:

# listener.ora Network Configuration File: /app/oracle/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 = /app/oracle/oracle/product/10.2.0/db_1)
      (PROGRAM = extproc)
    )
    (SID_DESC =
      (GLOBAL_DBNAME = ORCL)
      (ORACLE_HOME = /app/oracle/oracle/product/10.2.0/db_1)
      (SID_NAME = ORCL)
    )
  )

LISTENER =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
      (ADDRESS = (PROTOCOL = TCP)(HOST = suse10.site)(PORT = 1521))
    )
  )

 

 

你可能感兴趣的:(ORA-12505, TNS:listener does not currently know of SID given in connect descript)