Skip to content

Latest commit

 

History

History
50 lines (39 loc) · 2.35 KB

File metadata and controls

50 lines (39 loc) · 2.35 KB

Guide to Using Oracle Instant Client and Setting Environment Variables on Windows

Korean OCI HELP

1. What is Oracle Instant Client?

Oracle Instant Client is a minimal set of libraries required to connect to an Oracle database. You can use it by simply extracting it to a specific directory and setting environment variables, without a complex installation process.

2. Required DLL Files

The main DLLs needed to run Oracle Instant Client on Windows are:

  • oci.dll: Core DLL for Oracle Call Interface
  • oraociei19.dll: Oracle Client Environment Interpreter (included in Instant Client package)
  • oraons.dll: Oracle Notification Service (may be used in cluster environments)
  • orannzsbb19.dll: For Oracle Advanced Security (needed for SSL/TLS)
  • oraociicus19.dll: Lightweight DLL for English locale only (needed in specific cases)
  • libclntsh.dll: Referenced by some client programs

Additionally, Visual C++ runtime DLLs (such as msvcr120.dll, msvcp120.dll, etc.) may be required depending on your environment.

3. DLL Linking and Runtime Notes

  • At compile (build) time: Linking with oci.lib is sufficient.
  • At runtime: All the DLLs mentioned above must be in the same directory as your executable or in a directory listed in the PATH environment variable.

4. Setting Windows Environment Variables

(1) Add to PATH

  1. Search for Environment Variables in the Windows Start menu → Click Edit the system environment variables
  2. Click the Environment Variables... button
  3. Select Path under system or user variables → Click Edit
  4. Click New and enter the Instant Client path (e.g., C:\oracle\instantclient_19_23)
  5. Click OK → OK → Apply

(2) (Optional) Add TNS_ADMIN

If you need to specify the path to your TNSNames.ora file:

  • Variable name: TNS_ADMIN
  • Variable value: C:\oracle\network\admin

(3) (Optional) Add NLS_LANG

To set the character set:

  • Variable name: NLS_LANG
  • Variable value: KOREAN_KOREA.KO16MSWIN949

5. How to Check Environment Variable Settings

In Command Prompt, enter:

where oci.dll

If set correctly, the path to oci.dll in your PATH will be displayed.

6. Final Notes

Following these steps will allow you to use Oracle Instant Client reliably on Windows. You may also use tools like Dependency Walker to check DLL dependencies if needed.