I am not able to connect to database from the client. When I check with tnsping SID, it is ok. But when I try to login from sqlplus, it shows me the following error:

ORA-12154: TNS:could not resolve service name

What could be the problem?