oracle - 安装 Oracle 11g 后,在 Ubuntu 14.04LTs 中找不到 lsnrctl

标签 oracle ubuntu sqlplus

我正在尝试运行 SQL*Plus 来启动我的数据库,但我不断收到错误消息:

oracle@ictd23:~$ sqlplus /nolog

SQL*Plus: Release 11.2.0.1.0 Production on Mon Oct 26 15:52:37 2015

Copyright (c) 1982, 2009, Oracle. All rights reserved.

SQL> startup
ORA-12547: TNS:lost contact

oracle@ictd23:~$ sqlplus system@orcl

SQL*Plus: Release 11.2.0.1.0 Production on Mon Oct 26 16:02:14 2015

Copyright (c) 1982, 2009, Oracle.  All rights reserved.

Enter password: 
ERROR:
ORA-12541: TNS:no listener

当我尝试启动监听器时,我也收到一个错误:
oracle@ictd23:~$ lsnrctl start
lsnrctl: command not found.

任何人都可以帮助解决这个问题吗?

最佳答案

很可能 lsnrctl 命令不在 PATH 中(或者是因为您的 shell 环境没有为 oracle 设置),请尝试如下命令

$ $ORACLE_HOME/bin/lsnrctl start

或者使用 coraenv 或 oraenv 脚本设置环境并检查 $ORACLE_HOME/bin 是否存在于您的 PATH 中
# For cshell
% source /usr/local/bin/coraenv
% lsrnctl start

# For other shell (eg. bash/sh/k-shell)
$ . /usr/local/bin/oraenv
$ lsnrctl start

关于oracle - 安装 Oracle 11g 后,在 Ubuntu 14.04LTs 中找不到 lsnrctl,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33345867/

相关文章:

sql - SQL中交集的补充

python - 通过 Python 发送电子邮件的最简单方法

Oracle imp 和 exp 命令

Docker 流量控制 (tc) - 未找到指定的 qdisc

android - 如何在 Linux 服务器(Ubuntu)上安装 Android 命令行工具

database - Oracle sqlplus > 替换提示变量

python - 使用 (wx)python 记录外部程序的输出

sql - 为什么 oracle 说缺少右括号

sql - 在 SQL 查询中使用内联函数和 CTE

sql - Oracle:即使没有约束或索引,重命名列也会出现 "ORA-00903: invalid table name"错误