Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

SP2-0750: You may need to set ORACLE_HOME to your Oracle software directory

2025-04-05 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

If you log in to a server today and log in with a roote user, you will get the following error when you switch to an oracle user and execute sqlplus sys/ as sysdba to enter the database:

SP2-0750: You may need to set ORACLE_HOME to your Oracle software directory

View the file. Bash_profile in the / home/oracle directory, which is a hidden file.

$cat .bash _ profile# .bash _ profile# Get the aliases and functionsif [- f ~ / .bashrc]; then. ~ / .bashrcfi # User specific environment and startup programsPATH=$PATH:$HOME/binexport PATHexport ORACLE_BASE=/u01/app/oracle export ORACLE_HOME=/u01/app/oracle/product/11.1.0/db_1 export ORACLE_SID=orclexport PATH=$ORACLE_HOME/bin:$PATH export LD_LIBRARY_PATH=$ORACLE_HOME/libLANG=zh_CN.UTF-8; export LANGNLS_LANG='SIMPLIFIED CHINESE_CHINA.AL32UTF8'; export NLS_LANG

[oracle@localhost ~] $cd $ORACLE_HOME

-bash: cd: / u01/app/oracle/product/11.1.0/db_1: there is no such file or directory

It is found that the home directory defined by the oracle installation is in the / u01/app/oracle/product/11.1.0/db_1 directory. The U01 directory is the permission of the root user. After switching back to the root user, Execute the following command: [root@localhost ~] # cd $ORACLE_ Home [root @ localhost dbhome_1] # pwd/u01/app/oracle/product/11.2.0/dbhome_1 [root@localhost dbhome_1] # sqlplus / as sysdba or [root@localhost dbhome_1] # cd bin [root@localhost dbhome_1] # pwd/u01/app/oracle/product/11.2.0/dbhome_1/ [root @ localhost bin] #. / sqlplus / as sysdbaSQL*Plus: Release 11.2.0.4.0 Production on Thu Oct 12 17:20:48 2017Copyright (c) 1982 2013, Oracle. All rights reserved.Enter password: Connected to:Oracle Database 11g Enterprise Edition Release 11.2.0.4.0-64bit ProductionWith the Partitioning, OLAP, Data Mining and Real Application Testing optionsSQL >

Problem solved!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report