If ORA_SID is correctly defined, then this error can indicate that the instance is unavailable, i.e. shut down or crashed.
To check for the instance background processes, do the following:
$ SET DEFAULT SYS$LOGIN
or any directory where the user can write files
$ SHOW SYSTEM/OUTPUT=SYS.LIS
$ SEARCH SYS.LIS ORA_<value of ORA_SID, i.e. "PROD", "V715", etc.>
This should give several lines of output if the instance is running, if not, you see:
%SEARCH-I-NOMATCHES, no strings matched