ORA-12154: TNS:could not resolve the connect identifier specified 

Error ORA-12154: TNS:could not resolve the connect identifier specified is possible if in tnsnames.ora file before one of net service names is space. It is difficult to see it visually. For example the first example is OK, but the second will produce error ORA-12154.

ORCL =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = orcl)
    )
  )

 ORCL =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = orcl)
    )
  )

This problem could occur, when configuration is copied from email or other document.
Other useful information about this error:
http://ora-12154.ora-code.com/