Connecting to an Oracle database via ODBC using only the InstantClient

Until today, I thought to be able to connect to an Oracle database from your Windows machine, you need to install the complete Oracle client including the Enterprise Manager etc. (>1GB). However, today I finally found a way to use Oracle via ODBC using only the InstantClient (ca. 50MB) on the Oracle website:

  1. First of all, download the InstantClient and the corresponding ODBC drivers for your platform from Oracle’s download site.
  2. Extract the archives into a directory of your choice, e.g. D:\Dev\Oracle\instantclient_11_2 (from now on referred to as %INSTALLDIR%).
    Connect to Oracle via ODBC using the InstantClient (directory structure)
  3. Run odbc_install.exe in %INSTALLDIR%.
    Connect to Oracle via ODBC using the InstantClient (installing the ODBC driver)
  4. Create the directory %INSTALLDIR%\network\admin and place your tnsnames.ora file in that directory.
    Connect to Oracle via ODBC using the InstantClient (adding tnsnames.ora)
  5. Set the environment variable ORACLE_HOME to %INSTALLDIR%.
    Connect to Oracle via ODBC using the InstantClient (setting ORACLE_HOME)
  6. Configure a new ODBC data source using InstantClient.
    Connect to Oracle via ODBC using the InstantClient (creating an ODBC data source)

That’s it! Now you’ll be able to connect to your Oracle database via ODBC.

Über Stefan

Polyglot Clean Code Developer

Schreibe einen Kommentar

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert

To create code blocks or other preformatted text, indent by four spaces:

    This will be displayed in a monospaced font. The first four 
    spaces will be stripped off, but all other whitespace
    will be preserved.
    
    Markdown is turned off in code blocks:
     [This is not a link](http://example.com)

To create not a block, but an inline code span, use backticks:

Here is some inline `code`.

For more help see http://daringfireball.net/projects/markdown/syntax