1

Im trying to run sqlplus from user oracle in linux, but i only get the following error.

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 [ sqlplus ] completed with error code: 1

I have tried to run ./oracle_env.sh as user oracle and have tried it as user root as-well, but when I run the sqlplus / as sysdba command logged in as user oracle I get the above message.

Did I miss something, am I on completely the wrong track?

Here is a full output that I used/got.

`su - oracle  
 cd /u01/app/oracle/product/11.2.0/xe/bin
 ./oracle_env.sh
 sqlplus / as sysdba`

1 Answer 1

3

If /u01/app/oracle/product/11.2.0/xe/bin/oracle_env.sh sets your ORACLE_HOME, and ORACLE_SID environment variables, you need to "source" it invoking it in the current environment) using the "dot" prefix:

. ./oracle_env.sh

In any case, looks like your environment variables (including LD_LIBRARY_PATH) may not be set correctly.

Sign up to request clarification or add additional context in comments.

2 Comments

Thanks Mark. So learning that the . prefix is the kind of include statement, it makes a lot more sense now.
Yes, if you invoke it that way, the statements in the script apply to the current environment; the way you had it, oracle_env.sh was launched in a new process, inheriting the existing environment, and then when it quit, any environment setup it did disappears along with the process!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.