I am unable to execute my OCCI application in a target system.
I have done the following deployment steps in the target system.
1) Downloaded "Oracle Instant Client Basic" and "SQLPlus" packages.
2) Added the unzipped location to the system PATH variable.
3) I am able to connect Oracle Server Database using "sqlplus" command.
While executing my OCCI application, the oracle environment is not creating. It is giving exception with junk error codes.
You don't mention your OS or compiler. C++ is notoriously inflexible with it comes to libraries. The OCCI libraries must match the compiler you are using for your project.
For Windows: Double check to ensure your version of MSVC compiler matches the oraocci dll you are using. For example, Oracle 11.2 ships with libraries for msvc 8 and 9. If you are using msvc 10 (Visual Studio 10), you'll need to get the latest occi dlls. You can obtain them from:
For the past couple of years, we've been using a OCCI-MSVCgateway, a "shim" that we place between our C++ application and OCCI. This code is small and efficient, and it decouples our code from OCCI versions. Simply drop the gateway dll (plus the corresponding oraocci dll) in the oracle BIN directory in the PATH. I highly recommend it for any project using OCCI.