Sunday, June 13, 2010

Installing Oracle Client using TOAD

1)Install the oracle instant client. (instantclient_10_2)
Unzip the files to a directory, and then copy the path of this directory to the clipboard.

2)Add this directory to the PATH environmental variable.
right click on My Computer, go to the Advanced tab, and click 'Environment Variables'. Under System variables, find 'Path'. Select it, and click edit. ctrl-v to paste the directory into the string, and say OK. e.g.:

Before:C:\Perl\bin\;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;C:\Program Files\Common Files\Roxio Shared\DLLShared\;C:\Program Files\Common Files\Roxio Shared\10.0\DLLShared\

After: C:\Perl\bin\;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;C:\Program Files\Common Files\Roxio Shared\DLLShared\;C:\Program Files\Common Files\Roxio Shared\10.0\DLLShared\;C:\instantclient_10_2


3)In the same window, under 'User variables for ...', Click the New button. Call the variable 'TNS_ADMIN'. ctrl-v to paste the directory path into the 'variable value' field. Say OK, and close out the 'My Computer' properties windows.

e.g Varaible name TNS_ADMIN
variable value C:\instantclient_10_2


4)Create a file called 'TNSNAMES.ORA' in your instant client installation directory. In this file designate the connection parameters for your database. Mine looked something like this:

DB_ALIAS =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = ip.add.re.ss)(PORT = 1521))
)
(CONNECT_DATA =
(SID = orcl)
(SERVER = DEDICATED)
)
)

replace the DB_ALIAS, ip.add.re.ss, port, and SID with your settings.


5)Reset your computer, fire up Toad, and then open a new connection. You should see DB_ALIAS as an option under the database field. Set your username and password, hit connect

No comments:

Post a Comment