File indexing completed on 2024-04-06 12:03:11
0001
0002
0003 use warnings;
0004 use strict;
0005 $|++;
0006
0007 my $schema1 = shift @ARGV;
0008 my $schema2 = shift @ARGV;
0009
0010 my @outputs;
0011
0012 foreach ($schema1, $schema2) {
0013 my ($user, $sid) = ($_ =~ /^(.*)\/.*@(.*)$/);
0014 unless ($user && $sid) {
0015 die "$_ is not an sqlplus connection string";
0016 }
0017 my $output = $user."-".$sid.".txt";
0018 print "Writing $output...";
0019 `sqlplus -SL $_ < compare.sql > $output`;
0020 print "Done\n";
0021 push @outputs, $output;
0022 }
0023
0024
0025 my $output = "diff-".$outputs[0]."-".$outputs[1];
0026 print "Writing $output...\n";
0027 my $cmd = "diff $outputs[0] $outputs[1] > $output";
0028 print $cmd."\n";
0029 `$cmd`;
0030 print "Done\n";
0031
0032 print `cat $output`;
0033
0034 exit;