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
11
votes
5 answers

error installing DBD::MySQL on osx 10.11 - Can't link/include C library '', aborting

After updating perl via homebrew, i broke my dbd::mysql installation installing via cpanm results in: I will use the following settings for compiling and testing: cflags (mysql_config) = -I/usr/local/Cellar/mysql-connector- …
dion
  • 121
  • 1
  • 3
11
votes
4 answers

How to Install DBD::Oracle in Strawberry Perl

I am trying to install DBD::Oracle using the CPAN shell in Strawberry Perl. I initially experienced an error because the Makefile could not locate an OCI library, so I installed the instant client from Oracle. I thought this would fix the problem,…
indiguy
  • 505
  • 1
  • 9
  • 21
10
votes
5 answers

%ENV doesn't work and I cannot use shared library

I cannot use %ENV var on my Perl script to use Oracle libs. BEGIN { $ORACLE_HOME = "/usr/lib/oracle/10.2.0.3/client64"; $LD_LIBRARY_PATH = "$ORACLE_HOME/lib"; $ORACLE_SID="prod"; $ENV{ORACLE_SID}=$ORACLE_SID; $ENV{ORACLE_HOME}=…
Daniele
  • 125
  • 1
  • 8
10
votes
2 answers

Apache dbd Internal error: AH00629: Can't connect to mysql

I'm trying to use dbd with mysql as authentification with Apache 2.4. When Apache starts, i have this error : [Tue May 12 13:07:18.789021 2015] [mpm_event:notice] [pid 10625:tid 140410697815936] AH00489: Apache/2.4.10 (Debian) configured -- resuming…
Joshua
  • 627
  • 4
  • 9
  • 21
10
votes
5 answers

What is the difference between DBI and DBD?

Can someone please shed some light on what exactly is DBI and DBD? When should either one be used and the benefits of using one over the other.
Anand Shah
  • 14,575
  • 16
  • 72
  • 110
9
votes
2 answers

Is there any implementation of database by perl

Is there any perl modules implementing function of database and easy to use. I do not need modules used to connect to some database products. I need simple database writing by perl. Thanks.
user2799433
  • 171
  • 11
7
votes
6 answers

Installation error for DBD::MySQL on OSX v10.6.6

I'm attempting to get DBD::MySQL working on Snow Leopard (v10.6.6). The default version of Perl that comes with the OS is v5.10.0. Since I've read that's 64-bit, I went ahead and downloaded and installed a 64-bit version of MySQL…
7
votes
1 answer

Why does SQLite give a "database is locked" for a second query in a transaction when using Perl's DBD::SQLite?

Is there a known problem with SQLite giving a "database is locked" error for a second query in a single transaction when using Perl DBD::SQLite? Scenario: Linux, Perl DBI, AutoCommit => 0, a subroutine with two code blocks (using the blocks to…
Tom
  • 71
  • 1
  • 1
  • 2
7
votes
7 answers

Problems with Perl DBI/DBD on OSX 10.9 Mavericks

After upgrading to OSX Mavericks I can't get DBI/DBD to run. Perl and MySQL are running fine (I can login to mysql and access my tables), but my Perl scripts can't use DBI anymore as the updater removed all of my previously working Perl modules. I…
marluxor
  • 71
  • 1
  • 3
6
votes
3 answers

Connecting to Teradata via Perl

Has anyone had any success with this? There aren't a great deal of references online and I've exhausted every relevant result on Google. Here's my script: #!/usr/bin/perl use DBI; use DBD::ODBC; $user = "user"; $pw = "pw"; $ip =…
SemperFly
  • 1,563
  • 3
  • 17
  • 31
6
votes
3 answers

How can I UPDATE rows returned by a SELECT in a loop?

I have a loop on the rows returned by an SQL SELECT statement, and, after some processing on a row's data, I sometimes want to UPDATE the row's value. The processing in the loop's body is non-trivial, and I can't write it in SQL. When I try to…
Diomidis Spinellis
  • 18,734
  • 5
  • 61
  • 83
4
votes
2 answers

String getting converted to number when inserting it in database through Perl's DBI $sth->execute() function

I'm using Perl's DBI and SQLite database (I have DBD::SQLite installed). I have the following code: my $dbh = DBI->connect("dbi:SQLite:dbname=$db", "", "", { RaiseError => 1, AutoCommit => 1 }); ... my $q = "INSERT OR IGNORE INTO books (identica,…
bodacydo
  • 75,521
  • 93
  • 229
  • 319
4
votes
3 answers

How can I access two Oracle databases with different versions (8i and 9) using perl?

I'm currently accessing an Oracle database version 9i (9.2.0.8.0) using perl modules DBI (1.613) and DBD::Oracle (1.26). The current scope of the project now requires that I access a version 8i (8.1.7.4.0 ) Oracle database and, according to the…
Isabelle
  • 631
  • 1
  • 7
  • 14
4
votes
3 answers

Why is Perl DBI escaping values retrieved from MySQL?

I have a value in MySQL that contains an apostrophe (’) and an ellipsis (...): $ /bin/echo "select alias from url_alias where source = 'node/12024'" | \ mysql --skip-column-names -D…
4
votes
2 answers

Perl dbd-sqlite, is there a equivalent to the .import function?

In many of my scripts I am using sqlite for reporting info and I need first to upload my big table data (millions of csv rows). In the past I have found that .import was quicker than line by line inserting (even using transactions). Nowadays my…
Pablo Marin-Garcia
  • 4,151
  • 2
  • 32
  • 50
1
2 3
11 12