Windows7旗舰版安装PLSQLDeveloper连接数据库遇到:ora-12514 问题和ORA-12545:因目标主机或对象不存在,连接失败”解决方法

时间:2022-09-02 06:29:23

1、 解决ora-12514 问题

找到F:\oracle\product\10.2.0\db_1\NETWORK\ADMIN目录下的tnsnames.ora文件

将如下内容替换tnsnames.ora文件内容:

# tnsnames.ora Network Configuration File:F:\oracle\product\10.2.0\db_1\network\admin\tnsnames.ora

# Generated by Oracle configuration tools.

ORCL =

(DESCRIPTION =

   (ADDRESS = (PROTOCOL = TCP)(HOST = Win7-PC)(PORT = 1521))

   (CONNECT_DATA =

     (SERVER = DEDICATED)

     (SERVICE_NAME = orcl)

    )

  )

EXTPROC_CONNECTION_DATA =

(DESCRIPTION =

   (ADDRESS_LIST =

     (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))

    )

   (CONNECT_DATA =

     (SID = PLSExtProc)

     (PRESENTATION = RO)

    )

  )

替换完后重启oracle服务

ORA-12545:因目标主机或对象不存在,连接失败”问题的解决

F:\oracle\product\10.2.0\db_1\NETWORK\ADMIN目录下找到listenner.ora文件

将内容做如下替换:

# listener.ora Network Configuration File:F:\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 = ORCL)

     (ORACLE_HOME = F:\oracle\product\10.2.0\db_1)

     (PROGRAM = extproc)

    )

  )

LISTENER =

(DESCRIPTION_LIST =

   (DESCRIPTION =

     (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))

     (ADDRESS = (PROTOCOL = TCP)(HOST = Win7-PC)(PORT = 1521))

    )

  )

替换完后重启oracle服务和监听服务