sqlplus连接oracle时报错如下:
[oracle@denglj ~]$ sqlplus /nolog
Error 6 initializing SQL*Plus
SP2-0667: Message filesp1<lang>.msb not found
SP2-0750: You may need to setORACLE_HOME to your Oracle software directory
造成此问题为ORACLE_HOME设置错误.
查看oracle用户环境变量,[oracle@denglj ~]$ cat .bash_profile
发现ORACLE_HOME=$
ORACLE_BASE/oracle/product/18.3.0/db_1
而Oracle software此前被解压到另一个目录(/home/oracle/setup),如下所示.

处理方案:将ORACLE_HOME=$
ORACLE_BASE/oracle/product/18.3.0/db_1
修改为ORACLE_HOME=/home/oracle/setup
保存退出后,需[oracle@denglj ~]$ source .bash_profile使其生效,如下所示此问题不在发生.
[oracle@denglj ~]$ sqlplus /nolog
SQL*Plus: Release 18.0.0.0.0 - Productionon Mon Sep 6 22:35:53 2021
Version 18.3.0.0.0
Copyright (c) 1982, 2018, Oracle. All rights reserved.

本文档描述了在尝试使用sqlplus连接Oracle数据库时遇到的错误,错误提示为ORACLE_HOME设置不正确。通过检查用户的bash_profile文件,发现ORACLE_HOME指向的路径不匹配实际的Oracle软件位置。解决方案是将ORACLE_HOME环境变量修改为正确的Oracle软件目录,并通过source命令使更改生效。完成这些步骤后,成功地连接到了Oracle数据库。

9828

被折叠的 条评论
为什么被折叠?



