Vincent,

To connect to the Oracle7 database using the Net8 tnsnames entry with Perl
linked to Oracle8 you will need ORACLE_HOME set to
'/export/home/oracle/app/oracle/product/8.1.6'.

ORACLE_SID is irrelevant for this type of connection as it is specified in
the tnsnames file.

The connect string (or TWO_TASK) value should be used as the first argument
to DBI->connect.

HTH,
Tim

----- Original Message -----
From: "Vincent Roquencourt" <[EMAIL PROTECTED]>
To: "Tim Scott" <[EMAIL PROTECTED]>
Cc: "Vincent Roquencourt" <[EMAIL PROTECTED]>;
<[EMAIL PROTECTED]>
Sent: Tuesday, May 29, 2001 10:50 AM
Subject: Re: Connection pb with 2 oracle version! Please help!


> On Tue, May 29, 2001 at 10:28:01AM +0100, Tim Scott wrote:
> > Voncent,
> >
> > You'd be better to setup a tnsnames entry in your Oracle8.1.6 area to
point
> > at your Oracle 7.3.4 database and using this as a connect string.
> >
> > If you don't do this, you're using Oracle8 function calls from your
Perl/DBI
> > build to try to talk to an Oracle7 database. This is asking for
trouble -
> > even if you do eventually connect.
> >
> > Regards,
> > Tim
>
> Hi Tim,
> thanks for your quick reply, however i just tested it:
> $ENV{ORACLE_HOME}= '/export/home/oracle/app/oracle/product/7.3.4';
> $ENV{ORACLE_SID}='mydb';
> print "$ENV{ORACLE_HOME} .... $ENV{ORACLE_SID}\n";
>         if( !( $dbh = DBI->connect($ENV{ORACLE_SID},$USER,$PASS,
'Oracle') ) ) {
> print "not connected\n $DBI::errstr";
>         }
>         else{
> print "connected\n"
> };
>
>
> #this is supposed to connect using tnsnames.ora (sqlplus $USER@mysid works
with both db)
> i get the same error with the 7.3.4:
>
> /export/home/oracle/app/oracle/product/7.3.4 ....mydb
> not connected
>  ORA-01005: null password given; logon denied (DBD ERROR: OCISessionBegin)
>
> but not with the 8.1.6!
> /export/home/oracle/app/oracle/product/8.1.6 .... deuro
> connected
>
> user exists on both db (tested with sqlplus via sqlnet)
>
>
> HEEEELp!!! :)
>
>

Reply via email to