Why wont my script finish?

2004-11-24 Thread Mark Martin
Hi, I have a very simple script to delete records from an Oracle table : #!/usr/bin/perl use DBI; use DBD::Oracle; $dbh = DBI-connect( dbi:Oracle:database, user, password) or die Can't connect to Oracle database: $DBI::errstr\n; $dbh-do( DELETE FROM TABLE WHERE YEAR=2003 ); exit; the script

Re: Why wont my script finish?

2004-11-24 Thread Michael A Chase tech
On 11/24/2004 06:19 AM, Mark Martin said: I have a very simple script to delete records from an Oracle table : #!/usr/bin/perl use DBI; use DBD::Oracle; $dbh = DBI-connect( dbi:Oracle:database, user, password) or die Can't connect to Oracle database: $DBI::errstr\n; $dbh-do( DELETE FROM TABLE

Re: Why wont my script finish?

2004-11-24 Thread Mark Martin
Michael, thanks for the quick response. TABLE was just an example. tried your error checking and nothing came up. So, went back to : 1. defining the SQL statement instead. 2. preparing the statement handler - my $sth = $dbh-prepare($sql) 3. executing - $sth-execute() ...instead of a $dbh-do.

Re: Why wont my script finish?

2004-11-24 Thread David N Murray
How long does 'delete from table where year = 2003' take in SQLPlus? On Nov 24, Mark Martin scribed: Michael, thanks for the quick response. TABLE was just an example. tried your error checking and nothing came up. So, went back to : 1. defining the SQL statement instead. 2. preparing

Re: Why wont my script finish?

2004-11-24 Thread Mark Martin
49620 rows deleted in ~ 15 seconds. ( I have tried the delete from DBI on varying subsets of data all the way down to 1 record (the only delete that works)) At 10:57 24/11/2004 -0500, David N Murray wrote: How long does 'delete from table where year = 2003' take in SQLPlus? On Nov 24, Mark

RE: Why wont my script finish?

2004-11-24 Thread Ronald J Kimball
Mark Martin [mailto:[EMAIL PROTECTED] wrote: 49620 rows deleted in ~ 15 seconds. ( I have tried the delete from DBI on varying subsets of data all the way down to 1 record (the only delete that works)) Might you have one of the rows you're trying to delete from DBI locked in SQLPLUS? Make

Re: Why wont my script finish?

2004-11-24 Thread David N Murray
I do what you originally did ($dbh-do(delete...) all the time on Oracle 8.1.7. The only difference I have is my $dbh = DBI-connect(dbi:Oracle:database, user, pass, { RaiseError = 1, AutoCommit = 0 }); i.e. I explicitly set AutoCommit off. I always have done that, and

RE: Why wont my script finish?

2004-11-24 Thread Mark Martin
Brilliant - that's it! Thank you! Would SELECTs lock up a record without a commit statement? Mark At 11:15 24/11/2004 -0500, Ronald J Kimball wrote: Mark Martin [mailto:[EMAIL PROTECTED] wrote: 49620 rows deleted in ~ 15 seconds. ( I have tried the delete from DBI on varying subsets of data all

RE: Why wont my script finish?

2004-11-24 Thread Reidy, Ron
PROTECTED] Subject: RE: Why wont my script finish? Brilliant - that's it! Thank you! Would SELECTs lock up a record without a commit statement? Mark At 11:15 24/11/2004 -0500, Ronald J Kimball wrote: Mark Martin [mailto:[EMAIL PROTECTED] wrote: 49620 rows deleted in ~ 15 seconds. ( I have

RE: Why wont my script finish?

2004-11-24 Thread Mark Martin
Message- From: Mark Martin [mailto:[EMAIL PROTECTED] Sent: Wednesday, November 24, 2004 9:26 AM To: Ronald J Kimball Cc: [EMAIL PROTECTED] Subject: RE: Why wont my script finish? Brilliant - that's it! Thank you! Would SELECTs lock up a record without a commit statement? Mark At 11:15 24/11/2004

RE: Why wont my script finish?

2004-11-24 Thread Jeff Urlwin
I do what you originally did ($dbh-do(delete...) all the time on Oracle 8.1.7. The only difference I have is my $dbh = DBI-connect(dbi:Oracle:database, user, pass, { RaiseError = 1, AutoCommit = 0 }); i.e. I explicitly set AutoCommit off. I always have done

RE: Why wont my script finish?

2004-11-24 Thread David N Murray
On Nov 24, Jeff Urlwin scribed: I do what you originally did ($dbh-do(delete...) all the time on Oracle 8.1.7. The only difference I have is my $dbh = DBI-connect(dbi:Oracle:database, user, pass, { RaiseError = 1, AutoCommit = 0 }); i.e. I explicitly set