If "host=localhost;sid=TEST1" in place of "TEST1" works, you have an error
in tnsnames.ora.

How to fix it depends on your platform.  Most Win32 Oracle installs have a
Easy*Net icon that starts a program that will build TNS entries for you.  On
most other platforms, you will have to add the entry by hand.
--
Mac :})
** I normally forward private database questions to the DBI mail lists. **
Give a hobbit a fish and he'll eat fish for a day.
Give a hobbit a ring and he'll eat fish for an age.
----- Original Message -----
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, April 02, 2001 3:35 AM
Subject: Oracle conenct question


> Using...
>
> $dbh = DBI->connect('dbi:Oracle:TEST1', 'test1', 'test1' , {Printerror =>
0,
> RaiseError => 1} );
>
> I get Oracle error ORA-12154 TNS: could not resolve service name (DBD
Error:
> OCIServerAttach)
>
> Yet I don't really want to use TNS (I think) - I want to do an old
fashioned
> connect to SID TEST1 using userid/passwd test1/test1 equivalent to
>
> ORACLE_HOME=/opt/oracle.....
> ORACLE_SID=TEST1
> sqlplus test1/test1
>
>
> Can someone explain what is going on? I'm quite happy to admit I might
have
> a configuration error either in the DBD installation or in Oracle but what
> do I do about it?
>
> How does DBI differentiate between the types of (Oracle) connect string it
> can receive anyway? This is one area where I feel the O'Reilly
"Programming
> the perl DBI" is a bit short on explained examples :-}
>
> (I'm not a real Oracle DBA, so I'm quite happy to confess to being stupid
> ;-D )
>
> Many thanks
>
> Bill
>
>
>
>


Reply via email to