my $hashref = $oDB_Comparison->get_differences;
print Dumper \$hashref;
####
my @aList = $oDB_Comparison->get_tables;
####
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: Statement has no result columns to bind (perhaps you need to successfully 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 Statement "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: Statement has no result columns to bind (perhaps you need to successfully 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 executing (perhaps you need to call execute fir
st) [for Statement "show tables"] at C:/Perl/site/lib/DBIx/Compare.pm line 546.
####
#!/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;
}