当我运行 .sh 文件时出现以下错误:
SP2-0667: Message file sp1<lang>.msb not found
SP2-0750: You may need to set ORACLE_HOME to your Oracle software directory
以下是环境变量
echo $ORACLE_HOME
/u01/app/oracle/product/11.2.0
echo $ORACLE_SID
sutdbd17
答案1
oerr
来自 Oracles命令的有关消息的更多详细信息。
oerr sp2 0667
给出:
00667, 0, "Message file %s<lang>.msb not found\n"
// *Cause: The SP1, SP2, or CPY message file could not be
// found. SQL*Plus cannot run.
// *Action: Check the Oracle platform specific documentation to make
// sure SQL*Plus is installed correctly. This may occur
// because the ORACLE_HOME environment variable or registry
// equivalent is not set to the location of the Oracle
// software. Make sure this value is set correctly. Check
// that the SQL*Plus binary message files exist in the
// SQL*Plus message directory, for example
// $ORACLE_HOME/sqplus/mesg. Check the value of NLS_LANG
// environment variable or registry equivalent is correct.
oerr sp2 0750
给出:
00750, 0, "You may need to set ORACLE_HOME to your Oracle software directory\n"
// *Cause: This occurs when SQL*Plus is unable to find a message file
// during program initialization. The most common cause is
// that ORACLE_HOME has not been set. This prevents the
// message files being found and SQL*Plus would be unable to
// display error messages or text required for normal
// operation. Other causes are when the message file is
// corrupt or cannot be read.
// The text for this message is also hard coded (in English)
// inside SQL*Plus source code. The message can never
// actually be read from this message file because the error
// occurs only when message files cannot be opened. The
// entry here is for documentation purposes only.
// *Action: Make sure that all the environment variables or registry
// entries needed to run SQL*Plus are set. The variables are
// platform specific but may include ORACLE_HOME, ORACLE_SID,
// NLS_LANG, and LD_LIBRARY_PATH.
// Also check that the file sp1XX.msb is in the
// $ORACLE_HOME/sqlplus/mesg or %ORACLE_HOME%\sqlplus\mesg
// directory. The "XX" stands for the country prefix
// associated with your NLS_LANG environment variable.
// SQL*Plus reads only one of the sp1XX.msb files. For
// example sp1ja.msb is read if NLS_LANG is
// JAPANESE_JAPAN.JA16EUC. If NLS_LANG is not set, then the
// default (English language) sp1us.msb is used. Check that
// the appropriate file is of non-zero size and that the file
// permissions allow you to read it. Note the ".msb" files
// are binary. The contents may be meaningless when viewed
// or printed. If you are unsure which language file is
// being used, try unsetting NLS_LANG and run SQL*Plus to
// verify it can read the sp1us.msb file.
oracle
我的用户帐户中的一些变量.bash_profile
:
export ORACLE_BASE=/opt/oracle
export ORACLE_HOME=$ORACLE_BASE/product/9.2.0.4
export ORACLE_TERM=xterm
export NLS_LANG=AMERICAN_AMERICA.WE8ISO8859P1
export ORA_NLS33=$ORACLE_HOME/ocommon/nls/admin/data
确保以 oracle 用户身份运行大部分/所有内容以获得正确的环境。
希望这有用!