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

來源:互聯網
上載者:User

標籤:sp2-0750   you   may   

今天登入一台伺服器用roote使用者登入的,在切換到oracle使用者,執行sqlplus sys/ as sysdba進入資料庫提示如下錯誤:

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


在/home/oracle目錄下查看檔案.bash_profile,它是隱藏檔案。

$ 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

[[email protected] ~]$ cd $ORACLE_HOME

-bash: cd: /u01/app/oracle/product/11.1.0/db_1: 沒有那個檔案或目錄


發現oracle安裝定義的家目錄是在/u01/app/oracle/product/11.1.0/db_1目錄下的u01目錄是root使用者的許可權,在切回到root使用者,執行如下命令:[[email protected] ~]# cd $ORACLE_HOME[[email protected] dbhome_1]# pwd/u01/app/oracle/product/11.2.0/dbhome_1[[email protected] dbhome_1]# sqlplus / as sysdba或是[[email protected] dbhome_1]# cd bin[[email protected] dbhome_1]# pwd/u01/app/oracle/product/11.2.0/dbhome_1/bin[[email protected] 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>

問題解決!


本文出自 “營運筆錄 美玲” 部落格,請務必保留此出處http://meiling.blog.51cto.com/6220221/1971801

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

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.