ORA 12514 error:TNS listener error

荒凉一梦 提交于 2019-12-04 11:39:10

One of the reasons you get that kind of error is because database instance started before listener did. Listener must always be started first.

  1. Check if a database instance is up and running
  2. Check the output of the lsnrctl service command and see what services are registered.
  3. Check if you have SERVICE_NAME correctly specified when connecting to the instance.
  4. If it happens that database instance stared before listener did, sometimes you just need to wait a little or you can execute alter system register in order to register the instance.

For me it helped to add the following SID_DESC into the C:\oraclexe\app\oracle\product\11.2.0\server\network\ADMIN\listener.ora

SID_LIST_LISTENER =
  (SID_LIST =
    ...
    (SID_DESC =
      (SID_NAME = XE)
      (ORACLE_HOME = C:\oraclexe\app\oracle\product\11.2.0\server)
    )
  )

After restarting listener and database the access worked again.

Thanks to http://grow-n-shine.blogspot.de/2011/11/oracle-11g-xe-issue-ora-12514.html

Open SQL Plus and connect to System User:

system/p@ssword

And run two commands:

SQL> alter system set LOCAL_LISTENER='(ADDRESS=(PROTOCOL=TCP)(HOST=localhost)(PORT=1521))' scope=both;
SQL> alter system register;
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!