Skip Ribbon Commands
Skip to main content

Distribution

:

Application Configuration Notes: Oracle Instant Client

Documentation and logs for UVM OS and application distribution methodologies
After a lot of testing, I decided the best way to handle distribution of the Oracle client is to repackage it.  I used INNO Setup, since I have gained a fair amout of experience with it of late.  Here is the basic build procedure:
  • Obtain the Oracle Instant Client from http://www.oracle.com/technology/tech/oci/instantclient/index.html
  • Extract the Basic, ODBC, SQLPlus, and JDBC packages into a directory to be used as the installer build source.
  • Add your ./network/admin/tnsnames.ora  "sqlnet.ora" and "ldap.ora" file to the source, to be installed in the {app}/network/admin directory.
  • Set your script to declare the system environment variable "%ORACLE_HOME%", and set it to the installation directory.  (NOTE that setting an "ORACLE_HOME" is not required when only one version of the client is present, and when the client libraries are defined in your system %PATH% environment variable.)
  • Define a registry string value named "TNS_ADMIN" in the HKLM:\Software\Oracle key.  Set it to the full path of the sqlnet.ora and ldap.ora files (presumably "{app}\network\admin")
  • Set your script to append the installation directory to the system environment variable %PATH%. (NOTE:  I used the "modpath.iss" supplemental script from http://legroom.net/software/modpath to make this possible).
  • Run the odbc_install.exe file included with the Instant Client.
  • Add start menu shortcuts for the SQLPlus executable.
  • Configure the installer to run odbc_uninstall.exe on uninstall.
  • Compile and test.

Oracle states that you should use their 64-bit client for 64-bit Windows, so I did write logic into the latest (11.2.0.1) installer to handle the different Windows architectures in use on campus.  However, it turns out that ApplicationXtender applications will not work with the 64-bit client. 

Why?  Because AX still requires the use of the "Microsoft OLE DB Provider for Oracle", which is a 32-bit only provider.  As a result, the provider interfaces only with 32-bit client binaries.  EMC is starting to support the "Oracle OLE DB Provider" that can be installed with full (not "Instant") Oracle clients (as of the AX 6.5 release, the Oracle-branded provider is supported for use with Unicode databases).  This provider is available in both 64-bit and 32-bit versions, but it is worth noting that 32-bit AX applications do not "see" the 64-bit provider when present.  To summarize, we will not be able to use the 64-bit for AX until EMC recompiles their software with 64-bit support.  It is sad, really.

For more details, see the install script in the staging directory.


Note that although Oracle provides and supports scripted installation through their "Oracle Universal Installer" product, we still (as of the 11.2.0.1 release of Oracle DB) are not going to use OUI. 

See the Oracle documentation on how to configure a silent installer for the Oracle client using the Oracle Universal Installer:
http://download.oracle.com/docs/cd/B19306_01/install.102/b14312/advance.htm#i634763

The main problem with scripting the Oracle Universal Installer (OUI) is that the "setup.exe" exits immediately after launch, thus preventing you from easily forcing your script to wait for the OUI to complete before proceeding.  The "-waitforcompletion" switch does not help.. this only forces the "oui.exe" sub-tree process from exiting.

The workaround is to perform all additional required system modifications before launching setup.exe in the script.  We could use "setx.exe" to set the %ORACLE_HOME% and %PATH% system environment variables, copy the TNSNAMES.ORA files into the .\network\admin directory, and then call setup.exe uwing the "-silent" and "-responseFile" switches to run an unattended setup.  Add the "-force" switch to allow the client to install into a non-empty directory.

Ultimately, though, OUI is just too cumbersome to use in production.  It is difficult to repackage into a self-extracting archive for two reasons: first, the scripting problems mentioned above would cause the archive to get deleted before installation has completed (yes, there are ways around this, but they require a lot of file copying); second, the installation source is rediculously bulky (the smallest I have been able to make it is about 500Mb); third, the installer is slow, prone to errors, and uninstalls extremely poorly.  In short, OUI is not fit for use by end-users.