Oracle Instant Client – no chocolatey package for automatic install on Windows (yet?)
Posted by jpluimers on 2021/05/20
I tried finding a chocolatey package for the [WayBack] Oracle Instant Client – Free tools and libraries for connecting to Oracle Database.
The [WayBack] Instant Client editions support light-weight installations of the Oracle database client.
I was especially interested in automating the install of the basic or basic basic light varieties:
Instant Client Package
Description
References
Basic
All files required to run OCI, OCCI, and JDBC-OCI applications for Oracle Database
Basic Light
Smaller version of the Basic package, with only English error messages and Unicode, ASCII, and Western European character set support
Having this is a prerequisite of many DAC layers, including ODBC, although for the latter, you also need this one:
Instant Client Package
Description
References
ODBC
Additional libraries providing ODBC
Since there is no chocolatey maintained package for any of these, these are the steps to download them:
- Ensure you have a Oracle account
- Sign in on www.oracle.com/webapps/redirect/signon?nexturl=https://www.oracle.com/technetwork/developer-tools/sql-developer/downloads
- Accept cookies if asked for
- Click on the “Downloads” button to go to [WayBack] Oracle Instant Client Downloads
- Click on either [WayBack] Instant Client for Microsoft Windows (32-bit) (note that [WayBack] Instant Client for Microsoft Windows (x64) is specific for Win64 applications; many are 32-bit only, especially end-user ones, for instance many supporting Microsoft Office (including Outlook addins, or document storage systems)
- Click on the “Accept License Agreement” radio button
- Select the version you need.
- This highly depends on your server version, see these documents:
- At the time of writing, the most recent versions were these:
-
- Version 18.5.0.0.0
- instantclient-basic-nt-18.5.0.0.0dbru.zip
- instantclient-basiclite-nt-18.5.0.0.0dbru.zip
- https://download.oracle.com/otn/nt/instantclient/185000/instantclient-sqlplus-nt-18.5.0.0.0dbru.zip
- https://download.oracle.com/otn/nt/instantclient/185000/instantclient-tools-nt-18.5.0.0.0dbru.zip
- https://download.oracle.com/otn/nt/instantclient/185000/instantclient-sdk-nt-18.5.0.0.0dbru.zip
- https://download.oracle.com/otn/nt/instantclient/185000/instantclient-jdbc-nt-18.5.0.0.0dbru.zip
- instantclient-odbc-nt-18.5.0.0.0dbru.zip
- Version 12.2.0.1.0
- instantclient-basic-nt-12.2.0.1.0.zip
- instantclient-basiclite-nt-12.2.0.1.0.zip
- http://download.oracle.com/otn/nt/instantclient/122010/instantclient-sqlplus-nt-12.2.0.1.0.zip
- http://download.oracle.com/otn/nt/instantclient/122010/instantclient-tools-nt-12.2.0.1.0.zip
- http://download.oracle.com/otn/nt/instantclient/122010/instantclient-sdk-nt-12.2.0.1.0.zip
- http://download.oracle.com/otn/nt/instantclient/122010/instantclient-jdbc-nt-12.2.0.1.0.zip
- instantclient-odbc-nt-12.2.0.1.0-2.zip
- Version 18.5.0.0.0
Both the 12.2.0.1.0 instantclient packages require the [WayBack] Microsoft Visual Studio 2013 Redistributable which now redirects to [WayBack] The latest supported Visual C++ downloads, for download links, see:
– my blog post Links to various Visual C++ Redistributable Packages for Visual Studio downloads (arm/x64/x86 when available)
– automated Chocolatey install [WayBack] Chocolatey Gallery | Visual C++ Redistributable Packages for Visual Studio 2013.
-
- Download and install the required files.
- Unzip and add the directories to the
PATH
TNSPING
Note that these downloads not include TNSPING
; for some reason, Oracle only adds that to the fat client. So you need to use alternatives:
- [WayBack] www.orafaq.com/wiki/images/1/13/McTnsping.zip via[WayBack] oracle – How to install tnsping? – Stack Overflow
- [WayBack] GitHub – nvanwyen/oraping: Oracle TNS*Ping (tnsping) command line alternative, designed to work with Oracle Instant Client on Linux and Windows
- [WayBack] Alternative tnsping utility – CodeProject
You can also use sqlplus with sscripting, but that is much harder on Windows than on Linux:
- [WayBack] linux – Check database connectivity using Shell script – Stack Overflow
- [WayBack] tnsping and instant client – Laurent Schneider
Note there are very distinctive differences between tnsping
and sqlplus
, see How to do tnsping? | Oracle Community which I will quote large parts of soon.
For sqlplus: it works with TNSNAMES.ORA
, but you can also do without it.
For all the other tnsping
substitutes: ensure your TNS_ADMIN
points to a directory with a correct TNSNAMES.ORA
file.
What I usually do is this:
- Create directory a directory
ORA
under%LOCALAPPDATA%
- Store
TNSNAMES.ORA
inside%LOCALAPPDATA%\ORA
- Point
TNS_ADMIN
environment variable to%LOCALAPPDATA%\ORA
- Unzip any of the
instantclient-basiclite-nt-*.zip
into%LOCALAPPDATA%\ORA\InstantClient
- Unzip any of the
instantclient-sqlplus-nt-*.zip
into%LOCALAPPDATA%\ORA\SqlPlus
- Add
%LOCALAPPDATA%\ORA\InstantClient;%LOCALAPPDATA%\ORA\SqlPlus
to the userPATH
Related
My blog post Chocolatey: installing Oracle SQL Developer and updating the chocolatey package (which works without the instantclient).
[WayBack] Install Oracle Instant Client on Linux and Windows | HelloDog: Install Oracle instantclient basic and instantclient sqlplus on Linux and Windows (and some tnsping
examples).
[Archive.is] oracle – How to set tnsnames.ora location for SQL Developer in Windows 10 – Stack Overflow
–jeroen
Leave a comment