in reply to perl script to delete or update an ORACLE table hangs during execution

Thanks for updating your post with code.

Now, what happens when you alter your DBI->connect() line to look like this:

my $connect = DBI->connect( $dsn, $user, $pw, { RaiseError => 1 } );

Or as an alternative, check for an error explicitly after every single DBI call; your prepare(), your execute(), your finish(), and your commit().

Like I said in my earlier post, the error messages are often helpful.


Dave

Replies are listed 'Best First'.
Re^2: perl script to delete or update an ORACLE table hangs during execution
by prashantktyagi (Scribe) on Jun 05, 2012 at 11:34 UTC
    hi, Can try DML query with 'NOLOCK' to check if any deadlock is there.

      How about trying { RaiseError => 1} like I suggested. I still haven't seen from the code you posted that you're actually doing error checking. Without error checking, you don't get the help provided by error messages. Why look at locking when you haven't even looked to see what errors you're getting?

      When you go to the doctor and say, "My chest hurts.", he will probably want to run some tests. He has in his mind tests that will help him to identify the problem. It could be that the tests will come back inconclusive. But often they provide insight to the problem you're having. If you refuse to let him run the tests, he can't narrow down why you're having chest pain. He could offer you this pill or that suggestion, but his suggestions could be way off if he hasn't had an opportunity to run some tests on you.

      I suggested turning on error checking so that you could get some diagnostic information. The diagnostics may be inconclusive. But on the other hand, they could point right to the problem, in which case there needn't be any guesswork in finding a solution.


      Dave