Hello All,
I am trying to create a perl DBI/DBD script for creating a database initial build. My
input is a extract file, which is a mysqldump result file with --opt and -B option.
I am using DBIx::DWIW. I am able to open a successful database handler. I am having
code like
my $dropsql="DROP DATABASE $ARGV[1]";
my $loadsql="source /tmp/extract-file-name";
print "Running database load...\n";
$conn->Execute($dropsql);
RC=$?
die "Error running in $dropsql...\n" if ( RC != 0 );
$conn->Execute($loadsql);
RC=$?
die "Error in running $loadsql...\n" if (RC != 0);
It appears that $loadsql is not going through. It is able to drop database but not
running source command at all. I have tried by using "\. extract-file-name", still no
luck.
Looks to me that I am not doing it right way. Any help will be highly appreciated.
Regards,