# Ask for errors at database handle creation my $dbh2 = DBI->connect( $dsn, $user, $password, { RaiseError => 1, AutoCommit => 0 } ); # Or check your method call $dbh2->do($sql) or die "Cannot execute SQL '$sql': $DBI::errstr; #### $dbh2->do( qq{alter session set nls_timestamp_format = 'YYYY-MM-DD HH24:MI:SS'} ) or die "Can't set timestamp format: $DBI::errstr";