Oracle connector development¶
Table of contents¶
Building from source
Example program
Building from source¶
To download and install Tarantool developer packages and OCI, say:
(example for Ubuntu)
# Tarantool
sudo apt-get install cmake
sudo apt-get install tarantool
sudo apt-get install tarantool-dev
# OCI
# see the link to installation instructions below
(example for CentOS)
sudo yum install cmake
sudo yum install tarantool
sudo yum install tarantool-devel
# assuming that OCI rpm is already downloaded into the '.' directory
sudo yum install ./oracle-instantclient12.2-basic-12.2.0.1.0-1.x86_64.rpm
sudo yum install ./oracle-instantclient12.2-devel-12.2.0.1.0-1.x86_64.rpm
(example for Mac OS)
brew install cmake
brew install tarantool
# OCI
# see the link to installation instructions below
Here are installation and setup instructions for OCI.
The oracle
package is in a private repository.
If you have access, еo download and install it, say:
cd ~
git clone git@gitlab.com:tarantool/enterprise/oracle.git
cd oracle
# assuming that oracle-instantclient is installed from rpm
cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -DORACLE_LIB_ROOT=/usr/lib/oracle/12.2/client64/lib/ -DORACLE_INCLUDE_ROOT=/usr/include/oracle/12.2/client64/ .
make
This should produce a library named ./oracle/driver.so
.
Make sure that this file, or a copy, is on the path that the Lua require
statement
uses (package.path
). The easiest way to ensure this is to add:
sudo make install
Example program¶
See examples in test/*.lua.