# Oracle support

**URL:** <https://root-forum.cern.ch/t/oracle-support/5723>\
**Category:** ROOT\
**Created:** [December 3, 2007, 11:31am UTC](https://root-forum.cern.ch/t/oracle-support/5723 "2007-12-03T11:31:14Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![sapinski](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/s/a87d85/32.png) [@sapinski](https://root-forum.cern.ch/u/sapinski)\
**Post date:** [December 3, 2007, 11:31am UTC](https://root-forum.cern.ch/t/oracle-support/5723/1 "2007-12-03T11:31:14Z")

</div>

Hello,  
is the Oracle still supported by root? The links to library sources on the GSI webpage are not active anymore. How can I get [Oracle.so](http://Oracle.so) for root 5.16?  
Cheers, Mariusz

---

<div class="post-metadata">

**Author:** ![linev](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/l/2bfe46/32.png) [@linev](https://root-forum.cern.ch/u/linev)\
**Post date:** [December 3, 2007, 11:43am UTC](https://root-forum.cern.ch/t/oracle-support/5723/2 "2007-12-03T11:43:52Z")

</div>

Hi, Mariusz

ROOT sources includes full-functional implementation of TSQLServer class. It is not compiled by default - in most cases you should install InstantClient from Oracle first and than configure and compile ROOT appropriately. See some tips in documentation for TOracleServer class:  
[http://root.cern.ch/root/html/TOracleServer.html](http://root.cern.ch/root/html/TOracleServer.html)

Regards,  
Sergey

P.S. Most probably, in CERN it is compiled per defualt (check in $ROOTSYS/lib/libOracle.so). If it is there, just try

```auto
sql = TSQLServer::Connect("oracle://server/db-name","user","pass");
```

Of course, correct server, db-name, user and pass should be specified.

---

<div class="post-metadata">

**Author:** ![sapinski](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/s/a87d85/32.png) [@sapinski](https://root-forum.cern.ch/u/sapinski)\
**Post date:** [December 3, 2007, 3:44pm UTC](https://root-forum.cern.ch/t/oracle-support/5723/3 "2007-12-03T15:44:36Z")

</div>

[quote=“linev”]Hi, Mariusz  
ROOT sources includes full-functional implementation of TSQLServer class. It is not compiled by default - in most cases you should install InstantClient from Oracle first and than configure and compile ROOT appropriately. See some tips in documentation for TOracleServer class:  
[http://root.cern.ch/root/html/TOracleServer.html](http://root.cern.ch/root/html/TOracleServer.html)

Regards,  
Sergey

P.S. Most probably, in CERN it is compiled per defualt (check in $ROOTSYS/lib/libOracle.so). If it is there, just try

```auto
sql = TSQLServer::Connect("oracle://server/db-name","user","pass");
```

Of course, correct server, db-name, user and pass should be specified.[/quote]

Thanks Sergey,

I have compiled root 5.16 with:  
./configure --enable-oracle --with-oracle-libdir=/usr/lib/oracleClient --with-oracle-incdir=/usr/include/oracle/11.1.0.1/client/

now when I do ldd /cern/root/lib/libOracle.so  
I get:  
linux-gate.so.1 =\> (0x00110000)  
libclntsh.so.11.1 =\> /usr/lib/oracleClient/libclntsh.so.11.1 (0x00670000)  
libstdc++.so.6 =\> /usr/lib/libstdc++.so.6 (0x00139000)  
libm.so.6 =\> /lib/libm.so.6 (0x00224000)  
libgcc\_s.so.1 =\> /lib/libgcc\_s.so.1 (0x0024d000)  
libc.so.6 =\> /lib/libc.so.6 (0x00259000)  
[libnnz11.so](http://libnnz11.so) =\> /usr/lib/oracleClient/libnnz11.so (0x003b2000)  
libdl.so.2 =\> /lib/libdl.so.2 (0x0055c000)  
libpthread.so.0 =\> /lib/libpthread.so.0 (0x00561000)  
libnsl.so.1 =\> /lib/libnsl.so.1 (0x0057a000)  
libaio.so.1 =\> /usr/lib/libaio.so.1 (0x00593000)  
/lib/ld-linux.so.2 (0x00653000)

there is no link to [libocci.so](http://libocci.so), which is strange, isn’t it?  
When I do:  
TSQLServer\* sql = TSQLServer::Connect(MTFServer,MTFUser,MTFPasswd);

I get:  
dlopen error: /cern/root/lib/libOracle.so: undefined symbol: \_ZTIN6oracle4occi12SQLExceptionE

what to do with it?

Mariusz

---

<div class="post-metadata">

**Author:** ![linev](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/l/2bfe46/32.png) [@linev](https://root-forum.cern.ch/u/linev)\
**Post date:** [December 3, 2007, 4:53pm UTC](https://root-forum.cern.ch/t/oracle-support/5723/4 "2007-12-03T16:53:09Z")

</div>

Hi, Mariusz

It is strange, that libocci is not linked with libOracle.  
Can you check following:  
[ul]

1. Is it exists in your /usr/lib/oracleClient directory?
2. Can you send output of configure script?
3. Do you correctly configure your LD\_LIBRARY\_PATH variable?  
[/ul]

Regards, Sergey

---

<div class="post-metadata">

**Author:** ![sapinski](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/s/a87d85/32.png) [@sapinski](https://root-forum.cern.ch/u/sapinski)\
**Post date:** [December 3, 2007, 6:39pm UTC](https://root-forum.cern.ch/t/oracle-support/5723/5 "2007-12-03T18:39:45Z")

</div>

[quote=“linev”]Hi, Mariusz

It is strange, that libocci is not linked with libOracle.  
Can you check following:  
[ul]

1. Is it exists in your /usr/lib/oracleClient directory?
2. Can you send output of configure script?
3. Do you correctly configure your LD\_LIBRARY\_PATH variable?  
[/ul]

Regards, Sergey[/quote]

Hi Sergei,

ad1. yes, it does  
ad2.  
Configuring for linux  
Checking for libX11 … /usr/lib  
Checking for X11/Xlib.h … /usr/include  
Checking for X11/Xft/Xft.h … /usr/include  
Checking for libXpm … /usr/lib  
Checking for libXft … /usr/lib  
Checking whether to build included libfreetype6 … yes  
Checking whether to build included libpcre … yes  
Checking whether to build included zlib … yes  
Checking for GL/gl.h … /usr/include  
Checking for libGL, or libMesaGL … /usr/lib  
Checking for libGLU, or libMesaGLU … /usr/lib  
Checking for mysql\_config … /usr/bin/mysql\_config  
Checking for libmysqlclient version \>= 3.23.\* … ok  
Checking for occi.h … /usr/include/oracle/11.1.0.1/client/  
Checking for libclntsh, or oci … no  
Checking for libocci, or oraocci10 … no  
Checking for libpq-fe.h … no  
Checking for libpq … no  
Checking for sql.h … no  
Checking for libsqlod … no  
Checking for sqlext.h … no  
Checking for libiodbc, libodbc, or odbc32 … no  
Checking for rfio\_api.h … no  
Checking for librfio, libshift, shiftmd, or shift … no  
Checking for rfio\_api.h … no  
Checking for stager\_api.h … no  
Checking for libshift, shiftmd, or shift … no  
Checking for gfal\_api.h … no  
Checking for libgfal … no  
Checking for G4Navigator.hh … no  
Checking for libG4navigation … no  
Checking for CLHEP/Vector/Rotation.h … no  
Checking for ApMon.h … no  
Checking for libapmoncpp … no  
Checking for monalisawsclient.h … no  
Checking for libmonalisawsclient … no  
Checking for fftw3.h … no  
Checking for libfftw3, or libfftw3-3 … no  
Checking for libpacklib\_noshift, libpacklib, packmd, or packlib … no  
Checking for libkernlib\_noshift, libkernlib, kernmd, or kernlib … no  
Checking for libPythia6 … no  
Checking for dcap.h … no  
Checking for libdcap … no  
Checking for chirp\_client.h … no  
Checking for libchirp\_client … no  
Checking for gapiUI.h … no  
Checking for libgapiUI … no  
Checking for jpeglib.h … /usr/include  
Checking for png.h … /usr/include  
Checking for tiffio.h … /usr/include  
Checking for gif\_lib.h … /usr/include  
Checking for libjpeg … /usr/lib  
Checking for libtiff … /usr/lib  
Checking for libungif … /usr/lib  
Checking for libz … /usr/lib  
Checking for libpng … /usr/lib  
Checking whether to build included libAfterImage … yes  
Checking for ldap.h … /usr/include  
Checking for libldap … /usr/lib  
Checking for liblber … /usr/lib  
Checking for python/Python.h, python2.5/Python.h, python2.4/Python.h, python2.3/Python.h, python2.2/Python.h, or Python.h … /usr/include  
Checking for libpython, libpython2.5, libpython2.4, libpython2.3, libpython2.2, python25, python24, python23, or Python … /usr/lib  
Checking for xml2-config … /usr/bin/xml2-config  
Checking for libxml2 version \>= 2.4.x … ok  
Checking whether to build xrootd … yes  
Checking for libssl … /usr/lib  
Checking for libcrypto … /usr/lib  
Checking for openssl/bio.h … /usr/include  
Checking for openssl/blowfish.h … /usr/include  
Checking for openssl/err.h … /usr/include  
Checking for openssl/pem.h … /usr/include  
Checking for openssl/rand.h … /usr/include  
Checking for openssl/rsa.h … /usr/include  
Checking for t\_server.h … no  
Checking for libsrp … no  
Checking for libgmp … /usr/lib  
Checking for libmisc … no  
Checking for pwauth.h … no  
Checking for krb5.h … /usr/include  
Checking for libk5crypto … /usr/lib  
Checking whether we’re using MIT Kerberos … yes  
Checking for libkrb5 … /usr/lib  
Checking for libcrypto … /usr/lib  
Checking for kinit … /usr/kerberos/bin/kinit  
Checking for libcom\_err … /usr/lib  
Checking for shadow passwords … yes  
Checking for gsl/gsl\_version.h … no  
Checking for gsl-config … not found  
Checking whether to build libMathMore … no  
Checking whether to build libMathCore … yes  
Checking whether to build CINT7 … no  
Checking whether to build libCintex … yes  
Checking whether to build libReflex … yes  
Checking whether to build libRooFit … no  
Checking whether to build libMinuit2 … no  
Checking whether to build libUnuran … no  
Checking whether to build libGdml … no  
Checking whether to build libTable … no  
Checking for Clarens support … no  
Checking for PEAC support … no  
Generating cint dictionaries.  
Checking whether setresuid declared in /usr/include/unistd.h … yes  
Writing config/Makefile.config … done  
Writing include/RConfigure.h … done  
Writing bin/root-config … done  
Writing etc/system.rootrc … done  
Writing etc/system.rootauthrc … done  
Writing etc/system.rootdaemonrc … done  
Writing etc/root.mimes … done  
Writing etc/daemons/rootd.rc.d … done  
Writing etc/daemons/rootd.xinetd … done  
Writing etc/daemons/proofd.rc.d … done  
Writing etc/daemons/proofd.xinetd … done  
Writing etc/daemons/xrootd.rc.d … done  
Writing etc/daemons/olbd.rc.d … done  
Writing bin/memprobe … done  
Writing build/misc/root-help.el … done  
Writing macros/html.C … done  
Writing bin/thisroot.sh … done  
Writing bin/thisroot.csh … done  
Writing config.status … done

Enabled support for asimage, astiff, builtin\_afterimage, builtin\_freetype, builtin\_pcre, builtin\_zlib, cintex, exceptions, krb5, ldap, mathcore, mysql, opengl, pch, python, reflex, shadowpw, shared, ssl, xft, xml, xrootd.

ad.3  
echo $LD\_LIBRARY\_PATH  
/lib:/cern/root/lib:/usr/lib:/usr/local/lib::/opt/mono-1.2/lib:/usr/lib/oracleClient:/usr/lib/mysql

Thank you!

Mariusz

---

<div class="post-metadata">

**Author:** ![sapinski](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/s/a87d85/32.png) [@sapinski](https://root-forum.cern.ch/u/sapinski)\
**Post date:** [December 3, 2007, 6:53pm UTC](https://root-forum.cern.ch/t/oracle-support/5723/6 "2007-12-03T18:53:48Z")

</div>

I see in configure script there is a check for “libocci oraocci10” and I have downloaded client version 11… maybe this is the problem?

Mariusz

---

<div class="post-metadata">

**Author:** ![linev](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/l/2bfe46/32.png) [@linev](https://root-forum.cern.ch/u/linev)\
**Post date:** [December 3, 2007, 8:40pm UTC](https://root-forum.cern.ch/t/oracle-support/5723/7 "2007-12-03T20:40:21Z")

</div>

Hi, Mariusz

Yes, this is your problem. If you look in configure output, you will see that both oracle libraries are not detected correctly:

> [@](#):
>
> …  
> Checking for occi.h … /usr/include/oracle/11.1.0.1/client/  
> Checking for libclntsh, or oci … no  
> Checking for libocci, or oraocci10 … no  
> …

Up to now only InstantClient 10 was tested and, as you have found, ROOT explicitly uses version 10 libraries. For now it is better for you to use this version of InstantClient. I will investigate if one can use version 11.

Thanks for reporting problem,  
Sergey

---

<div class="post-metadata">

**Author:** ![linev](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/l/2bfe46/32.png) [@linev](https://root-forum.cern.ch/u/linev)\
**Post date:** [December 4, 2007, 8:12am UTC](https://root-forum.cern.ch/t/oracle-support/5723/8 "2007-12-04T08:12:13Z")

</div>

Hi, Mariusz

I’ve checked Instant Client Version 11.1.0.6.0 with ROOT. There is no problem to compile ROOT sources, but to use libOracle, you should create symbolic links for both Oracle libraries:

```auto
ln -s libclntsh.so.11.1 libclntsh.so
ln -s libocci.so.11.1 libocci.so
```

On my machine (Debian Sarge) I also should install additional library - libaio.  
It is easy to find appropriate package for your system.

Regards,  
Sergey

---

<div class="post-metadata">

**Author:** ![sapinski](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/s/a87d85/32.png) [@sapinski](https://root-forum.cern.ch/u/sapinski)\
**Post date:** [December 4, 2007, 6:27pm UTC](https://root-forum.cern.ch/t/oracle-support/5723/9 "2007-12-04T18:27:18Z")

</div>

OK, I’ve found the problem. It was trivial… when recompiling root, even after using ./configure with different options, the libOracle was not touch! I had to remove this library and compile root again. Sounds trivial but I write anyway, maybe it will save somebody’s time.  
Thank you again Sergey!  
Mariusz
