Recently I have written a perl script using PERL DBI module to perform SQL operations on an ORACLE table. "SELECT" query is working fine and I got the expected result but the "DELETE" and "UPDATE" statements are not happening and the script is getting hanged.
I don't think this as a permission issue for the userid cause when I am trying to execute those "DELETE' and UPDATE" statements from SQL promt (with the same userid used in perlscript), both the operations are successful.
Please guide me on this.. Thanks in advance :)
I am using the below script.. Please verify if there is some mistake I am making
my $dsn = "dbi:Oracle:$database";
my $connect = DBI->connect($dsn,$user,$pw) or die "Unable
+to connect: $DBI::errstr\n";
print "\n Connection Established\n";
# PREPARE THE QUERY
$query = qq/Delete from <mytable1> /;
$query_handle = $connect->prepare($query);
# EXECUTE THE QUERY
print "\n Deletion in progress...\n";
print "\n Commit Done\n";
If I manually go to the sql promt and fire the statement, it works.
Moreover, the same code works when I am trying it for some other table.