Last active
August 29, 2015 14:08
-
-
Save three18ti/c37587ef7d5fb9ee5748 to your computer and use it in GitHub Desktop.
Check connection to DBD2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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