Oracle connection error

When you have just installed a database or client Oracle on a computer and want to connect with the parameters that have defined, it generates the error message: ORA-12154: TNS: Could not resolve the connect identifier specified.
1 answer

Oracle connection error

Possible causes could be
-Bad configuration of TNSNAMES.ORA.
-No repository is located where is the service name identifier

The solution presented are:
-First Check TNSNAMES.ORA file of the database or the client you are using and check the settings, the most important are the HOST, SID and the ALIAS of the database, see if they match data from the computer that owns the database (server). The TNSNAMES is usually in a folder called Network or on NET80 in the case of some customers ORACLE.

A typical TNSNAMES of the database is as follows:
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = Server Name) (PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = Service Name)
)
)

-Check that the service name matches the name that Windows provides, in the case of Oracle Database XE is always the XE service, other service facilities will be named as he was appointed at the time of creating the basis data.