【问题标题】:lsnrctl: command not found in Ubuntu 18.04lsnrctl:在 Ubuntu 18.04 中找不到命令
【发布时间】:2020-09-10 03:11:36
【问题描述】:

我正在尝试使用 sqldeveloper 连接到 Oracle Database 18c XE,

但我得到了:

Status : Failure -Test failed: Listener refused the connection with the following error:
ORA-12505, TNS:listener does not currently know of SID given in connect descriptor

所以我正在尝试启动我的听众,我已经在里面了 /opt/oracle/product/18c/dbhomeXE/network/admin/samples

我收到lsnrctl: command not found

我也收到了与 /opt/oracle/product/18c/dbhomeXE/bin 中的 sqlplus 相同的消息

我知道你会说 Ubuntu 不支持 Oracle,

但我真的只能使用 Ubuntu..

[已关闭] 按照以下链接步骤和指南,我成功地能够通过 sqldeveloper 17.3 连接到 oracle 数据库:

http://meandmyubuntulinux.blogspot.com/2012/06/trouble-shooting-oracle-11g.html

【问题讨论】:

  • 监听器已经在运行,因为它产生了那个错误。您似乎没有正确设置命令行环境 - 例如,Oracle 目录不在您的 $PATH 中。 (lsnrctlsqlplus 在同一目录中,顺便说一句。)但实际问题可能要简单得多:在您的 SQL Developer 连接配置更改中,从 SID 到服务名称的单选按钮选择,看看它是否更快乐。
  • @Alex Poole 我尝试通过将单选按钮更改为服务名称,但我没有工作。你能告诉我如何在 $PATH 中设置我的目录吗?另外我不确定监听器是否真的在工作,因为这个 ORA-12505 错误在 SQL Developer 内部

标签: oracle ubuntu sqlplus oracle18c


【解决方案1】:

您需要运行以下步骤来访问 Installation Guide for Linux x86-64 中记录的 Oracle 可执行文件:

$ export ORACLE_SID=XE 
$ export ORAENV_ASK=NO 
$ . /opt/oracle/product/18c/dbhomeXE/bin/oraenv

ORACLE_HOME = [] ? /opt/oracle/product/18c/dbhomeXE
The Oracle base has been set to /opt/oracle

oraenv 会将 PATH 设置为正确的设置。

【讨论】:

猜你喜欢
  • 1970-01-01
  • 2013-09-30
  • 2018-10-26
  • 2019-10-18
  • 1970-01-01
  • 2019-11-20
  • 2020-06-08
  • 2019-01-12
  • 2018-06-04
相关资源
最近更新 更多