Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error 6 Initializing SQL*Plus

When i open sqlplus it shows

Error 6 Initializing SQL*Plus
Message file sp1<Lang>.msb not found
SP2-0750: You may need to set ORACLE_HOME to your Oracle software directory
like image 826
santhoshkrishnan Avatar asked Jun 28 '26 02:06

santhoshkrishnan


2 Answers

Generally speaking, you don't want to set ORACLE_HOME in a Windows environment - it's handled in the registry, and it's given me grief the times I've set it. Here is an Oracle Doc on Oracle Homes.

How many Oracle installations are on this computer?

like image 56
DCookie Avatar answered Jul 01 '26 16:07

DCookie


If you have only SQLPLUS installed without everything else supplied in the installer (this can be needed if you only need SQLPLUS), then you must to copy both the libraries and sqlplus.exe itself to the one directory.

For example:

Configuration, that throw error: "Error 6 initializing SQL*Plus SP2-0667: Message file sp1.msb not found SP2-0750: You may need to set ORACLE_HOME to your Oracle software directory" :

  • instantclient_21_12 - all file from basic package https://www.oracle.com/database/technologies/instant-client/winx64-64-downloads.html All files required to run OCI, OCCI, and JDBC:OCI applications

  • sqplus The SQL*Plus command line tool for SQL and PL/SQL queries contains following files:

Orasqlplusic.dll
sqlplus.exe
glogin.sql
sqlplus.sym

To fix it, you need to move all the files to one directory and set the paths as follows

for windows:

set PATH=%PATH%;d:\oracle\instantclient_21_12
set ORACLE_HOME=d:\oracle\instantclient_21_12

for linux:

export ORACLE_HOME=/home/petya/oracle/instantclient_21_12
export PATH=/home/petya/oracle/instantclient_21_12:$PATH
like image 32
Bogdan Gorchinskiy Avatar answered Jul 01 '26 18:07

Bogdan Gorchinskiy



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!