Connecting C and C++ applications with Instant Client
Instant Client 18c allows C and C++ applications to connect to Oracle Database Exadata Express Cloud Service. Network security is enforced by using an Oracle Wallet, which can be downloaded from the database service.
Download the Instant Client 18c 'basic' package for the desired architecture:
For other platforms, download using links from the Oracle Instant Client page. Review Support Note 2183770.1 for any required updates.
The smaller 'basiclite' package may be used instead of 'basic'. The smaller package contains only English error messages and has support for Unicode, ASCII, and Western European character sets.
For ODBC applications also download the 'odbc' package. Refer to Oracle Instant Client ODBC Release Notes for generic ODBC configuration instructions.
C:\instantclient_18_5
or /home/myuser/instantclient_18_5
.C:\instantclient_18_5
to the PATH
variable in the "System variables" section of the Environment Variables pane. On Windows 8 this can be accessed by navigating to Control Panel>System>Advanced System Settings>Environment Variables. If you have multiple versions of Oracle libraries installed, make sure the new directory occurs first in the path.
cd /home/myuser/instantclient_18_5
ln -s libclntsh.so.18.1 libclntsh.so
Applications and tools that use the OCCI C++ API also need the symbolic link:
ln -s libocci.so.18.1 libocci.so
Set the library path:
export LD_LIBRARY_PATH=/home/myuser/instantclient_18_5:$LD_LIBRARY_PATH
Instead of setting LD_LIBRARY_PATH, you could create an ldconfig configuration file if there is no other Oracle software that will be impacted:
sudo sh -c "echo /home/myuser/instantclient_18_5 > /etc/ld.so.conf.d/oic.conf"
sudo ldconfig
Linux Instant Client RPM package can be used instead of zip file. With these, it is not necessary to create a symbolic link.
client_credentials.zip
containing your security credentials and network configuration files that will allow client access to your cloud database. Save this zip file to a secure location.
network
and network/admin
subdirectories in the Instant Client directory, if they do not exist, and unzip the client credentials there. For example unzip the wallet so the files are in the C:\instantclient_18_5\network\admin
, /home/myuser/instantclient_18_5/network/admin
or /usr/lib/oracle/18.5/client64/lib/network/admin
directory.
Secure the files so that only users who are authorized to connect to the Exadata Express service have access to them. By default, Oracle recommends granting permissions only to the file owner.
TNS_ADMIN
environment variable to that directory name.
tnsnames.ora
file. For example, use dbaccess
as the connect string. Alternatively, change the connect string in tnsnames.ora
to match the string used by your application.
Use your Oracle Database Exadata Express database username and password. See Creating Database Schemas if you need to create a user.