I have been trying to connect SQL Plus, Report Builder but getting error "TNS could not resolve the service name "
In SQL developer i tried with two connections name it worked ,below is the detail :
Connection name : MyConn
user : system
passs: ******
hostname : 192.*******
port : 1521 and SID : XE
and
Connection name : MyDb
user : system
passs: ******
hostname : localhost
port : 1521 and SID : XE
But when i am trying in SQL plus...its throwing error , Please help ..
Here the TNSNAMES file connection details that I tried :
MyConn =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192********.8 )(PORT = 1521))
)
(CONNECT_DATA =
(SID = XE)
)
)
XE =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192********.8 )(PORT = 1521))
)
(CONNECT_DATA =
(SID = XE)
)
)
Mydb =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
)
(CONNECT_DATA =
(SID = xe)
)
)
We cannot find the entry in your tnsnames.ora file, eg
C:\oracle\product\grid\bin>tnsping qwe
TNS Ping Utility for 64-bit Windows: Version 12.2.0.1.0 - Production on 25-SEP-2017 21:19:32
Copyright (c) 1997, 2016, Oracle. All rights reserved.
Used parameter files:
C:\oracle\product\12.2.0.1\network\admin\sqlnet.ora
TNS-03505: Failed to resolve name
so double check
a) you are using the right tnsnames.ora
b) you do not have any default domains defined, for example, tnsping mydb.world