Make sure that right TNS names file is used for the right connection.

Best way is, maintain only one TNSNames file. And do all the entries only in that file. Then you should be able to connect using SQL and OEM