Reputation: 31
Whenever I try to login or connect into SQL command line or SQL*Plus (11g Standard Edition Win64) I get an error
ORA-12154: TNS:could not resolve the connect identifier specified.
I have tried to solve this problem with google help but I can't.
so please help me out of this!
Upvotes: 3
Views: 37817
Reputation: 10541
You are trying to connect to a database v. "v" is the connect identifier. However, your Oracle client does not know of v. This is what the error message is trying to tell you.
Try
c:>tnsping v
Hopefully this will give you something like this:
C:\Users\rwe>tnsping v
TNS Ping Utility for 64-bit Windows: Version 12.2.0.1.0 - Production on 21-MAR-2018 15:49:51
Copyright (c) 1997, 2016, Oracle. All rights reserved.
Used parameter files:
C:\app\rwe\product\11.2.0\dbhome_1\network\admin\sqlnet.ora
TNS-03505: Failed to resolve name
What you can extract from this is the location:
C:\app\rwe\product\11.2.0\dbhome_1\network\admin\
This is where your tnsnames.ora file resides. Edit this file and add the correct information for your database v. Substitute servername for the machine your Oracle database is on.
V =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = tcp)(HOST = servername)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = V)
)
)
Upvotes: 7