In my continuing saga of loading 11GR2 with a rusty mind, I’ve
successfully loaded 11G 64 bit, crated tablespace, datafile, user and loaded 32
bit Instant client for use with TOAD 11
I loaded TOAD 11 and it’s having a hard time connecting. (ORA-12154 TNS
could not resolve…)
I’m assuming it’s because of TNSNAMES.ORA.
I loaded my client into a D:\app directory as per default. I loaded Oracle into
d:\Oracle…
Currently I see a correct TNSNames.ora in
d:\Oracle\product\11.2.0\dbhome_1\network\admin
Where does the TNSNAMES have to be located, in the client directory somewhere?
With instant client you need to setup TNS_ADMIN environment variable to point to
the path containing tnsnames.ora. You may be able to just copy the tnsnames.ora
file to the same path containing oci.dll for your instant client and bypass the
TNS_ADMIN variable, but I’m not 100% on that.
I copied it to the client (root) directory containing the oci.dll.
No luck. Tried the TNS_ADMIN var and that didnt work either.
I’m running Windows 7.
I still get teh resolution error. I think there is something really basic that I’m missing as I havent installed Oracle for quite some time.
Here’s my understanding:
Oracle sets up itself, I set up the user(schema), tablespace, default tablespace.
I install a 32 bit client and it can talk to Oracle 64. I think I need to do a few things here that I havent done…TNSNAMES, SQLNET ?
I install TOAD 11 and need to put in my username. password, Database (TOAD doesnt know it because of 64 bit)
that’s where I’m at. I have other items that I dont think matter. My database name is in lowercase - case doesnt seem to matter in TOAD, same error.
TOAD does have red X’s on the TNSNames Editor, LDAP Editor and SQNET editor - that seems to me that it cant find those.
I copied it to the client (root) directory containing the oci.dll.
No luck. Tried the TNS_ADMIN var and that didn't work either.
I'm running Windows 7.
As far as I'm aware, when you use instant client, you must create a tns_admin environment variable pointing at the folder that contains your sqlnet.ora and tnsnames.ora files. They can be anywhere on your desktop but for best results, hang them off a network/admin folder beneath the instant client folder itself.
Go to control panel -> System.
On the Advanced tab.
Click the button (or whatever) for Environment variables.
One set allows you to configure vars for your login only, the other does it for everyone. Pick the best one.
Create a new one, name it TNS_ADMIN and set the value to be wherever your files are - say c:\oracle\instantclient10g\network\admin (you may need quotes if there are spaces - but Oracle won't like spaces anyway - so avoid them!)
OK your way back out.
That should work.
Caveat: I don't use instant client and neither does anyone here. But in my job, it helps to have at least a slight clue about other Oracle things. Just in case.
Have fun.
Cheers,
Norm. [TeamT]
Information in this message may be confidential and may be legally privileged. If you have received this message by mistake, please notify the sender immediately, delete it and do not copy it to anyone else.
We have checked this email and its attachments for viruses. But you should still check any attachment before opening it.
We may have to make this message and any reply to it public if asked to under the Freedom of Information Act, Data Protection Act or for litigation. Email messages and attachments sent to or from any Environment Agency address may also be accessed by someone other than the sender or recipient, for business purposes.
If we have sent you information and you wish to use it please read our terms and conditions which you can get by calling us on 08708 506 506. Find out more about the Environment Agency at www.environment-agency.gov.uk
TOAD does have red X's on the TNSNames Editor, LDAP Editor and SQNET editor - that seems to me that it cant find those
Did you restart Toad after changing environment variable? Typically environment variable changes aren't pushed out to running applications. If you have, ensure that your TNS_ADMIN environment variable is setup properly. Mine, for instance is setup as...
TNS_ADMIN=C:\Oracle\TNS_ADMIN
And in C:\Oracle\TNS_ADMIN I have tnsnames.ora and sqlnet.ora.
Also, verify that your tnsnames.ora file is setup properly, your DB is up and running, etc.