PL/SQL连接Oracle错误:ORA-12514、ORA-01034、ORA-27101

一、ORA-12514:TNS:监听程序当前无法识别连接描述符中请求的服务。


cd $ORACLE_HOME

cd network/admin

目录下listener.ora 文件配置不正确。


listener.ora应该配置如下:

# listener.ora Network Configuration File: /u01/app/oracle/product/10.2.0/db_1/network/admin/listener.ora
# Generated by Oracle configuration tools.


LISTENER =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
      (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.108)(PORT = 1521))
    )
  )

SID_LIST_LISTENER =
  (SID_LIST =
    (SID_DESC =
      (SID_NAME = PLSExtProc)
      (ORACLE_HOME = /u01/app/oracle/product/10.2.0/db_1)
      (PROGRAM = extproc)
    )

  (SID_DESC =
      (GLOBAL_DBANAME = ORCL)
      (ORACLE_HOME = /u01/app/oracle/product/10.2.0/db_1)
      (SID_NAME = ORCL)
    )
 )

二、ORA-01034:ORACLE not available
ORA-27101:shared memory realm does not exist


1.listener.ora中设置的关于ORACLE_HOME或ORACLE_SID的设置不正确。

     检查ORACLE_HOME和ORACLES_SID,注意大小写。

2.或者是没有启动Oracle实例。

    sqlplus “/as sysdba”

    startup启动Oracle实例




你可能感兴趣的:(PL/SQL连接Oracle错误:ORA-12514、ORA-01034、ORA-27101)