We need to use Sqlplus.exe for our database build process, but depending on which version of the Oracle client that is installed, the required files can be in a number of different directories.
To have a consistent build script, we want to place SQLPlus.exe in a well know directory on each of the build servers, no matter how the Oracle client was installed. To do this, we simply copy SQLPlus.exe and the supporting files to a well known directory where our build tools can execute it.
The tricky part is to get the correct supporting files deployed as well. To find the required supporting files:
1.) Start Sqlplus.exe from the normal Oracle client directory – where ever that is base on the Oracle install.
2.) Use Sysinternals Procmon.exe to view the SQLPlus.exe executable process and provide the associated dlls.
3.) The list of supporting dlls is:
- oci.dll
- oraocci11.dll
- oraociei11.dll
- orasqlplusic11.dll
- msvcr71.dll
By coping Sqlplus.exe and the dll’s listed above to a well known directory, we can reliably exeucte SQLPlus.exe from our build script – no matter how the oracle client was installed.