Hi,
I think there is nothing to do with SID or any environment variable, 'cause if there is something with that, then, U cannot connect as internal first of all. For this, I need to look at the alertorcl.log file or the alertSID.log file's before proceeding further since this seems to be an abnormal issue.