Moving to a Windows 7 machine and am having issues connecting to my Oracle database. I am only running the client on my machine but the tnsnames file is where it needs to be and I can connect to the db via sql+ but not through Toad. Toad sees the database names via the tnsnames file but I recieve this error when I try to connect.
ORA-12154: TNS:could not resolve the connect identifier specified
Thanks for any help.
Several questions come to mind.
Is the Win7 OS 32-bit or 64-bit? If 64, TDA runs in 32-bit mode and would need corresponding 32-bit client.
What type of client are you using? I am assuming you are using full client as opposed to instant, otherwise you would not have SQL+. Try adding the environmental variable of TNS_NAMES and point to the tnsnames.ora file. When you connect with SQL+ are you using the tnsname file? Is there more than one location of the tnsnames.ora file?
Also, your connection name may require being fully qualified. Example below of tns name as well as server fully qualified.
(ADDRESS = (PROTOCOL = TCP)
(HOST = irvlvru01.quest.com)
(PORT = 1522)
(SID = sdu1app)
Both client (10g) and toad are 32 bit.
When I use SQL+ I enter the db name manually along with login and password.
Only 1 location for the tnsnames.ora file.
example of tns name:
(ADDRESS = (PROTOCOL = TCP)(HOST = 123.456.789.101)(PORT = 1521))
(SERVER = DEDICATED)
(SERVICE_NAME = MAXPROD)
I will try the enviroment variable and check back.
I set the environment variables, but that didn’t help.
These are the same program versions I am running on my xp machine without issue.
I also noticed that I only have 1 option showing for my ODBC system DSN’s. When I try to create a new source it only give me SQL as an source type. Could these be realated?
Message was edited by: nunyazz
Are you using the Freeware version of TDA or Trial/Commercial?
If you are using Trial or Commercial here is the approach I would take to debug this.
Use the native oracle connection type and create a Direct connect. This uses the TCP/IP protocol and bypasses the client altogether. This will get you up and running.
To go back and get the client to be used for native connection(not ODBC), check that the correct home is selected in the Oracle home selector on the connection window.
Click on the SQLNet edit button and make sure tnsnames is first in your directory list like shown below.
NAMES.DIRECTORY_PATH= (TNSNAMES, EZCONNECT)
- If nothing was found in 2 or 3 above, use Oracle’s Net Configuration wizard to create a new connection and have it test the connection.
If you are using Freeware and ODBC connection, what driver are you using? Microsoft’s or Oracle’s. And does it give the same error when testing the connection from the ODBC Manager?
I am using the commercial version.
I’m not sure how to create a direct connect, but I will do some research.
I created a test connection in NetConfiguration and tested good. But all my connections test good in NetConfig.
I did realize that there is a 32 bit version of ODBC buried in the Windows 7 system folder. Running that version does give me the additional options that I am used to seeing. Creating the oracle ODBC connections once again test fine in the ODBC manager , but will not connect while in Access. This only applies to the oracle connections, the SQL connections work fine.
and, my sqlnet.ora file matches your directory list.
I’m sorry to bug you about all of this. Not sure what I am missing. Like I said before, all of this was working perfectly in XP using the same programs / versions.
Thanks so much for all you help.
To use Direct Connections to Oracle select the 'Direct' tab in the middle of the connection screen. Enter the network name or IP address. Include SID and port if different then default. See attached.
On the ODBC connection, the driver must not know how to resolve to the tnsnames file. I would expect that it would honor the TNS_ADMIN environment path is correctly set. Did you confirm that it is set correctly? A confirmation would be to see if the tnsnames editor of our connection dialog opens to the correct file to edit.
I created the direct connection.
I recieve this error when trying to connect:
Network error:: The requested name is valid, but no data of the requested type was found
Should the TNS_ADMIN environment be to the tnsnames.ora file itself or to the directory? The connection manger lists the correct database names that are listed in the tnsnames.ora file, so I assume it is correct.
Direct connection is separate from the TNS issue. For this issue it sounds like the server you are referencing does not have any resolution. Use the IP address or fully qualified server name.
Whatever will resolve and reach the server through the network.
Well, thanks for all your help.
Not sure what the issue could be with the server if it connects fine with my XP machines. I will do some more research and check back in if I find something.
I’m at a loss…
Any suggestions? Something I could get my IT department to check on the server side? Should I try 64bit versions of everything? Not sure what else to try.
Thanks for all your help!
Please send me in private email the following items:
- Your tnsnames.ora file
- Your sqlnet.ora file
- Screenshot of your TDA connection window so I can see what the properties are.
- Screenshot of the SQL*pLus logon window and what you use to enter there.
That I didn’t know. We have developers here that use Win 7 and by default use the 11G client.
Thanks for the heads up.
I would like to confirm wheter if we are using Windows 7 Home Premium, should we install 11g as have discussed above ?
My computer use Windows 7 Home Premium, and the problem occured when i want to run TOAD in order to access oracle database.
The error message : ORA-12154: TNS:could not resolve the connect identifier specified (PNUAT).
Please help me
This is fine to install the 32-bit Oracle client on Win 7 Home.
But still your best bet is to use the Direct Connect that does not use a tnsnames. Did you try this? I can’t tell if you had success or not with DIrect Connect.
If you are working from home make sure you have access to work(VPN, etc). I am assuming this is the case.