Announcement/Request for Comments: DBIx::Call

2004-11-24 Thread Thilo Planz
Hi all, I have been using Oracle PL/SQL fairly extensively these days, and came up with a module that creates Perl wrappers for PL/SQL procedures, so that I can call them just like Perl functions (without the need to write SQL statements or to manually bind parameters). After some discussion wi

Re: Zombie handles when trapped by a signal

2004-11-24 Thread Michael Peppler
On Thu, 2004-11-25 at 01:52, Henri Asseily wrote: > I have slammed into a wall in my quest for reliable failover and high > availability in DBI. I don't know if this discussion should be in > dbi-users or dbi-dev, but here goes: > If the alarm is triggered, then your statement handle ($sth) gets

Re: Zombie handles when trapped by a signal

2004-11-24 Thread Lincoln A. Baxter
Hi Henri, I have some questions/avenues for you to pursue: 1) What happens when you change safe=>1 to safe=>0 in this code? 2) What happens if you close the entire dbh at this point (reopen it later)? -- its a thought? 3) Which DBD(s) have you tested this with? If more than one, does the probl

Re: prepared statement: automatically removed trailing spaces

2004-11-24 Thread Michael A Chase tech
On 11/24/2004 04:55 AM, Steinhauer, Frank (CAM) said: ... What actually happens is that the default binding for DBD::Oracle is SQL_VARCHAR. When Oracle OCI sees that type, it automatically strips trailing spaces leaving '' if that's all there was. Then '' is interpreted as a NULL by Oracle. Binding

Zombie handles when trapped by a signal

2004-11-24 Thread Henri Asseily
I have slammed into a wall in my quest for reliable failover and high availability in DBI. I don't know if this discussion should be in dbi-users or dbi-dev, but here goes: High availability necessitates a good timeout handling system. If execution of an sql statement or stored procedure takes

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 }); > > >

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 al

Re: DBD::Oracle problem with include files

2004-11-24 Thread Jared Still
On Wed, 2004-11-24 at 06:43, Tim Bunce wrote: > On Wed, Nov 24, 2004 at 01:39:53PM +0200, Doru Petrescu wrote: > > > > ... Oracle 10.1.0.3 ... > > in the end it turns out there are TWO oci.h files one in rdbms/demo and > > one in rdbs/public I have only one, in $ORACLE_HOME/rdbms/public. Jared

Re: DBD::Oracle problem with include files

2004-11-24 Thread Doru Petrescu
same result :( D. On Wed, 2004-11-24 at 16:43, Tim Bunce wrote: > On Wed, Nov 24, 2004 at 01:39:53PM +0200, Doru Petrescu wrote: > > > > ... Oracle 10.1.0.3 ... > > in the end it turns out there are TWO oci.h files one in rdbms/demo and > > one in rdbs/public > > Can anyone else with access to

RE: Why wont my script finish?

2004-11-24 Thread Mark Martin
okay - must have locked it with some other statement without realizing. Many thanks to all At 09:38 24/11/2004 -0700, Reidy, Ron wrote: No. COMMIT is a transactional statement. In Oracle, readers do not block writers. - Ron Reidy Lead DBA Array BioPharma, Inc. -Original M

RE: Why wont my script finish?

2004-11-24 Thread Reidy, Ron
No. COMMIT is a transactional statement. In Oracle, readers do not block writers. - Ron Reidy Lead DBA Array BioPharma, Inc. -Original Message- From: Mark Martin [mailto:[EMAIL PROTECTED] Sent: Wednesday, November 24, 2004 9:26 AM To: Ronald J Kimball Cc: [EMAIL PROTEC

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 a

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 tha

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?

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 Martin

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. p

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->d

prepared statement: automatically removed trailing spaces

2004-11-24 Thread Steinhauer, Frank (CAM)
Hello, I had for some days a problem using a prepared statement. One value was simply a space, the row had a NOT NULL constraint, and i always got the error message "... cannot insert NULL into ... (DBD ERROR: OCIStmtExecute)". Well, after more than two days trying to specify the problem and then

Re: DBD::Oracle problem with include files

2004-11-24 Thread Martin Hall
My Solaris setup has only got one oci.h in rdbms/public as does my pretty much out of the box Windows installation. Martin Tim Bunce wrote: On Wed, Nov 24, 2004 at 01:39:53PM +0200, Doru Petrescu wrote: ... Oracle 10.1.0.3 ... in the end it turns out there are TWO oci.h files one in rdbms/demo

Re: DBD::Oracle problem with include files

2004-11-24 Thread Tim Bunce
On Wed, Nov 24, 2004 at 01:39:53PM +0200, Doru Petrescu wrote: > > ... Oracle 10.1.0.3 ... > in the end it turns out there are TWO oci.h files one in rdbms/demo and > one in rdbs/public Can anyone else with access to Oracle 10.1 confirm if they've got two oci.h files? [Note that you may not get

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 FRO

Re: Oracle problem

2004-11-24 Thread Tim Bunce
On Wed, Nov 24, 2004 at 08:07:33AM -0500, Hardy Merrill wrote: > Tim, can you elaborate a little? I've tried to find the referenced > documentation but can't. I don't quite understand how a CHAR datatype > can cause this problem. Well there's: > See > http://search.cpan.org/~timb/DBD-Oracle-1.1

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

Re: Oracle problem

2004-11-24 Thread Michael A Chase tech
On 11/24/2004 05:07 AM, Hardy Merrill said: Tim, can you elaborate a little? I've tried to find the referenced documentation but can't. I don't quite understand how a CHAR datatype can cause this problem. CHAR column values are padded with spaces to the length of the column. When compared with a

Re: Oracle problem

2004-11-24 Thread Hardy Merrill
Tim, can you elaborate a little? I've tried to find the referenced documentation but can't. I don't quite understand how a CHAR datatype can cause this problem. Thanks. Hardy Merrill >>> Tim Bunce <[EMAIL PROTECTED]> 11/24/04 07:35AM >>> On Tue, Nov 23, 2004 at 10:13:30PM +, Bart Kelsey w

Re: Oracle problem

2004-11-24 Thread Tim Bunce
On Tue, Nov 23, 2004 at 10:13:30PM +, Bart Kelsey wrote: > I'm having some trouble with DBD::Oracle... > When I execute this code: > *** > >$sth = $dbh->prepare("select * from abbrev where type = ?"); >$sth->execute("PAYMENT"); >while((@row) = $sth->fetchrow_array) { > print(j

DBD::Oracle problem with include files

2004-11-24 Thread Doru Petrescu
Hi, I run into a strange problem today compiling DBD::Oracle on the newly installed Oracle 10.1.0.3 the erorr I got was: gcc -c -I/usr/oracle/rdbms/demo -I/usr/oracle/rdbms/public -I/usr/oracle/plsql/public -I/usr/oracle/network/public -I/usr/oracle/rdbms/demo -I/usr/oracle/plsql/public -

Re: Oracle problem

2004-11-24 Thread Wieland Pusch
Hello Bart, I run DBD::Oracle version 1.16 with DBI 1.41-ithread on Windows XP accessing Oracle8i Release 8.1.7.4.1 I can't reproduce your problem. Do you check for errors? Do you use RaiseError? Did you try to produce a trace? Add something like this: DBI->trace(9,"dbitrace.txt"); Tuesday, N

Oracle problem

2004-11-24 Thread Bart Kelsey
I'm having some trouble with DBD::Oracle... When I execute this code: *** $sth = $dbh->prepare("select * from abbrev where type = ?"); $sth->execute("PAYMENT"); while((@row) = $sth->fetchrow_array) { print(join(", ", @row), "\n"); } $sth->finish; *** ... no rows are returned. H