Something that I'd like to share with you!

Sunday, October 18, 2009

Toad 9.7 & Oracle Instant Client 11.1

10 comments :
Referring to Toad + Oracle instant client, I tried to set it up but unfortunately it doesn't work out for me. Some extra additional steps help to resolve the issue and I love to share it here.

First, download Oracle Client from Oracle Database Instant Client. Instant Client Package - Basic Lite wil do just fine. (about 17MB)

Next, create 4 folders ( recommended under c:\Program Files ) according to folder hierarchy below;



You should have 4 folders.

C:\Program Files\oracle
C:\Program Files\oracle\bin
C:\Program Files\oracle\network
C:\Program Files\oracle\network\admin


Now, extract the Instant Client Package to C:\Program Files\oracle\bin ( make sure the oci.dll is in the C:\Program Files\oracle\bin )



Right click at My Computer > Properties > Goto Advance tab > Click Environment Variables. Add listed Environment Variables below to your OS.

LD_LIBRARY_PATH = C:\Program Files\oracle\bin
ORACLE_HOME = C:\Program Files\oracle
ORACLE_HOME_NAME = C:\Program Files\oracle
SQL_PATH = C:\Program Files\oracle
TNS_ADMIN = C:\Program Files\oracle\network\admin




Under system variables, edit Path, add C:\Program Files\oracle\bin to the end of other path (don't forget to separate it with ";")



Copy/create 3 simple *.ora files below to C:\Program Files\oracle\network\admin



tnsnames.ora
DEV =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = foo)(PORT = 1531))
)
(CONNECT_DATA =
(SERVICE_NAME = foo)
)
)



sqlnet.ora
NAMES.DIRECTORY_PATH= (LDAP, TNSNAMES, HOSTNAME)
NAMES.DEFAULT_DOMAIN = WORLD
TRACE_LEVEL_CLIENT = OFF
SQLNET.EXPIRE_TIME = 30


ldap.ora
DEFAULT_ADMIN_CONTEXT = “ou=oracledatabases,dc=mycompany,dc=com”
DIRECTORY_SERVERS = (ldap_server.mycompany.com:389:636)
DIRECTORY_SERVER_TYPE = OID


Finally, test it out.



The drop down button seems to be highlighted in red but it works. I've tried it with several DB connections.

10 comments :

Riki said...

Put oraclient10.dll (from Oracle public client) in bin directory, and oracle home will be ok for Toad (red highlight out ;) ).

Thanks for the post, not tested, but helped :D

damupi said...

tks so much 4 your post, i was almost a day tryin' 2 install pssql on my w7 64bits computer without success til I see your blog.

I really apreciate your help ando hope you don't mind to link you on my blog.

John Watzke said...

Thanks a bunch! That got TOAD working for me with the instant client.

orafighter said...

what entries I have to do in SQLNET.ora and LDAP.ora ,
my TNSNAMES entries as below

TNSNAMES
*************************
FRSSRC =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = EINSTEIN01)(PORT = 1522))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = frssrc)
)
)
*************************

leorick said...

I just them as they are.
my sqlnet.ora looks like below...

NAMES.DIRECTORY_PATH= (LDAP, TNSNAMES, HOSTNAME)
NAMES.DEFAULT_DOMAIN = WORLD
TRACE_LEVEL_CLIENT = OFF
SQLNET.EXPIRE_TIME = 30

and my ldap.ora as below...

DEFAULT_ADMIN_CONTEXT = “ou=oracledatabases,dc=mycompany,dc=com”
DIRECTORY_SERVERS = (ldap_server.mycompany.com:389:636)
DIRECTORY_SERVER_TYPE = OID

Narjara Aguilera said...

PERFECT!!!
I did it and realy works.
Thank you very much!

Panagiotis Biris said...

Great it worked for me! Thank you!

Juan Teofilo Suyo Choque said...

Can I install server and client at same pc? I’ve istalled server on a different PC and client (other pc) like this page and I run TOAD then say this message: “ORA-12541: TNS:no listener” I can’t undertand it..

leorick said...

From what I understand, installing Oracle DB will also install Oracle Client to that PC. That would be better than Oracle Instant Client. Unfortunately, I'm not familiar with Oracle DB installation :-(

"ORA-12541: TNS no listener" might caused by the tnsnames.ora was not pointing to correct server (host and port) or the listener it self was not running.

You can try to use other tool for testing such as DbVisualizer just to make sure the DB is OK. From there you might be able to identify which side is having an issue, DB or TOAD.

Unknown said...

Un aporte esto funciona (para el caso de TOAD no conecta a BD oracle XE)
cortar y pegar desde Program Files(X86) hacia Archivos de Programa, tengo toad 10_7, BD:Oracle XE, Windows 7 64 bits