Thursday, June 12, 2008

Installing Oracle's ODBC drivers


One of my projects requires an ODBC connection from a Windows environment to Oracle 10x. As most of you know, it's difficult to find step-by-step instructions on how to install it. So this is what I've done so far to at least get the driver installed:

  1. Download Oracle InstantClient (Basic) and the InstantClient ODBC suppliment (http://www.oracle.com/technology/tech/oci/instantclient/index.html). It’s a much smaller footprint than installing the whole Oracle Client.
  2. Unzip both files to folder. Copy root folders to a folder like C:\Oracle\instantclient (basic and supplement will be in same folder).
  3. Run odbc_install.exe from command prompt – you can see results better than double-clicking the executable.
  4. Add Oracle’s System Variables (Windows control panel\System\Advanced tab, click Environment Variables, click Add for System Variables):
    LD_LIBRARY_PATH
    PATH (append)
    SQLPATH
    TNS_ADMIN
  5. Add (create) TNSNAMES.ORA file to folder described above in TNS_ADMIN.
  6. Create ODBC data source connection the typical way in Windows.
  7. And there you have it! To uninstall, first delete ODBC connection that you created in step 6, then remove envronment variables from step 4, then run odbc_uninstall.exe.

No comments: