Re: Error connecting to an Oracle DB

From: Antonio Bulgheroni <antonio.bulgheroni_at_gmail.com>
Date: Wed, 11 Oct 2006 11:26:15 +0200


Dear All,

        sorry for bringing back an old topic, but since I found the solution of the problem it may be of any help also for other users. As explained in http://ora-12154.ora-code.com/ a suitable tnsnames.ora file should be placed in the ORACLE_HOME directory of the client. This file is usually available on your server. To have your ROOT/Oracle interface working you need to have the oracle enviroment variables set and the tnsnames.ora should be readable also by non-root user! (Shame on me...!)

Thanks to Sergei and to all of you for your help.

Regard,

Antonio

-- 
Antonio Bulgheroni, PhD

The six steps of program management are:
(1)     Wild enthusiasm
(2)     Disenchantment
(3)     Total confusion
(4)     Search for guilty
(5)     Punishment for the innocent
(6)     Promotion of the non-participants

On 9/28/06, Linev Sergei <S.Linev_at_gsi.de> wrote:

>
> Hi, Antonio
> Could you connect with your account to database with some other tools, for
> instance with tora or any other database browser?
> It looks like that some of Oracle configuration are not correct for you.
> Look here http://ora-12154.ora-code.com/ for more information about error
> you get or contact with your Oracle database administrator.
>
> By the way, you do not need to explicitely load library - it should be
> done automatically by ROOT plugin mechnismus.
>
> Regards,
> Sergey Linev
>
>
> -----Original Message-----
> *From:* owner-roottalk_at_pcroot.cern.ch [mailto:
> owner-roottalk_at_pcroot.cern.ch] *On Behalf Of *Antonio Bulgheroni
> *Sent:* Donnerstag, 28. September 2006 17:14
> *To:* roottalk_at_pcroot.cern.ch
> *Subject:* [ROOT] Error connecting to an Oracle DB
>
> Dear ROOTers,
> I'm writing you because I'm in troubles connecting to an Oracle
> server using ROOT. It looks like the plug-in is correctly loaded but then
> something is wrong when the plugin is executed. Here below a very short
> example and the corresponding ROOT output. Hostname, user and password are
> hided for privacy
>
> void DBConnect() {
> gSystem->Load("libSQL");
> gSystem->Load("libclntsh");
> gSystem->Load("libOracle.so");
>
> const char * hostname = "oracle://hostname/db";
> const char * uid = "pippo";
> const char * pass = "***********";
>
> TSQLServer* serv = TSQLServer::Connect(hostname, uid, pass);
> }
>
> And this is the output
>
> Error in <TOracleServer::TOracleServer>: Code: 12154 Msg: ORA-12154:
> TNS:could not resolve the connect identifier specified
>
> *** glibc detected *** free(): invalid pointer: 0x08e1a8f0 ***
>
> I'm using ROOT 5.13.02 on a SLC4 linux box
> libocci 10.1
>
> Thanks for yuor help!
>
> Antonio
>
> --
> Antonio Bulgheroni, PhD
>
> Turn your Pentium II into a Gameboy: Type WIN at C:\>
>
>
Received on Wed Oct 11 2006 - 11:26:33 MEST

This archive was generated by hypermail 2.2.0 : Mon Jan 01 2007 - 16:32:01 MET