0% found this document useful (0 votes)
8 views2 pages

Dbi DBD

The document provides instructions on how to check if the Perl DBI and DBD modules are installed and their versions. It explains that using the command 'perl -e "use DBI <version>"' checks for installation and version compliance, returning an error if the required version is not met. If no error is returned, it indicates that the module is installed, while specific error messages are shown for missing modules or version mismatches.

Uploaded by

ajoyjyotikumar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views2 pages

Dbi DBD

The document provides instructions on how to check if the Perl DBI and DBD modules are installed and their versions. It explains that using the command 'perl -e "use DBI <version>"' checks for installation and version compliance, returning an error if the required version is not met. If no error is returned, it indicates that the module is installed, while specific error messages are shown for missing modules or version mismatches.

Uploaded by

ajoyjyotikumar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 2

How to confirm if DBI & DBD is installed OR how to install

perl -e 'use DBI 1.40;'

perl -e 'use DBD:DBC;'

http://www.easysoft.com/developer/languages/perl/dbd_odbc_tutorial_part_1.html

http://www.orafaq.com/wiki/Perl

http://www.idevelopment.info/data/Oracle/DBA_tips/Programming/PROGRAMMING_2.shtml

perl -e 'use DBD::ODBC'


brt_op:/rbm5/inf_root/env:> perl -e 'use DBD::DBC'
Can't locate DBD/DBC.pm in @INC (@INC contains:
/usr/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi /usr/lib/perl5/site_perl/5.8.8
/usr/lib/perl5/site_perl /usr/lib64/perl5/vendor_perl/5.8.8/x86_64-linux-thread-multi
/usr/lib/perl5/vendor_perl/5.8.8 /usr/lib/perl5/vendor_perl /usr/lib64/perl5/5.8.8/x86_64-
linux-thread-multi /usr/lib/perl5/5.8.8 .) at -e line 1.
BEGIN failed--compilation aborted at -e line 1.

(if no error means installed)

brt_op:/rbm5/inf_root/env:> perl -MDBD::ODBC -e"print $DBD::ODBC::VERSION;"


Can't locate DBD/ODBC.pm in @INC (@INC contains:
/usr/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi /usr/lib/perl5/site_perl/5.8.8
/usr/lib/perl5/site_perl /usr/lib64/perl5/vendor_perl/5.8.8/x86_64-linux-thread-multi
/usr/lib/perl5/vendor_perl/5.8.8 /usr/lib/perl5/vendor_perl /usr/lib64/perl5/5.8.8/x86_64-
linux-thread-multi /usr/lib/perl5/5.8.8 .).
BEGIN failed--compilation aborted.

(if no error means installed)

To know if DBI is installe


perl -e 'use DBI;'

To the version of DBI installed

DBI version 2 required--this is only version 1.52 at -e line 1.


BEGIN failed--compilation aborted at -e line 1.

[tr175267@rbmhx02a ~]$
[tr175267@rbmhx02a ~]$ perl -e "use DBI 2"
DBI version 2 required--this is only version 1.52 at -e line 1.
BEGIN failed--compilation aborted at -e line 1.
[tr175267@rbmhx02a ~]$
[tr175267@rbmhx02a ~]$
[tr175267@rbmhx02a ~]$ perl -e "use DBD::Oracle 2"
DBD::Oracle version 2 required--this is only version 1.38 at -e line 1.
BEGIN failed--compilation aborted at -e line 1.
[tr175267@rbmhx02a ~]$
[tr175267@rbmhx02a ~]$
[tr175267@rbmhx02a ~]$ perl -e "use DBI"
[tr175267@rbmhx02a ~]$
[tr175267@rbmhx02a ~]$
[tr175267@rbmhx02a ~]$ perl -e "use DBD::Oracle"
[tr175267@rbmhx02a ~]$
[tr175267@rbmhx02a ~]$

When we use the command ‘perl –e “use DBI <version>”’ or ‘perl –e “use
DBD::Oracle <version>”’, it checks if perl DBI and perl DBD::Oracle is installed, and if the
release is equal or bigger than the <version> parameter we used. So, when I use the number “2”
as parameter, it shows this error message saying that the version installed is 1.52 and 1.38.

And if we use the same command without the version, it shows an error if the package is not
installed, or don’t show any message if it’s installed.

You might also like