Oracle TNS监听器无法在CentOS 7上启动

时间:2014-07-25 17:56:17

标签: oracle centos tnsnames

我在CentOS 7机器上安装了Oracle 11g第2版Express版。安装过程已成功完成,如下所示。

Starting Oracle Net Listener...Done
Configuring database...Done
Starting Oracle Database 11g Express Edition instance...Done
Installation completed successfully.

当我收到服务时,我遇到了错误。

Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = i2b2)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = XE)))
TNS-12541: TNS:no listener

然后我尝试启动监听器,它失败了以下错误。

TNSLSNR for Linux: Version 11.2.0.2.0 - Production
NL-00280: error creating log stream /u01/app/oracle/product/11.2.0/xe/network/log/listener.log
 NL-00278: cannot open log file
  SNL-00016: snlfohd: error opening file
   Linux Error: 13: Permission denied

我在论坛上搜索了很多,并尝试了那里给定的解决方案,但无法解决问题。在这种情况下会出现什么问题?

非常感谢任何帮助。

编辑:

这是我的tnsnames.ora文件。

XE =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = i2b2)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = XE)
    )
  )

EXTPROC_CONNECTION_DATA =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC_FOR_XE))
    )
    (CONNECT_DATA =
      (SID = PLSExtProc)
      (PRESENTATION = RO)
    )
  )

和listener.ora文件。

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

LISTENER =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC_FOR_XE))
      (ADDRESS = (PROTOCOL = TCP)(HOST = i2b2)(PORT = 1521))
    )
  )

DEFAULT_SERVICE_LISTENER = (XE)

环境变量:

ORACLE_HOME=/u01/app/oracle/product/11.2.0/xe
export ORACLE_HOME

ORACLE_SID=XE
export ORACLE_SID

export TNS_ADMIN=/u01/app/oracle/product/11.2.0/xe/network/admin
export NLS_LANG=`$ORACLE_HOME/bin/nls_lang.sh`

JAVA_HOME=/usr/java/jdk1.7.0_65
export JAVA_HOME

PATH=$PATH:$HOME/bin:$ORACLE_HOME/bin:/usr/local/apache-ant-1.8.4/bin:$JAVA_HOME/bin

export PATH

0 个答案:

没有答案