Questions tagged [dbd]

DBD is a common prefix for all perl modules used as database drivers by the DBI module. These drivers hide the internals of different relational database management systems by providing a common API through the DBI module.

Access to relational databases in Perl is usually accomplished by the CPAN DBI module. See also DBI tag wiki entry.

DBI provides a common API for database access that uses separate drivers (DBD::*) internally to handle the specifics of different database management system implementations.

Some of the most popular DBD modules available on CPAN are:

DBD::MySQL
DBD::Oracle
DBD::Pg       (PostgreSQL)
DBD::ODBC
DBD::SQLite
DBD::Informix
DBD::Mock     (for testing purposes) 
DBD::CSV      (limited SQL access for CSV files)
DBD::JDBC
169 questions
0
votes
1 answer

Error "install_driver(Oracle) failed" when running Perl script which is pointing to Oracle database

I am running a Perl script, which is pointing to an Oracle database, which requires an Oracle driver to execute the Perl script. Below is the error message: “install_driver(Oracle) failed: Can't locate DBD/Oracle.pm in @INC (@INC contains:…
0
votes
1 answer

PERL using WITH clause in Database prepare

I'm trying to prepare a complex query using WITH in perl against an Oracle DB and keep getting an error when preparing. DBD::Proxy::st execute failed: Server returned error: Failed to execute method CallMethod: DBD::Oracle::db prepare failed:…
0
votes
1 answer

Perl to mysql connectivity on Windows 10

I have a process that works in the production environment, that I need to get working on my local Windows 10 environment. It is a Perl script that calls mySql stored procedures. I have installed ActivePerl 5.26.3 (64-Bit) from Active State. When I…
Sammer
  • 145
  • 2
  • 11
0
votes
4 answers

can't find version.pm while trying to install DBD-Pg-2.19.3 on Centos-7

On Centos 7. The oracle DBD installed just fine I am having a problem with the Postgresql version. This is the script I am running: set -x -e sudo yum -y install perl-devel sudo yum -y install perl-DBI cp ./DBD* /tmp pushd /tmp tar xvf…
user939857
  • 377
  • 5
  • 19
0
votes
1 answer

DBD::Oracle: make error : undeclared (first use in this function)

I have been trying to install DBD::Oracle in Linux 7.4(x86_64 x86_64 x86_64 GNU/Linux) for past 2 days. This has become a roadblock for one of the critical projects. I have tried all possible ways I can think of, but with zero success. So far, I…
Prabir
  • 11
  • 4
0
votes
1 answer

SQL - COUNT results from SELECT

I would like to count all the repetitions of the maximum values from the profit column for all asset (they repeat, and I want to choose the best result from each unique repetition), and finally group the results according to the value of the…
J. Doe
  • 71
  • 1
  • 6
0
votes
1 answer

DBD::Pg compilation error (Windows 10 / Strawberry Perl)

I'm trying to install the DBD::Pg (3.7.4) module on my windows 10/Strawberry Perl, but the compilation failed For that I downloaded the module on metacpan and executed following command in the windows terminal: perl Makefile.PL…
N. Hereman
  • 33
  • 6
0
votes
1 answer

getting error DBI_DRIVER env var not set while running dbicdump

I was testing to dump the DBIx::Class for my sample sqlite database on the windows 7 machine. I have installed DBIx::Class::Schema::Loader , along with DBI and DBD::SQLite module , but when I am using the script dbicdump it giving the below…
made_in_india
  • 2,109
  • 5
  • 40
  • 63
0
votes
1 answer

Unable to Install DBD::Oracle for Perl on Windows

When trying to install DBD::Oracle library i received the following error message "Can't load /usr/lib/perl5/site_perl/5.24/x86_64-cygwin-threads/auto/DBD/Oracle/Oracle.dll for module DBD::Oracle: No such file directory at…
Jelani
  • 705
  • 6
  • 25
0
votes
1 answer

error in establishing DB connection in Perl script?

I am using perl 5.24. I am trying to learn Perl. I had written a simple Perl code to connect to a DB. But gives error stating DBI connect('database=vms','DBA',...) failed: (no error string) at simpleperl.pl line 13. The code is…
Prateek
  • 35
  • 1
  • 7
0
votes
1 answer

Perl- insert data into SQL while reading the columns from an array?

The question is simpler than it sounds(i think). I have a database table called table and I'm trying to insert data in the column called first. Here is a part of the code: my $stmt = $dbh->prepare($sql); @array=("first","second","third"); $sql…
s.dragos
  • 582
  • 2
  • 8
  • 24
0
votes
2 answers

Suppressing connection error with DBI and DBD:ODBC SQL Server Native Client 10.0

Writing a script to get SQL Server instance names from a table, then attempting to connect to each of these instances to pull back database configuration information. All database instances involved are some version of SQL Server. If the connection…
Bryan
  • 17,112
  • 7
  • 57
  • 80
0
votes
0 answers

Trying to access MySQL with perl script

Learning to use Perl DBI, with MySql. Need to do the equivalent of this command /usr/local/mysql/bin/mysql -u root -p In a Perl Script. Here is the script I am using: use strict; use warnings; use v5.10; # for say() function use DBI; my $dsn =…
Dcdw51
  • 15
  • 1
  • 8
0
votes
1 answer

Async queries with DBD::Pg fail with: Cannot execute until previous async query has finished

I'm using CentOS 5.5 Linux (same as Redhat 5.5) with stock perl v5.8.8 and have installed DBD-Pg-2.17.1 via CPAN shell and I'm using postgresql-server-8.4.5-1PGDG.rhel5 and friends. I have prepared a simple test case demonstrating my problem - it is…
Alexander Farber
  • 21,519
  • 75
  • 241
  • 416
0
votes
1 answer

How can I manually Installing DBD-Oracle 1.17 in ActivePerl on Windows?

After installing Active Perl 5.8.8 Build 822 on WindowsXP, I do not see DBD-Oracle in "View All Packages" of Perl Package Manager. The CPAN location of the same is http://search.cpan.org/dist/DBD-Oracle-1.17/, but I don't know the process to…
akjain
  • 1,787
  • 3
  • 20
  • 35