Accessing a remote oracle DB


I need to hit an external oracle DB from ROOT.

I’m trying to do TSQLServer *myDB = TSQLServer::Connect(“oracle://”, “username”, “pw”);

I get the follwing error:

root [0] .x dbTest.C
Error in : Oracle[.so | .sl | .dl | .a |
.dll] does not exist in
Error: Function dbTest() is not defined in current scope FILE: LINE:0
Possible candidates are…
filename line:size busy function type and name
*** Interpreter error recovered ***

This is after I downloaded the Basic and SDK Instant Client packages from … index.html
, unzipped them into a directory, and pointed my $LD_LIBRARY_PATH to that directory.

I’m running ROOT 4.04/02b

What am I doing wrong?

Thank you very much,

Hi Mikhail,

You must build ROOT with Oracle support. Use these options :


at ./configure step.


Hi Bertrand,

Is there any way to get that to work without rebuilding ROOT? I don’t currently have root accounts on the box I’m working on…

Thank you,

Hi Mikhail,

Well, unfortunately, there is no binary distribution of ROOT 4.04/02b & Oracle…


Thanks Bertrand.

I guess I’ll have to see if I can get it rebuilt. I hope it doesn’t take too long :slight_smile:

Thanks again.


Sorry for digging an old thread back up, but I’m having more problems with TSQLServer… . Here’s my short macro:


void oracleTest(){

TSQLServer *db = TSQLServer::Connect(“oracle://”,“user”,“passw”);

TSQLResult *res;
res = db->Query(“select * from fwcaenchannel”);

I try to run this:

root [0] .L oracleTest.C
root [1] oracleTest()
Error in : Code: 12162 Msg: ORA-12162: TNS:net service name is incorrectly specified

Error: illegal pointer to class object db 0x0 76 oracleTest.C:8:
*** Interpreter error recovered ***

I did a little bit of research, and here’s what the ORA-12162 message means:
ORA-12162: TNS:net service name is incorrectly specified
Cause: The connect descriptor corresponding to the net service name in TNSNAMES.ORA or in the directory server (Oracle Internet Directory) is incorrectly specified.
Action: If using local naming make sure there are no syntax errors in the corresponding connect descriptor in the TNSNAMES.ORA file. If using directory naming check the information provided through the administration used for directory naming.

What does that mean? I hope someone can help out…

Thanks again,