DBI:Oracle failure ORA-12154

DBI:Oracle failure ORA-12154

am 09.12.2005 14:37:33 von claude.b

I run locally a client script which fails with the following message:

ORA-12154: TNS:could not resolve service name (DBD ERROR:
OCIServerAttach) at ...
DBI::connect('DBI','dbi:Oracle:abc','batman','secret','HASH( 0x82d7910)')
called at ...

The datasource seems ok to me, and I checked from 'tnsnames.ora' that
the port is set up to the default 1521 and the name is 'abc'.

Any idea of what could be the problem?
--
Claude

Re: DBI:Oracle failure ORA-12154

am 09.12.2005 15:49:39 von jseger

------=_Part_3297_7851276.1134139779099
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

Is $ORACLE_HOME set to the correct path?

If the tnsnames.ora is not in $ORACLE_HOME/network/admin/, is $TNS_ADMIN se=
t
to the actual location of the file?

On 09 Dec 2005 15:37:33 +0200, Claude wrote:
>
> I run locally a client script which fails with the following message:
>
> ORA-12154: TNS:could not resolve service name (DBD ERROR:
> OCIServerAttach) at ...
> DBI::connect('DBI','dbi:Oracle:abc','batman','secret','HASH( 0x82d7910)'=
)
> called at ...
>
> The datasource seems ok to me, and I checked from 'tnsnames.ora' that
> the port is set up to the default 1521 and the name is 'abc'.
>
> Any idea of what could be the problem?
> --
> Claude
>



--
It all comes down to a choice really.
You can get busy living, or get busy dying.
--Stephen King

------=_Part_3297_7851276.1134139779099--

Re: DBI:Oracle failure ORA-12154

am 12.12.2005 08:20:23 von claude.b

>>>>> "Jeffrey" == Jeffrey Seger writes:

Jeffrey> Is $ORACLE_HOME set to the correct path?

Now it is.

Jeffrey> If the tnsnames.ora is not in $ORACLE_HOME/network/admin/, is
Jeffrey> $TNS_ADMIN set to the actual location of the file?

Jeffrey> On 09 Dec 2005 15:37:33 +0200, Claude wrote:
>>
>> I run locally a client script which fails with the following message:
>>
>> ORA-12154: TNS:could not resolve service name (DBD ERROR:
>> OCIServerAttach) at ...
>> DBI::connect('DBI','dbi:Oracle:abc','batman','secret','HASH( 0x82d7910)')
>> called at ...
>>
>> The datasource seems ok to me, and I checked from 'tnsnames.ora'
>> that the port is set up to the default 1521 and the name is 'abc'.

That was not enough, and the ds syntax above was not correct. I
managed to get the connection working by setting the ds to
'dbi:Oracle:host=127.0.0.1;port=1521;sid=abc'.

Tx for your time, Jeffrey!
--
Claude