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

Perl DBD::ODBC does not yet support binding a named parameter more than once

I'm getting following error while trying to execute a a sql which is formed by joining few variables. DBD::ODBC does not yet support binding a named parameter more than once I can execute the same sql from sql prompt without any issues!! my code…
MikA
  • 5,184
  • 5
  • 33
  • 42
1
vote
1 answer

Formatting SQL queries using Text::Table Performance

Below is a code that dumps an SQL query to an aligned text table format. sub sql_command { my ($self,$str) = @_; my $s = $self->{_db}->prepare($str) or die $!; $s->execute() or die $!; my $table; push @$table, [ map { defined $_…
Mattan
  • 733
  • 7
  • 19
1
vote
3 answers

Environment variables not working in Perl

I am trying to set some environment variables in Perl at the very beginning of the program, but I keep receiving errors unless I set them in a Bash script that calls my Perl script. #!/usr/bin/perl…
James Mclaren
  • 666
  • 4
  • 10
  • 25
1
vote
1 answer

Perl and DBD::mysql Can't load mysql.so... Perhaps a required shared library or dll isn't installed where expected

Running this code on a shared host with a locally installed perl and modules which were installed via perlbrew. It worked fine for several weeks. One day, it started dying with this output: /home/xxxx/perl5/perlbrew/perls/perl-5.16.2/bin/perl…
uhcafigdc
  • 11
  • 1
  • 3
1
vote
1 answer

Perl DBD error FUNCTION dbName.GLOB does not exist

I am starting to write some Perl scripts for some cron jobs that will query the database and send out reminders about upcoming events. I'm quite new to database access in Perl as most of my work thus far has been on the web end using PHP. Anyway,…
Scott Nipp
  • 121
  • 12
1
vote
2 answers

Perl DBI Oracle not preserving column order after SELECT

I'm using Perl v5.12.3 built by ActiveState on Windows. DBD::Oracle version 1.27. DBI version 1.616. I'm selecting the data below in this particular order and wanting the resulting data to be retrieved in that same order. Below are the code…
kreeves
  • 154
  • 1
  • 1
  • 7
1
vote
1 answer

Compiling DBD::mysql on SunOS 5.10

everybody I apologize for the massive length of this post. I am having some issues compiling DBD::mysql on SunOS. # /usr/perl5/bin/perlgcc Makefile.PL I will use the following settings for compiling and testing: cflags (mysql_config) =…
Andy Thompson
  • 284
  • 1
  • 3
  • 21
1
vote
2 answers

Does installing Perl DBD-mysql-4.021 need MySQL header on MacOs Lion?

I try to install DBD-mysql-4.021 on MacOS Lion, but it seems when I do, it misses some header file. MacBook-Pro-de-benoit:DBD-mysql-4.021-XXi0wV vanalder$ sudo make llvm-gcc-4.2 -c -I/Library/Perl/5.12/darwin-thread-multi-2level/auto/DBI…
Benoit Vanalderweireldt
  • 2,925
  • 2
  • 21
  • 31
1
vote
2 answers

DBD::Oracle causing corruption to System calls?

Seeing some strange behavior, whereby connecting to Oracle database, and then calling external function, the value of $? is always -1. Problem machine is running standard AIX5.3, with DBD::Oracle 1.20 and DBI 1.602. #!/usr/bin/perl -w use…
Patrick
  • 618
  • 2
  • 10
  • 20
1
vote
3 answers

Installing CGI, DBI and DBD::Oracle with Solaris 11 64-bit

I tried to install CGI, DBI and DBD::Oracle and drivers in a 64-bit Solaris environment, but to little avail. The number of errors I have encountered is mind-boggling and the number of workaround solutions I have tried - from changing environment…
This 0ne Pr0grammer
  • 2,632
  • 14
  • 57
  • 81
1
vote
2 answers

perl DBI recipes column array

Below is my sql query output Company Col1 Col2 Col3 Comp1 1 2 3 Comp2 4 5 6 Comp3 7 8 9 Perl procedure to connect and retrive results my $query1= qq(select * from database_table); my $result1 =…
Linus
  • 825
  • 4
  • 20
  • 33
1
vote
2 answers

Why do I get an error when I try to use Perl's DBD::mysql?

I am trying to write data to a MySQL database using Perl. However, when I run my script I get the error below: Can't locate loadable object for module DBD::mysql in @INC (@INC contains: C:/Perl/site/lib C:/Perl/lib .) at LargeLDAPSearch.pl line…
cquadrini
  • 769
  • 2
  • 12
  • 25
0
votes
1 answer

Installing DBD::Oracle

I'm trying to follow these instructions for installing DBD::Oracle on a Mac (Snow Leopard 10.6.8): How do you install perl DBD::Oracle on OSX Snow Leopard 10.6 Everything worked fine up until the point where I tried to run perl Makefile.pl When I…
matthewb
  • 1,323
  • 2
  • 12
  • 18
0
votes
1 answer

perl packaging dbd mysql module in script

I have a script and keep all external modules local so I can then package my entire script in a zip and have it work on all machines without having to install all the modules on different machines. I do: use lib "$Bin/cpan"; I am trying to…
user391986
  • 29,536
  • 39
  • 126
  • 205
0
votes
1 answer

MySQL Errorcode 2 in Perl script

I have created an ETL tool in Perl. There are three database servers to which ETL tool is communicating, say dbserver1 (OLTP server - Windows Box), dbserver2 (staging server - linux Box), dbserver3 (OLAP Server, linux Box). My ETL script is on…
Rahul Shelke
  • 2,052
  • 4
  • 28
  • 50