oracle 监听ORA-12514错误

问题:ORA-12514: TNS:listener does not currently know of service requested in connect descriptor

发现/opt/oracle/Oracle/oracle11g/product/11.2.0/dbhome_1/network/admin 的几个ora文件没有配置,如果配置好了查看lsnrcst status的话可以看到相关的实例,于是需要对几个文件做一些配置:

tnsnames.ora

WEBGPS3 =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = ubuntu)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = webgps3)
    )   
  )

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


listener.ora

LISTENER =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = TCP)(HOST = ubuntu)(PORT = 1521))
    )   
  )

ADR_BASE_LISTENER = /opt/oracle/Oracle/oracle11g

sqlnet.ora

NAMES.DIRECTORY_PATH= (TNSNAMES, EZCONNECT)

ADR_BASE = /opt/oracle/Oracle/oracle11g


再重启一下监听和数据库,并且查看一下.bashrc文件中ora_sid是否填写正确,再到sqlplus中登陆,这样应该可以登陆成功了




你可能感兴趣的:(oracle 监听ORA-12514错误)