Ronald J Kimball [[EMAIL PROTECTED]] wrote:
> On Mon, Nov 11, 2002 at 12:06:23PM -0800, John Gedeon wrote:
> > Is there a way to easily lock a table ? so that no updates can happen 
> > untill my script is done?
> > 
> > I am using DBD::Oracle?
> 
> Turn off AutoCommit, and use the LOCK TABLE command.
> 
> e.g. $dbh->do("LOCK TABLE mytable IN EXCLUSIVE MODE");
> 
> To release the lock, call commit().

Just to be completely clear, would that "commit" be
$dbh->commit();?  It's been quite a while since I've used
Oracle, and I never used the LOCK TABLE command.

-- 
Hardy Merrill
Senior Software Engineer
Red Hat, Inc.

Reply via email to