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
1
vote
1 answer

FreeBSD Can't locate loadable object for module DBD::mysql

I installed DBD::mysql, but Perl does not recognize it: root@bsd:~ # freebsd-version 13.0-RELEASE root@bsd:~ # perl -v This is perl 5, version 34, subversion 0 (v5.34.0) built for amd64-freebsd Copyright 1987-2021, Larry Wall Perl may be copied…
Liandro Cos
  • 65
  • 11
1
vote
0 answers

Perl DBI execute() errors out when the database file isn't writable

I'm working on an applciation that uses the DBI(v1.643) and DBD::SQLite(v1.66) Perl modules to interact with a database file and fetch some information. It does this by running SELECT queries using the prepare() and execute() methods. However, I get…
rick7morty
  • 31
  • 3
1
vote
1 answer

Perl JDBC Module usage issue from CPAN

I am trying to install and use DBD::JDBC module from CPAN and getting into issues . Any PERL expert in forum can help me point out what is the issue ? I am using all below operations using root. This is my PERL and CPAN version and prove on…
pauldx
  • 833
  • 1
  • 12
  • 22
1
vote
1 answer

DBD::SQLcipher prepare nor PRAGMA is working

I'm not being able to select from SQLcipher database with DBD::SQLcipher. I tried various ways, and it still think the file i'm providing is not sqlcipher db (which i'm sure it is) The first function tries to connect regular SQLite3 database, and on…
1
vote
1 answer

Connect Ruby and MySQL

trying to connect ruby and mysql. When running a basic script to access the database getting the error: Unable to load driver 'Mysql' (underlying error: uninitialized constant DBI::DBD::Mysql) (DBI::InterfaceError) Googled it and found…
Alex Riabukha
  • 297
  • 1
  • 12
1
vote
1 answer

Can't locate XML/Writer.pm in @INC . Cant locate DBD/CSV.pm in @INC

I tried using CPAN module XML::Writer, but I am getting following error: Can't locate XML/Writer.pm in @INC (@INC contains: /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5…
Dhanashri P
  • 111
  • 5
1
vote
1 answer

Perl CPAN Module Install fails: DBD::Pg (PostgreSQL Driver) on Windows7 64 bit Strawberry Perl 5.26.1, PostgreSQL 12

First logged on GitHub: https://github.com/metacpan/metacpan-web/issues/2266 Then CPAN: https://rt.cpan.org/Ticket/Display.html?id=131708 1st issue: cpan install DBD::Pg fails looking for LIBPQ.dll Fix: set Postgres ENVIRONMENT VARIABLES so…
skeetastax
  • 1,016
  • 8
  • 18
1
vote
2 answers

DBD::Oracle and DBI error in perl

I am having a strange issue here with perl and DBI module. I can get the query successfully sometimes, but sometimes, when I add a line of code which is remotely related to database access or anything like that, I got an error…
Qiang Li
  • 10,593
  • 21
  • 77
  • 148
1
vote
0 answers

Error using perl module DBD::mysql in ActivePerl 5.28 on Windws10 64bits

I installed the new ActiveState Perl custom build with Perl 5.28 and I added the module (DBD-mysql v4.50). The DBI module is set by default to the ActivePerl 5.28 compilation. use strict; use warnings; use diagnostics; use DBI; ### INIT DB…
bLIGU
  • 45
  • 6
1
vote
1 answer

SQL IM002 Errors while connecting to SQL Server from perl on heroku

I have a perl application hosted on heroku which needs to connect with some sql server. I am unable to establish connection. It fails with following error: DBI connect('Driver={ODBC Driver 11 For SQL Server}; Server=****; UID=****;…
andor
  • 75
  • 8
1
vote
1 answer

Why does my DBI program complain about 'Undefined subroutine &DBD::Pg::db::_login'?

I am trying to use PostgreSQL database for storing Apache's session information, but I can't get it to work. It is failing with the following error: Undefined subroutine &DBD::Pg::db::_login It seems that MySQL users have run into the same problem…
user68965
  • 31
  • 1
1
vote
0 answers

How to port pre-built Perl DBD::Oracle to different location of Oracle libraries?

DBD/Oracle/Oracle.so hard-codes the location of Oracle's libclntsh.so (and other libraries) to their location at the time of building/installing DBD::Oracle. I do not want to build and install DBD::Oracle on all servers, but the location of the…
jrw32982
  • 608
  • 5
  • 11
1
vote
0 answers

Pure Perl DBI/DBD to query Oracle database

Is there the possibility of a Pure Perl DBI connection of some kind to an Oracle database? I'm trying to allow for running queries from many different servers of different architectures and avoid worrying about the specific architecture (e.g. Linux…
jrw32982
  • 608
  • 5
  • 11
1
vote
0 answers

DBD::Oracle unable to connect due to OCIEnvNlsCreate error on MacOS 10.12.6

I'm trying to connect to an Oracle server in a Perl script. The script works on other machines that are already configured. I'm trying to set up my machine to allow me to do local development. I have extracted…
ND Geek
  • 398
  • 6
  • 21
1
vote
1 answer

How to fetch multiple columns from SQL query and store them in 2d array in perl

Suppose I have a query like: my $sql = "SELECT dev_name, OID_name, Obj_Val FROM dev_logs"; where the table has values like +----+------------+----------------------+---------+---------------------+ |…
BugShotGG
  • 5,008
  • 8
  • 47
  • 63