The solution may depend on what you were trying to do when you got this error
You have to make sure that the TNSNAMES.ORA file exists in the correct directory and accessible.
%ORACLE_HOME% /network/admin/
Othere one
You have to make sure that the syntax of TNSNAMES.ORA file is correct.
For example, if there are unmatched brackets in the file (ie: open bracket without the corresponding close bracket), the file will be rendered unusable.
XE =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = TESTING.COM)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = XE)
)
)
or visit
https://cbseneet2019.co.in/ORA-12154-tns-could-not-resolve/[
^]