Hi Brian, At work i used very day perl and oracle (8i and 9), for database access the standard method is DBI, but dbi depends on a DBI database driver, a database driver for oracle, another for mysql, another for db2, another for OBDC, etc).
To acess Oracle you need: 1. Proper installed and configured oracle sql.net (this is the base), notice perl usually reads the locations and paths of the sql.net libraries from the windows registry. 2. DBD::Oracle (this works on top of the sql.net) 3. DBI (this is your program interface and works on top of DBD::ORACLE) You might also use DBI and ODBC to acess oracle, but i have never tried this, and you might also lose acess to "advanced" oracle stuff and special oracle objects such has clobs... Hope this helps out Migas 2006/9/26, ukhas jean <[EMAIL PROTECTED]>: > Hello Brian et al ... > > If u see my code i am using the DBI.pm module ... y do i need to have > DBD::Oracle.pm installed then??? (Cause this module is a huge one and my > internet connection is not that good) ... > > I saw using TOAD that my environment variables werent set properly ... eg. > ORACLE_HOME_NAME, ORACLE_HOME, ORACLE_SID and NLS_LANG ... i set it properly > ... and now my code works fine ... > > But Brian, as per u, I should have DBD::Oracle installed ... but I didnot > install it ... I only used DBI.pm and it works fine ... I think the error > shown by perl (as shown below) is a misleading one ... > > My Question: > 1. Is DBD::Oracle required to be install for DBI.pm to work properly?? If > so, how did it work on my PC?? Cause I dont have any DBD::Oracle installed > on my machine!!! > > I feel like alice in wonderland ... plz advise!!! > > Best Regards, > Ukhas > > Brian Raven <[EMAIL PROTECTED]> wrote: > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On > Behalf Of ukhas > jean > Sent: 22 September 2006 07:18 > To: Active Perl > Subject: perl-oracle connectivity query > > > I wrote this simple script ... n its baffling me ... i thght this > should work ... but its not working .... am i > doing something wrong > here?? > > > > DB-name : IN02 (its an oracle DB) > > DB schema: GS > > password: GS > > > > **************************************** > > use strict; > > use DBI; > > > > my $dbh = DBI->connect( 'dbi:Oracle:IN02', 'GS', 'GS', { RaiseError => > 1}) || die "Database connection not > > made: $DBI::errstr\n"; > > > > $dbh->disconnect; > > > > *************************************** > > Good. A short self contained script that illustrates the problem. Thanks > for that. (Would be better with "use warnings" as well, though.) > > > > > Foll. is the error reported .... > > D:\Chiranjib\v7_trial>perl v7_trial.pl > > install_driver(Oracle) failed: Can't locate DBD/Oracle.pm in @INC > (@INC contains: C:/Perl/lib C:/Perl/site/lib > .) at (eval 4) lin > > 3. > > Perhaps the DBD::Oracle perl module hasn't been fully installed, > > or perhaps the capitalisation of 'Oracle' isn't right. > > Available drivers: DBM, ExampleP, File, Proxy, Sponge. > > at v7_trial.pl line 8 > > > > Can somebody advise??? > > Well, is DBD::Oracle installed? If you used ppm to install it it should > work fine. If you used the wrong case on a win32 system it would still > find the file (assuming that it was installed), it would be the import > that would fail. > > If DBD::Oracle is installed somewhere else (for example the Oracle > client sometimes includes it, I don't know if it does on win32), you > need to tell perl where to find it. There are a number of ways to do > that, for example: > . "use lib ..." (see 'perldoc lib') > . Set environment variable PERL5LIB (see 'perldoc perlrun') > . Manipulate @INC (see 'perldoc -f require') > > HTH > > (BTW, I see you are still having trouble with your keyboard :-) ) > > -- > Brian Raven > > > > ================================= > Atos Euronext Market Solutions Disclaimer > ================================= > The information contained in this e-mail is confidential and solely for the > intended addressee(s). Unauthorised reproduction, disclosure, modification, > and/or distribution of this email may be unlawful. > If you have received this email in error, please notify the sender > immediately and delete it from your system. The views expressed in this > message do not necessarily reflect those of Atos Euronext Market Solutions. > > L'information contenue dans cet e-mail est confidentielle et uniquement > destinee a la (aux) personnes a laquelle (auxquelle(s)) elle est adressee. > Toute copie, publication ou diffusion de cet email est interdite. Si cet > e-mail vous parvient par erreur, nous vous prions de bien vouloir prevenir > l'expediteur immediatement et d'effacer le e-mail et annexes jointes de > votre systeme. Le contenu de ce message electronique ne represente pas > necessairement la position ou le point de vue d'Atos Euronext Market > Solutions. > > _______________________________________________ > ActivePerl mailing list > [email protected] > To unsubscribe: > http://listserv.ActiveState.com/mailman/mysubs > > > > ________________________________ > Stay in the know. Pulse on the new Yahoo.com. Check it out. > > > _______________________________________________ > ActivePerl mailing list > [email protected] > To unsubscribe: > http://listserv.ActiveState.com/mailman/mysubs > > -- Miguel Angelo - Migas http://migas.kicks-ass.org ICQ: 40421832 Msn: [EMAIL PROTECTED] Google Talk: [EMAIL PROTECTED] _______________________________________________ ActivePerl mailing list [email protected] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
