Skip to content

Instantly share code, notes, and snippets.

@three18ti
Last active August 29, 2015 14:08
Show Gist options
  • Save three18ti/c37587ef7d5fb9ee5748 to your computer and use it in GitHub Desktop.
Save three18ti/c37587ef7d5fb9ee5748 to your computer and use it in GitHub Desktop.
Check connection to DBD2
use 5.010;
use warnings;
use strict;
use DBI;
use DBD::DB2;
say "Operating System = " . $^O;
say "Perl Binary = " . $^X;
say "Perl Version = " . $];
say "DBI Version = " . $DBI::VERSION;
say "DBD::DB2 Version = " . $DBD::DB2::VERSION;
say "env = " . $ENV{DB2INSTANCE};
say "Available Drivers:";
say join ", ", DBI->available_drivers;
say "Attempting to list to databases";
say join ", ", DBI->data_sources('DB2');
say "Successfully listed to databases, exiting";
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment