On 25 Jun 2004, at 11:00 AM, Ken Cornetet wrote:

What version of Oracle client do you have installed on the client?

Can you TNSPING the database?

I believe DBD-Oracle only works with version 7 of the Oracle client.
DBD-Oracle-8 works with version 7 or 8 (I think...). I don't know if
either work with the version 9 client. I don't know if the version 7 or
version 8 Oracle client will talk to a version 9 database.

Not true. I use DBD::Oracle to connect to oracle 8i and 9i databases every day. I'm assuming the installed version is from the ppd provided by ActiveState (hence using 5.6.1).


On my computers, if I use SQL Worksheet, I connect using username 'XXuser', password 'XXpass', and connection 'actris'. The equivalent in Perl is:

my $db = DBI->connect('dbi:Oracle:ACTRIS', 'XXuser', 'XXpass') or die(DBI->errstr);

I find that if I don't capitalize the connection ('ACTRIS'), it doesn't work. The case of the rest of the string matters as well (lowercase 'dbi', capital 'O').

Try the following program -- see what it gives back:

        #!perl
        use strict;
        use warnings;
        
        use DBI;
        
        my @drivers = DBI->available_drivers;
        
        foreach my $drv (@drivers) {
                print "$drv:\n";
                eval {
                        foreach my $src (DBI->data_sources($drv)) {
                                print "\t$src\n";
                        }
                };
                if ($@) {
                        print "\tError while looking for sources for driver\n";
                }
                print "\n";
        }

        __END__

This should print all the available data sources (I enclosed the call in an eval because I get back errors with DBD::Proxy that halt the program).

Note that the case of the returned drivers is important (eg, Oracle like 'dbi:Oracle', while ODBC likes 'DBI:ODBC'...)

HTH,
Ricky

_______________________________________________
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to