I'm having trouble with obtaining locks on tables with a DBI script.  I
have the following function which has been run at the beginning of a
long running script.  However, after starting the script I am able to go
into sqlplus and obtain exclusive locks on the tables in question.

I'm sure it has to do with the persistence of the statement handle or
something...

Environment:  DBI 1.14, DBD::Oralce 1.06 and Solaris 5.7


sub lock_tables( $ @ ) {
        my $hDB = shift;

        foreach( @_ ) {
                print "${SCRIPT_NAME}:: Message: Locking table \"$_\" in
exclusive mode.\n";
                $hDB->do( "lock table $_ in exclusive mode" );
        } # end foreach
} # end sub


Thanks in advance...

Reply via email to