Details:
- username is scott
- password is tiger
- Server name - I gave prashanth-PC, which I found in tnsnames.ora - at this point I get
ORA-12154: TNS:could not resolve the connect identifer specified
When I connect using code, it is working. In code I will leave data source blank. But when I connect using the grid view tool. It is asking server name. I don't know which server name should I specify. For reference I have posted the contents of my "tnsnames.ora" file. Please check it. Am using Oracle 10g.
XE =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = prashanth-PC)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = XE)
)
)
EXTPROC_CONNECTION_DATA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
)
(CONNECT_DATA =
(SID = PLSExtProc)
(PRESENTATION = RO)
)
)
ORACLR_CONNECTION_DATA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
)
(CONNECT_DATA =
(SID = CLRExtProc)
(PRESENTATION = RO)
)
)
Server name expects the Oracle service name, not your machine host name. Try entering XE at the server name. If this fails:
tnsnames.ora
filetnsnames.ora
files are in sync or find out which tnsnames.ora is in use - This can be done by checking your path variable & finding out which path has the first mention of tnsnames.ora