4D v16

Parâmetros OCI

Página Inicial

 
4D v16
Parâmetros OCI

Parâmetros OCI    


 

 

In order for the 4D for OCI plug-in to function properly, you first need to install the files (libraries) needed to run the Oracle Call Interface (OCI).

In just a few simple steps, you can download the Oracle Instant Client and install it.

  1. Download the appropriate instantclient-basic-[...] package for your platform here: http://www.oracle.com/technetwork/database/features/instant-client/index-097480.html
    Notes:
    • The version installed (32- or 64-bit) must match the version of 4D used for 4D for OCI.
    • For 4D for OCI, the files to download are: instantclient-basic-nt-11.2.0.4.0.zip or instantclient-basic-windows.x64-11.2.0.4.0.zip (for Windows 32-bit or 64-bit, respectively).
  2. Unzip the packages into a single directory (e.g., C:\oracle\) and rename the subfolder as "instantclient" to get a path such as: C:\oracle\instantclient
  3. In the environment variables:
    • Add the ORACLE_HOME variable and set it to the path defined in step 2 (e.g.: C:\oracle\instantclient)
    • Edit the PATH variable and add this same path at the beginning
  4. Add a "network" subfolder to this path with an "admin" subfolder (e.g.: C:\oracle\instantclient\network\admin)
  5. In this "admin" subfolder, create a "tnsnames.ora" file with the parameters to your Oracle server.
    For example:

    XE =
      (DESCRIPTION =
          (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.10.10)(PORT = 1521))
        (CONNECT_DATA =
          (SERVER = DEDICATED)
          (SERVICE_NAME = XE)
        )
      )

On OS X  

Here are the steps to install the Oracle Instant Client and make it work with 4D for OCI:

  1. Download the appropriate instantclient-basic-[...] package for your platform here: http://www.oracle.com/technetwork/topics/intel-macsoft-096467.html
    Notes:
    • The version installed (32- or 64-bit) must match the version of 4D used for 4D for OCI.
    • For 4D for OCI, the files to download are: instantclient-basic-macos.x32-11.2.0.4.0.zip or instantclient-basic-macos.x64-11.2.0.4.0.zip (for 32- or 64-bit versions respectively).
  2. Copy the required Oracle library to the proper location:
    • Copy all the dylib files from instantclient-basic-[…].zip archive to /usr/local/lib (for example).
      The dylib files can be copied to one of the following paths:
      • $(HOME)/lib
      • /usr/local/lib
      • /lib
      • /usr/lib
    • Execute the command 'cd /usr/local/lib && sudo ln -sf libclntsh.dylib.11.1 libclntsh.dylib'.
    • Execute the command 'chmod 777 /usr/local/lib/libclntsh.dylib'.

    Note: Since 4D for OCI was designed with version 11.2.0.4.0, in order to avoid problems, we link it to “libclntsh.dylib” instead of the versioned file name.

    Note for El Capitan version: Only the $(HOME)/lib and /usr/local/lib directories are not restricted under El Capitan.

  3. Use a text editor to create a “/etc/tnsnames.ora” file and type entries like the example below:

    oracle4d =
       (DESCRIPTION =
          (ADDRESS_LIST =
             (ADDRESS = (PROTOCOL =TCP)(HOST = 10.96.0.61)(PORT = 1521))
          )
          (CONNECT_DATA =
             (SERVICE_NAME = oracle4d)
          )
       )

Note: Oracle does not provide a universal binary download so if you want to use both versions (32- and 64-bits), you have to download them separately and build your own universal binary, for example using the shell ditto command.

Tip: If you experience connection failure, you may want to use SQLPlus from Oracle. You can download the appropriate version (instantclient-sqlplus-macos.x32-11.2.0.4.0.zip or instantclient-sqlplus-macos.x64-11.2.0.4.0.zip) here: http://www.oracle.com/technetwork/topics/intel-macsoft-096467.html

 
 

 
PROPRIEDADES 

Produto: 4D
Tema: Parâmetros OCI

 
HISTÓRIA 

 
ARTICLE USAGE

4D for OCI ( 4D v16)