The ora-12154 means that the service name could not be resolved.
There may be two problems.
1. the wrong tnsnames.ora is used or the tnsnames.ora does not contain ean entry for yoyr service name
2. the sqlnet.ora is not configured right.
If you know that the sqlnet.ora is right and you have a correct tnsnames, try setting the TNS_ADMIN variable, pointing to the location where the tnsnames (which contains the right servicename) resides.
This way, Oracle uses the right tnsnames.ora and you can use a central tnsnames for all users and oracle installations.