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
2
votes
0 answers

DBDmysql fails installing BugZilla on OS X Mavericks

I am having trouble installing BugZilla on OS X Mavericks. When I run checksetup.pl it informs me that all required modules are found OK, but it then fails with: Checking for DBD-mysql (v4.001) ok: found v4.025 There was an error…
Kenny
  • 1,083
  • 2
  • 8
  • 23
2
votes
0 answers

What can cause these DBD::SQLite errors?

I have an application inserting data into a sqlite database. Every so often I get these errors and I don't know why. DBD::SQLite::st execute failed: database is locked at ... or DBD::SQLite::st execute failed: file is encrypted or is not a…
Takkun
  • 6,131
  • 16
  • 52
  • 69
2
votes
2 answers

Use executed statement to insert results in another table (Perl DBI and MySQL)

I have the need to execute a query in MySQL using Perl and DBI and insert the results in another table. The second table is created on the fly to define the same number of fields that the original query returned, plus one more field. I have no way…
Francisco Zarabozo
  • 3,676
  • 2
  • 28
  • 54
2
votes
2 answers

Statically Linking DBD::Pg (against libpq.so) but Dynamically Against Perl?

I'm trying to build DBD::Pg on a linux host via the Makefile.PL; my requirements are such that I must be able to dynamically link against perl, but statically link against libpq.so (since it may not be available on all boxes). Is there an easy way…
Blaskovicz
  • 6,122
  • 7
  • 41
  • 50
2
votes
1 answer

How to use DBD::CSV to get column names row?

I am using DBD::CSV to show csv data. The code I have is: #! perl use strict; use warnings; use DBI; my $dbh = DBI->connect("dbi:CSV:", undef, undef, { f_dir => ".", f_ext => ".txt/r", f_lock => 2, …
Peiti Li
  • 4,634
  • 9
  • 40
  • 57
2
votes
1 answer

Parameters can't be passed in when using perl DBI to create view

I want to use Perl DBI to create views based on a database automatically. The related code is like the following, my $dbh = DBI->connect( "dbi:Oracle:$database", $user_passwd ); my $Directive = q{ CREATE OR REPLACE VIEW SOME_VIEW AS SELECT *…
2
votes
1 answer

Bugzilla throwing error DBD:Pg fail in DynaLoader?

The following error shown when I access bugzilla: pg' is not a valid choice for $db_driver in localconfig: Can't load 'lib/i386-linux-thread-multi/auto/DBD/Pg/Pg.so' for module DBD::Pg: libpq.so.5: failed to map segment from shared object:…
Srinivas
  • 390
  • 2
  • 11
1
vote
2 answers

initialization of LD_LIBRARY_PATH in BEGIN block fails

I have to add /oracle/v10.2.0/lib to LD_LIBRARY_PATH to use DBI module to connect to Oracle. If I set LD_LIBRARY_PATH in shell before executing perl script, everything is ok. But it does not work from script: BEGIN { …
Gregory Danenberg
  • 519
  • 2
  • 9
  • 15
1
vote
1 answer

DBD-mysql error: CPU you selected does not support x86-64 instruction set

I am installing DBD-mysql-4.020 perl module on 5.14.2. when running make, I encounter the below error: cc -c -I/u01/app/appadmin/product/perl-5.14.2/lib/site_perl/5.14.2/x86_64-linux/auto/DBI…
spacemtn5
  • 65
  • 1
  • 1
  • 8
1
vote
1 answer

DBD::mysql: ChopBlanks

Why are trailing blanks chopped off from the column value even though ChopBlanks is not enabled? use DBI; my $value = ' string '; my $db = 'my_mysql_db'; my $dbh = DBI->connect( "dbi:mysql:db=$db", 'user', '*', { RaiseError => 1,…
sid_com
  • 24,137
  • 26
  • 96
  • 187
1
vote
0 answers

How to fix the 'Can't load'-error when a perl script is executing 'use DBD::mysql;'

For years, I'm running a perl script on my Synology NAS. This script writes to a MariaDB database. I never had any errors. Until the migration to DSM7. This is what happened ... I never had any problem when using MariaDB5 I migrated my database…
1
vote
1 answer

Perl DBD::mysql 'mysql_use_result' OK to use while inserting to another table?

I'm doing a large join in mysql, and then acting on the resulting data and writing it to another table. Right now, I'm using the default mysql_store_result, but the $sth->execute() after the query takes about 20 minutes to run. I'm wanting to…
coding_hero
  • 1,759
  • 3
  • 19
  • 34
1
vote
2 answers

Problem with DBD and mysql in perl

Please I am having problem tracking down the problem with this code I have been trying for hours . it gives me the error DBD::mysql::st fetchrow_hashref failed: fetch() without execute() at line 15 sub Split_Into_Words { …
damola
  • 282
  • 5
  • 18
1
vote
1 answer

Perl DBD::SQLite installation fail on win7

I never installed DBI or DBI::SQLite, because they seem to be built into my Perl v5.32 installation. They have been working fine in a script I'm developing, which is now about 300 lines, but I recently ran into an encoding issue. I found the…
Arnold Cross
  • 199
  • 1
  • 12
1
vote
0 answers

Can't install "DBD-mysql" on Mac

When running this command: perl -MCPAN -e 'install DBD::mysql' I get a really long output of different errors: Reading '/Users/philipjoss/.cpan/Metadata' Database was generated on Tue, 07 Sep 2021 21:29:03 GMT Running install for module…
Jossy
  • 589
  • 2
  • 12
  • 36