2 Installation and Upgrading

This chapter provides an overview of installation and upgrading for Oracle C++ Call Interface (OCCI).

2.1 About Installing Oracle C++ Call Interface

OCCI is installed as part of the Oracle Database. To determine additional configuration requirements, you should refer to the Oracle Database Installation Guide and the Oracle Database Client Installation Guide that is specific to your platform.

2.2 About Upgrading Considerations

To use the new features available in this release, you must recompile and relink all OCCI applications, including classes generated through the Object Type Translator Utility, when upgrading from an earlier Oracle Client release.

2.3 About Determining the Oracle Database Versions

When an application uses several separate code paths with different server versions or client patchsets, you can verify these options both during compilation and at run time.

2.3.1 Determining the Oracle Client Version During Compilation

The OCCI header files define OCCI_MAJOR_VERSION and OCCI_MINOR_VERSION macros. Example 2-1 illustrates one way to use these macros:

Example 2-1 How to Determine the Major Client Version and Set Performance Features

#if (OCCI_MAJOR_VERSION > 9)
     env->setCacheSortedFlush(true);  // benefit of performance, if available
#endif

2.3.2 About Determining the Oracle Client and Server Versions at Run Time

During run time, you can check both the client and server versions of the current Connection by using the getClientVersion(), getServerVersion(), and getServerVersionUString() methods.

2.4 Oracle Instant Client and Oracle Instant client Basic Light

Oracle Instant Client enables applications to connect to a local or remote Oracle Database for development and production deployment

  • About Oracle Instant Client: The Oracle Instant Client libraries provide the necessary network connectivity, as well as Oracle Database client-side files to create and run Oracle Call Interface (OCI), OCCI, ODBC, and JDBC OCI applications to make full use of Oracle Database.
  • About Oracle Instant Client Basic Light: Oracle Instant Client Basic Light further reduces the disk space requirements of a client installation.

2.5 About Using OCCI with Microsoft Visual C++

The Oracle Database 12c Release 1 (12.1) includes OCCI libraries for developing applications with Microsoft Visual C++ version 10.0 (.NET 2010 SP1 10.0), Microsoft Visual C++ version 11.0 (.NET 2012 11.0), Microsoft Visual C++ version 12.0 (.NET 2013 12.0), and Intel 12.1 C compilers with Microsoft Visual Studio 2010 STLs. Microsoft Visual C++ version 8.0 and version 9.0 are no longer supported.

Microsoft Visual C++ version 10.0 libraries are installed in the following default locations:

ORACLE_BASE\ORACLE_HOME\bin\oraocci12.dll
ORACLE_BASE\ORACLE_HOME\oci\lib\msvc\oraocci12.lib

Copies of these two files are also installed under the directory:

ORACLE_BASE\ORACLE_HOME\oci\lib\msvc\vc10

Microsoft Visual C++ 2012 OCCI libraries are installed in the following default location:

ORACLE_BASE\ORACLE_HOME\oci\lib\msvc\vc11

When developing OCCI applications with MSVC++ 2012, ensure that the OCCI libraries are correctly selected from this directory for linking and executing.

Microsoft Visual C++ 2013 OCCI libraries are installed in the following default location:

ORACLE_BASE\ORACLE_HOME\oci\lib\msvc\vc12

When developing OCCI applications with MSVC++ 2013, ensure that the OCCI libraries are correctly selected from this directory for linking and executing.

Applications should link with the appropriate OCCI library. You must ensure that the corresponding DLL is located in the Windows system PATH.

Applications that link to MSVCRTD.DLL, a debug version of Microsoft C-Runtime, /MDd compiler flag, should link with these specific OCCI libraries: oraocci12d.lib and oraocci12d.dll.

All Instant Client packages contain the versions of the OCCI DLLs that are compatible with Microsoft Visual C++ version 10.0.