NT ORACLE PERL DBD DBI->connect format 
Author Message
 NT ORACLE PERL DBD DBI->connect format

Hi,

I installed Perl 5.6.0 and DBI on my NT 4.0 Sevice pack 5
With DBD::ODBC it works fine with ORACLE 8i 8.1.5 databse
Then I installed DBD::Oracle and I have problem trying to connect
database

I tried two formats:

my $dbh = DBI->connect('DBI:Oracle:host=$dbserver ,sid=$dbname', $user,
$pass, 'Oracle');
and
$dbh = DBI->connect
('dbi:Oracle:G21DEV', 'USERNAME', 'PASSWORD', 'Oracle')

I have error message:
Database connection not made: ORA-00000: normal, successful completion
(DBD: log
in failed, check ORACLE_HOME/bin is on your PATH) at test5.pl line 36.

On my NT ORACLE_HOME\bin is on PATH

For my $dbh = DBI->connect('DBI:Oracle:host=$dbserver ,sid=$dbname',
$user, $pass, 'Oracle');
I am not sure what means  $dbname in for 8.1.5.
Is it connect string ? Or SERVICE_NAME ? Or database name ?
In $dbserver I used the name of my computer in LAN

For $dbh = DBI->connect
('dbi:Oracle:G21DEV', 'USERNAME', 'PASSWORD', 'Oracle')
I am not sure what is G21DEV for 8.1.5.
Is it connect string ? Or SERVICE_NAME ? Or database name ?

Id appreciate any help

Yakov

Sent via Deja.com http://www.*-*-*.com/
Before you buy.



Tue, 29 Oct 2002 03:00:00 GMT  
 NT ORACLE PERL DBD DBI->connect format
Hello Yakov!

Let's say the name of your server is '{*filter*}cat', your sid is 'orc2'
and the name of your database service is 'hiphop'.

You find your values in your tnsnames.ora file.

Then you can connect to your database like this:

$dbh = DBI->connect('DBI:Oracle:host={*filter*}cat;sid=orc2','username','passwd');

It should be also possible to connect like this:

$dbh = DBI->connect('DBI:Oracle:hiphop','username','passwd');

But at least one of these methods should work.

Quote:
>For my $dbh = DBI->connect('DBI:Oracle:host=$dbserver ,sid=$dbname',
>$user, $pass, 'Oracle');
>I am not sure what means  $dbname in for 8.1.5.
>Is it connect string ? Or SERVICE_NAME ? Or database name ?

Here $dbserver is the name of your server. When your server
has the name LAN the you must write host=LAN.

Quote:
>('dbi:Oracle:G21DEV', 'USERNAME', 'PASSWORD', 'Oracle')

G21DEV is the name of the service (the instance of your database).

Kind regards,

Frank

Quote:

>Hi,

>I installed Perl 5.6.0 and DBI on my NT 4.0 Sevice pack 5
>With DBD::ODBC it works fine with ORACLE 8i 8.1.5 databse
>Then I installed DBD::Oracle and I have problem trying to connect
>database

>I tried two formats:

>my $dbh = DBI->connect('DBI:Oracle:host=$dbserver ,sid=$dbname', $user,
>$pass, 'Oracle');
>and
>$dbh = DBI->connect
>('dbi:Oracle:G21DEV', 'USERNAME', 'PASSWORD', 'Oracle')

>I have error message:
>Database connection not made: ORA-00000: normal, successful completion
>(DBD: log
>in failed, check ORACLE_HOME/bin is on your PATH) at test5.pl line 36.

>On my NT ORACLE_HOME\bin is on PATH

>For my $dbh = DBI->connect('DBI:Oracle:host=$dbserver ,sid=$dbname',
>$user, $pass, 'Oracle');
>I am not sure what means  $dbname in for 8.1.5.
>Is it connect string ? Or SERVICE_NAME ? Or database name ?
>In $dbserver I used the name of my computer in LAN

>For $dbh = DBI->connect
>('dbi:Oracle:G21DEV', 'USERNAME', 'PASSWORD', 'Oracle')
>I am not sure what is G21DEV for 8.1.5.
>Is it connect string ? Or SERVICE_NAME ? Or database name ?

>Id appreciate any help

>Yakov

>Sent via Deja.com http://www.*-*-*.com/
>Before you buy.

**************************************************************
To email me please replace the first 'u' of the domain name
with 'n' and the second with 'a'. Just to avoid spam.


Wed, 30 Oct 2002 03:00:00 GMT  
 NT ORACLE PERL DBD DBI->connect format


...

Quote:
> my $dbh = DBI->connect('DBI:Oracle:host=$dbserver ,sid=$dbname', $user,
> $pass, 'Oracle');

Variables are not interpolated in singe-quoted strings.  And I'd get rid
of that gratuitous space, also.

--
(Just Another Larry) Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/



Wed, 30 Oct 2002 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. NT ORACLE PERL DBD DBI->connect format

2. DBI / DBD Oracle connect question

3. DBI/DBD/Oracle connect won't work (ORA-12154)

4. DBI->connect Oracle - ODBC - TNS Service Name

5. DBD-Oracle Connect (NT)

6. Perl needtobie wants info on DBI DBD Oracle Netscape Enterprise NT

7. DBD-Oracle: Problems connecting to Oracle

8. WinNT->DBI->DBD::ODBC->Jet->INSERT == SQL-S1000

9. DBI/DBD::Oracle and NT

10. Binaries for DBI & DBD::Oracle or NT

11. Oracle on NT <-> DBI on Linux

12. Oracle DBD/DBI on HP-UX: can't load Oracle.sl

 

 
Powered by phpBB® Forum Software