TJRandall has asked for the wisdom of the Perl Monks concerning the following question:

I am trying to implement an Oracle database comparison script, using the DBIx::Compare::Oracle module. In the script below, when I un-comment this section, I get no results in the hash
my $hashref = $oDB_Comparison->get_differences; print Dumper \$hashref;
And when I just call to
my @aList = $oDB_Comparison->get_tables;
I get the following error:
DBD::Oracle::st execute failed: ORA-00900: invalid SQL statement (DBD +ERROR: OCIStmtExecute) [for Statement "show tables"] at C:/Perl/site/ +lib/DBIx/Compare.pm line 544. DBD::Oracle::st bind_columns failed: St +atement has no result columns to bind (perhaps you need to successful +ly call execute first) [for Statement "show tables"] at C:/Perl/site/ +lib/DBIx/Compare.pm line 545. DBD::Oracle::st fetch failed: ERROR no +statement executing (perhaps you need to call execute first) [for Sta +tement "show tables"] at C:/Perl/site/lib/DBIx/Compare.pm line 546. +DBD::Oracle::st execute failed: ORA-00900: invalid SQL statement (DBD + ERROR: OCIStmtExecute) [for Statement "show tables"] at C:/Perl/site +/lib/DBIx/Compare.pm line 544. DBD::Oracle::st bind_columns failed: S +tatement has no result columns to bind (perhaps you need to successfu +lly call execute first) [for Statement "show tables"] at C:/Perl/site +/libDBIx/Compar e.pm line 545. DBD::Oracle::st fetch failed: ERROR no statement execu +ting (perhaps you need to call execute fir st) [for Statement "show tables"] at C:/Perl/site/lib/DBIx/Compare.pm +line 546.
I re-installed DBIx::Compare, and I did not see in the documentation where I have to do an execute statement before calling 'get_tables'. Any/all help would be greatly appreciated! Thank you! T.j. Entire script:
#!/usr/bin/perl use strict; use warnings; use DBIx::Compare::Oracle; use DBI; # database module use DBD::Oracle qw(:ora_types); # database module for oracle use sys_utils; # custom utilities use Data::Dumper; # robust print output mechanism # load the database code into the new working directory my ( $usr1, $pwd1 ) = getUsrPwdBuildAutomation('MMAD09'); my $DBH1 = DBI->connect( "dbi:Oracle:$SID", $usr1, $pwd1 ) || die "Error Connecting to \$dbh1: " . $DBI::errstr . "\n"; my ($usr2, $pwd2 ) = getUsrPwdBuildAutomation('MMAD02'); my $DBH2 = DBI->connect( "dbi:Oracle:$SID", $usr2, $pwd2 ) || die "Error Connecting to \$dbh1: " . $DBI::errstr . "\n"; # test connection my $sth = $DBH2->prepare('SELECT sysdate from dual'); $sth->execute(); while ( my @row = $sth->fetchrow_array() ) { foreach (@row) { $_ = "\t" if !defined($_); print "$_\t"; } print "\n"; } my $oDB_Comparison = db_comparison->new( $DBH1, $DBH2 ); $oDB_Comparison->verbose; my @aList = $oDB_Comparison->get_tables; #my $hashref = $oDB_Comparison->get_differences; #print Dumper \$hashref; }