0
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

SP2-0667: Message file sp1<lang>.msb not foundでsqlplusが起動しない

Last updated at Posted at 2015-12-11

環境

現象

sqlplusを起動しようとすると、以下のようなエラーメッセージを出力して起動しない。

$ /usr/oracle/app/product/11.2.0/dbhome_1/bin/sqlplus
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

対策

エラーメッセージにもあるとおり、環境変数にORACLE_HOMEを設定する。

$ export ORACLE_HOME=/usr/oracle/app/product/11.2.0/dbhome_1
$ /usr/oracle/app/product/11.2.0/dbhome_1/bin/sqlplus

SQL*Plus: Release 11.2.0.1.0 Production on Fri Dec 11 15:45:36 2015

Copyright (c) 1982, 2009, Oracle.  All rights reserved.

Enter user-name: kagamihoge
Enter password: 
ERROR:
ORA-12162: TNS:net service name is incorrectly specified


Enter user-name: 

上記メッセージの通りORACLE_SIDの設定も必要なのでこれも設定する。もしくは、sqlplusの引数で指定する(例:sqlplus kagamihoge/password@localhost:1521/orcl)。

$ export ORACLE_SID=orcl
$ /usr/oracle/app/product/11.2.0/dbhome_1/bin/sqlplus

SQL*Plus: Release 11.2.0.1.0 Production on Fri Dec 11 16:00:04 2015

Copyright (c) 1982, 2009, Oracle.  All rights reserved.

Enter user-name: kagamihoge
Enter password: 


Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
?????????
SQL> 

新しくユーザを作ったとか、何らかの要因で環境変数の設定が変更されたとか、そういう場合に遭遇するエラーらしい。

参考リンク

0
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?