Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

The moment I log into SQLPLUS I get an SP2-0556 error. I recently moved OS but am connecting to the same database so I am not sure if it's because I'm using my old TNSNames or what. I can connect and work normally but a few issues have arisen with running SQL scripts due to this where they then say Invalid File Name.

Any help would be greatly appreciated, thanks.

  • the database is 11g,
  • the command I use for running scripts is a custom ant script that basically loops through and runs normal .sql scripts,
  • and I changed from a Ubuntu system to Mac OS X.

The issues are that any new scripts I create (that I know work) give a Invalid File Name error then stop.

share|improve this question
Is sqlplus aliased to anything? (Type "alias" from the shell to check). Once connected, if you reconnect without exiting SQL/PLUS (connect user/pass) & still get the error it's because there's a login.sql/glogin.sql script being executed. – Phil Jan 28 '13 at 11:23
I tried that Phil, alias shows nothing, and running the connect user/pass command I got TNS:NET service name is incorrectly specified, warning: you are no longer connected to ORACLE. – Matt C Jan 28 '13 at 11:38
Sorry, do: connect user/pass@dbname – Phil Jan 28 '13 at 11:43
Given your edit, it's probably an ant config problem (passing the wrong script location path). Have you verified the ant config? – Phil Jan 28 '13 at 11:49
The connect user/pass@dbName does give me the same error again, the ant config is fine and it works on many other builds, as I said it's only one script that's failing out of hundreds, but I'm not sure how long this Invalid File Name has been appearing when loading up SQLPLUS as I imported it in as soon as I moved OS I'll look into my login.sql. – Matt C Jan 28 '13 at 12:03


I assume that your script is trying to call a script containing spaces.

share|improve this answer
I think your right, I rebuilt my database and ALL existing scripts that never used to cause any problems are now all throwing up SP2-0556 errors, however they are still compiling and working fine, which is very strange. – Matt C Jan 28 '13 at 12:11

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.