ORA-12514 :Oracle 10g 连接时问题彻底解决小记

刚在win7 上装了Oracle10g(10.2.0.3) ,安装成功后,用plsql进行登录,却报ORA-12514错误,查看oracle服务和监听服务,2个服务都启动了。

这个问题一般都是监听文件配置有问题,解决如下:

\network\ADMIN下找到 listener.ora 文件,将里边的主机改成127.0.0.1

在原有文件上修改如下:(红字部分为新添加的)

 

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 = ORCL)
       (ORACLE_HOME = D:\oracle\product\10.2.0\db_1) 
       (SID_NAME = ORCL)
    )

  )

LISTENER =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
    )
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = TCP)(HOST = 127.0.0.1)(PORT = 1521))
    )
  )

 

注意以上 红字部分为添加的内容,蓝色部分要注意根据本机实际情况进行修改; 修改完后,最后重启监听服务即可。

若还是不行的话,哥再给你说下,看看xxx\dbhome_1\network\admin\tnsnames.ora 这个文件,再最后加上红字部分,然后重启服务,就ok啦:

# tnsnames.ora Network Configuration File: D:\database\oracle\product\11.2.0\dbhome_1\network\admin\tnsnames.ora
# Generated by Oracle configuration tools.

ORACLR_CONNECTION_DATA =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
    )
    (CONNECT_DATA =
      (SID = CLRExtProc)
      (PRESENTATION = RO)
    )
  )

ORCL =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = WIN-IDNE5IVCU5E)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = orcl)
    )
  )

如果最后还是搞不定,那就来个痛快,把监听全部删掉,记得在 注册表 里把监听也干掉,然后利用net configured 进行重新配置监听,配置完检查下上边提到的红色部分。就没问题啦!

你可能感兴趣的:(SQL,语言艺术)