my $sth = $dbh->prepare("exec PerlTest2 \@RetVal = ? OUTPUT, \@SomeParam = ? "); $sth->bind_param(1, undef, SQL_INTEGER); $sth->bind_param(2, "val1", SQL_VARCHAR); $sth->execute; # first batch exec $sth->bind_param(1, undef); $sth->bind_param(2, "val22"); $sth->execute; # exec some more $sth->finish; $dbh->rollback; # <---- still records get committed into the dB !!! print "finishing...\n"; $dbh->disconnect; close dbh;