谢谢阅读!
今天我有一个非常奇怪的问题。
因为我的docker应用刚刚坏了。.我从未接触过任何文件,只需执行sqlplus,使用它,然后关闭主机操作系统即可。

所以我试图解决这个问题。这是一个错误。

[oracle@7e421c70357d ~]$ lsnrctl status

LSNRCTL for Linux: Version 12.1.0.2.0 - Production on 02-NOV-2017 16:31:09

Copyright (c) 1991, 2016, Oracle.  All rights reserved.

Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
TNS-12541: TNS:no listener
 TNS-12560: TNS:protocol adapter error
  TNS-00511: No listener
   Linux Error: 111: Connection refused
[oracle@7e421c70357d ~]$ sqlplus
Error 6 initializing SQL*Plus
SP2-0667: Message file sp1<lang>.msb not found
SP2-0750: You may need to set ORACLE_HOME to your Oracle software directory
[oracle@7e421c70357d ~]$


因此,我会尽一切可能检查。ORACLE_HOME是正确的。
ORACLE_HOME/u01/app/oracle/product/12.1.0/dbhome_1

而且有很多文件和目录,所以很正确。检查两次。

而且我意识到sqlplus中没有ORACLE_HOME文件夹。
我认为sqlplus消失了,完全不见了..
我不知道为什么会这样,没有任何线索。

编辑..
我用谷歌搜索了有关我的问题的所有信息,然后我明白了。
目录:/var/log/oracle-rdbms-server-12cR1-preinstall/results

[root@7e421c70357d results]# ls
orakernel.log
[root@7e421c70357d results]# cat *
Adding group oinstall with gid 54321
Adding group dba
Adding user oracle with user id 54321, initial login group oinstall, supplementary group dba and  home directory /home/oracle
Changing ownership of /home/oracle to oracle:oinstall
Please set password for oracle user
uid=54321(oracle) gid=54321(oinstall) groups=54321(oinstall),54322(dba)
Creating oracle user passed

Saving a copy of the initial sysctl.conf
Verifying  kernel parameters as per Oracle recommendations...
Adding fs.file-max = 6815744
Adding kernel.sem = 250 32000 100 128
Adding kernel.shmmni = 4096
Adding kernel.shmall = 1073741824
Adding kernel.shmmax = 4398046511104
Adding kernel.panic_on_oops = 1
Adding net.core.rmem_default = 262144
Adding net.core.rmem_max = 4194304
Adding net.core.wmem_default = 262144
Adding net.core.wmem_max = 1048576
Adding net.ipv4.conf.all.rp_filter = 2
Adding net.ipv4.conf.default.rp_filter = 2
Adding fs.aio-max-nr = 1048576
Adding net.ipv4.ip_local_port_range = 9000 65500
Setting kernel parameters as per oracle recommendations...
Altered file /etc/sysctl.conf
Saved a copy of the current file in /etc/sysctl.d/99-oracle-rdbms-server-12cR1-preinstall-sysctl.conf
Check /etc/sysctl.d for backups
Verifying & setting of kernel parameters passed

Setting user limits using /etc/security/limits.d/oracle-rdbms-server-12cR1-preinstall.conf

Verifying oracle user OS limits as per Oracle recommendations...
Adding oracle soft nofile  1024
Adding oracle hard nofile  65536
Adding oracle soft nproc  16384
Adding oracle hard nproc  16384
Adding oracle soft stack  10240
Adding oracle hard stack  32768
Adding oracle hard memlock  134217728
Adding oracle soft memlock  134217728
Setting oracle user OS limits as per Oracle recommendations...
Altered file /etc/security/limits.d/oracle-rdbms-server-12cR1-preinstall.conf
Original file backed up at /var/log/oracle-rdbms-server-12cR1-preinstall/backup/Jun-01-2017-23-10-04
Verifying & setting of user limits passed

/boot/grub/grub.conf not present.. ..
Verifying of boot parameters failed.

Trying to add NOZEROCONF parameter...
Taking a backup of existing file to /etc/sysconfig/network.orabackup
Successfully added parameter NOZEROCONF to /etc/sysconfig/network
Setting /etc/sysconfig/network parameters passed

Disabling Transparent Hugepages.
Refer Oracle Note:1557478.1

Disabling defrag.
Refer Oracle Note:1557478.1

Taking a backup of old config files under /var/log/oracle-rdbms-server-12cR1-preinstall/backup/Jun-01-2017-23-10-04
Trying to add NOZEROCONF parameter...
Parameter added by previous preinstall rpm
Parameter already present
/boot/grub/grub.conf not present.. ..
Boot file modifications failed


任何人都有解决此问题的想法,请帮助我。

最佳答案

使用此命令查找sql​​plus。 sqlplus是一个二进制命令,它始终位于../bin目录中

$哪个sqlplus

通常默认情况下,它们位于以下目录中:

〜/ app / oracle / product / your_db_version / dbhome_1 / bin / sqlplus

转到该目录,并确保它具有可执行权限,其中包含以下内容:

$ cd〜/ app / oracle / product / your_db_version / dbhome_1 / bin /

$ ls -la sqlplus

-rwxr-x--x。 1 oracle mygroup 9479 2015年3月16日sqlplus

运行此命令以确保:

$ sudo chmod 755 sqlplus

类似于'sudo chmod u = rwx,go = rx'

使用此命令检查您的环境设置。

$ echo路径

确保你有这样的东西

/ home / oracle / bin:/ home / oracle / app / oracle / product / your_db_version / dbhome_1 / bin

如果未列出它们,请将它们添加到您的环境中。

$ sudo vi〜/ .bashrc

要么

$ sudo vi / etc / profile

我希望这会有所帮助。祝好运!

关于linux - sqlplus无法正常工作,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/47080366/

10-12 01:29