db2 - persistent connection

2006-09-01 Thread Jack Faley ( The Tao of Jack )

I have several ( 100 - 200 ) small exits c oming from an app that update db2
tables. This works fine but the dba's don't like that many open connection
overheads. This isn't cgi/apache. These are all seperate terminating
processes. From what I gather there is no way to pass the dbh between
processes? Is some sort of middle daemon ( I guess non perl ) that keeps one
persistent connection to db2 and then have perl feed the daemon the only
option? I would think others have run into this wall before?


Thanks!




--

Why is this technology an anathema to me?


Re: Getting DBD::Oracle tests working

2006-09-01 Thread Karl Auer
On Fri, 2006-09-01 at 10:56 -0400, John D Groenveld wrote:
> In message <[EMAIL PROTECTED]>, Karl Auer writes:
> >9/9 skipped: Unable to connect to Oracle (ORA-12162: TNS:net service 
> > n
> >ame is incorrectly specified (DBD ERROR: OCIServerAttach))
> 
> You did not set TWO_TASK properly.

This seems the most plausible answer so far. When I set it as follows:

   export TWO_TASK=T:my_db_host_name:some_id

it takes longer to fail, indicating it is doing something over the net.
The error messages are the same though.

To the person who realised I had the wrong LD_LIBRARY_PATH - thank you,
I sent the wrong output. I had added /lib to the end of the correct path
in quiet desperation. In earlier and leter attempts with the right
library path it still issued the above error messages, just not the one
about "error while loading shared libraries" :-)

To the person who said "copy this and that from ORACLE_HOME", thanks,
but I don't HAVE an ORACLE_HOME, I'm trying to use the instant client.
My machine does not have any other Oracle software installed.

I have emailed the person responsible for the database I want to use and
asked him to tell me what exactly I should have in TWO_TASK. Personally
I now suspect I have the wrong value for "some_id" above.

Is 'scott/tiger' some well-known user/password that is always present in
any Oracle install?

Regards, K.

-- 
~~~
Karl Auer ([EMAIL PROTECTED])   +61-2-64957160 (h)
http://www.biplane.com.au/~kauer/  +61-428-957160 (mob)



Re: Getting DBD::Oracle tests working

2006-09-01 Thread Stephen Carville

Karl Auer wrote:

Hi there.

In common apparently with many others, I can't seem to get DBD::Oracle
installed with the InstantClient. It was retrieved OK from CPAN, and
appears to build OK, but many tests fail and the install is stopped as a
result.

Attached is the output from one install attempt. It seems that many
tests fail with essentially the same message, about a service being
incorrectly configured.

So I'd like to know two things.

Firstly, is there some obvious thing I've missed that will make the
tests work?

Secondly, if not, can I/should I force the install? Attempts to use
sqlplus bring the same error message, so I'm guessing not.

As far as Oracle is concerned, I simply downloaded the three packages
basic, sdk and sqlplus, unpacked them all in a directory, and have set
that directory to be LD_LIBRARY_PATH and ORACLE_HOME. For good measure,
I set ORACLE_USERID to be 'scott/tiger', though that seems unnecessary
and doesn't help :-)


Here are the steps I used

A complete client installation is not needed to install DBD::Oracle. At 
a minimum copy over from $ORACLE_HOME the directories:


 bin
 lib
 network
 oracore
 rdbms
 sqlplus

Set the following environment variables

 export ORACLE_HOME=
 export LD_LIBRARY_PATH=$ORACLE_HOME/lib
 export PATH=$PATH:/$ORACLE_HOME/bin

Set TWO_TASK appropriately. This varies depending on the type of 
connection used. For example, if you use tnsnames.ora for resolution:


 export TWO_TASK=

You should now be able to connect with:

 $ sqlplus /

Build the module:

 $ perl Makefile.PL
 $ make

Set a user/pass for testing

 $ export ORACLE_USERID=/

Test

 $ make test

Install

 $ sudo make install

Before using it is a good idea to link libclntsh.so somewhere "normal".

 /usr/lib/libclntsh.so.10.1 -> 
/mp001/app/oracle/product/10/lib/libclntsh.so.10.1



--
Stephen Carville <[EMAIL PROTECTED]>
Unix and Network Admin
Nationwide Totalflood
6033 W. Century Blvd
Los Angeles, CA 90045
310-342-3602


AutoCommit and DBI::Proxy driver

2006-09-01 Thread Artem Harutyunyan

Hi,

I have the mySQL server, to which I am connecting through DBI::Proxy. When I
do '$dbh->begin_work' and then call '$dbh->commit' everything *seems* to
work (at least, I don't see any errors or warnings). According to
documentation, a call to '$dbh->commit' after '$dbh->begin_work'  turns
'AutoCommit' back on.
The problems start when I try to set '$dbh-{AutoCommit} =0'  (or call
$dbh->begin_work' ) for the SECOND time (after the first call to
'$dbh->commit'). The error says that AutoCommit is not supported by my
driver.

When I connect to mySQL server directly (using 'mysql' driver) everything
works, so, given that my database supports AutoCommit, I suspect that the
problem is in DBI::Proxy driver.

Any ideas  ?

Thanks in advance for reply,
Artem.


Apache::DBI/AutoCommit error

2006-09-01 Thread Ryan Perry

I sometimes get:

DBD driver has not implemented the AutoCommit attribute at
/usr/local/lib/perl5/site_perl/5.8.8/Apache/DBI.pm line 277.

On my HTML::Mason site.  I'm using Apache 2.2/mod_perl 2.
I list
   PerlModule Apache::DBI
before any other perl modules.

I connect with AutoCommit => 1

What am I doing wrong?


Re: Problem with DBI make

2006-09-01 Thread Tim Bunce
On Fri, Sep 01, 2006 at 01:06:54PM +0100, John Gallagher wrote:
> 
> Hi 
> 
> I've encountered the below error when running a make for the DBI module;
> 
> Make runs up to a certain point but then just bombs with the below message
> 
> Perl.c: In function `XS_DBD__Perl__st_DESTROY':
> Perl.c:1054: warning: unused parameter `cv'
> Perl.c: In function `boot_DBD__Perl':
> Perl.c:1106: warning: unused parameter `cv'
> make: *** [Perl.o] Error 1
> 
> Thanks for any assistance given

Those are only harmless warnings. Please include more of the log.

Tim.


Re: last_insert_rowid and DBD::ODBC combined with DBIx::Class::Storage::DBI

2006-09-01 Thread Martin J. Evans

Tim Bunce wrote:

On Fri, Sep 01, 2006 at 04:45:07PM -, Eriam Schaffter wrote:


my software crashes badly due to the fact that DBD::ODBC has not a
"last_insert_rowid" method:



It's called last_insert_id

Tim.


As you say, it is last_insert_id but I don't think DBD::ODBC implements 
it because there is not a standard way in ODBC to get the last insert 
id. In SQL Server it is select @@identity, in mysql it is a function 
(something like select LAST_INSERTID), in Oracle people use the 
returning clause or a sequence etc etc. They are all different.


IIRC, last time I needed to do this I had to override last_insert_id for 
each db I was using DBD::ODBC with.


Martin


Make test of 1.52 failed on childhandles

2006-09-01 Thread Clive George

Hi -

I just got DBI 1.52 out, and the make test stage failed on childhandles. 
This is on AIX 5.3, perl 5.8.2 built for aix-thread-multi.


t/zvpp_72childhandles1..14
ok 1
ok 2
not ok 3
not ok 4
ok 5 - All handles should be undef now
ok 6 - ChildHandles should be an array-ref if wekref is available
not ok 7
drh  DBI::dr=HASH(0x3018cb8c)
not ok 8
ok 9
not ok 10
not ok 11
ok 12 - handles should be gone now
ok 13
ok 14

Is this supposed to happen?

cheers,
clive 



Re: Getting DBD::Oracle tests working

2006-09-01 Thread Martin J. Evans

John Scoles wrote:

"Using Oracle in /home/kauer/oracle/instantclient
sqlplus: error while loading shared libraries: libsqlplus.so: cannot 
open shared object file: No such file or directory

I'm having trouble finding your Oracle version number... trying harder"

Looking at the above means you did not load all of the instantclient files
besides
Instant Client Package - Basic: All files required to run OCI, OCCI, and 
JDBC-OCI applications


you need

Instant Client Package - SQL*Plus: Additional libraries and executable 
for running SQL*Plus with Instant Client

Instant Client Package - SDK:

as well

all available from Oracle



According to Karl's email he had already installed those packages.
The problem is more likely this:

Using Oracle in /home/kauer/oracle/instantclient
sqlplus: error while loading shared libraries: libsqlplus.so: cannot 
open shared object file: No such file or directory

I'm having trouble finding your Oracle version number... trying harder

WARNING: I could not determine Oracle client version so I'll just
default to version 8.0.0.0. Some features of DBD::Oracle may not work.
Oracle version based logic in Makefile.PL may produce erroneous results.
You can use "perl Makefile.PL -V X.Y.Z" to specify a your client version.

i.e. /home/kauer/oracle/instantclient is not in his LD_LIBRARY_PATH and 
hence sqlplus cannot run because it cannot fine libsqlplus.so.


The install says his LD_LIBRARY_PATH is set to:

/home/kauer/oracle/instantclient/lib

which if IIRC does not exist in instantclient (now?) and DBD::Oracle 
creates.


Try again with LD_LIBRARY_PATH set to:

/home/kauer/oracle/instantclient:/home/kauer/oracle/instantclient/lib

Then you need to set your TWO_TASK or TNS_ADMIN and tnsnames.ora and get 
sqlplus working first before running make test.


Martin


Re: Getting DBD::Oracle tests working

2006-09-01 Thread John D Groenveld
In message <[EMAIL PROTECTED]>, Karl Auer writes:
>9/9 skipped: Unable to connect to Oracle (ORA-12162: TNS:net service n
>ame is incorrectly specified (DBD ERROR: OCIServerAttach))

You did not set TWO_TASK properly.

John
[EMAIL PROTECTED]



Re: Getting DBD::Oracle tests working

2006-09-01 Thread John Scoles

"Using Oracle in /home/kauer/oracle/instantclient
sqlplus: error while loading shared libraries: libsqlplus.so: cannot open 
shared object file: No such file or directory

I'm having trouble finding your Oracle version number... trying harder"

Looking at the above means you did not load all of the instantclient files
besides
Instant Client Package - Basic: All files required to run OCI, OCCI, and 
JDBC-OCI applications


you need

Instant Client Package - SQL*Plus: Additional libraries and executable for 
running SQL*Plus with Instant Client

Instant Client Package - SDK:

as well

all available from Oracle



Make test of 1.52 failed on childhandles

2006-09-01 Thread Clive George

Hi -

I just got DBI 1.52 out, and the make test stage failed on childhandles. 
This is on AIX 5.3, perl 5.8.2 built for aix-thread-multi.


t/zvpp_72childhandles1..14
ok 1
ok 2
not ok 3
not ok 4
ok 5 - All handles should be undef now
ok 6 - ChildHandles should be an array-ref if wekref is available
not ok 7
drh  DBI::dr=HASH(0x3018cb8c)
not ok 8
ok 9
not ok 10
not ok 11
ok 12 - handles should be gone now
ok 13
ok 14

Is this supposed to happen?

cheers,
clive 



Re: last_insert_rowid and DBD::ODBC combined with DBIx::Class::Storage::DBI

2006-09-01 Thread Tim Bunce
On Fri, Sep 01, 2006 at 04:45:07PM -, Eriam Schaffter wrote:
> 
> my software crashes badly due to the fact that DBD::ODBC has not a
> "last_insert_rowid" method:

It's called last_insert_id

Tim.


Getting DBD::Oracle tests working

2006-09-01 Thread Karl Auer
Hi there.

In common apparently with many others, I can't seem to get DBD::Oracle
installed with the InstantClient. It was retrieved OK from CPAN, and
appears to build OK, but many tests fail and the install is stopped as a
result.

Attached is the output from one install attempt. It seems that many
tests fail with essentially the same message, about a service being
incorrectly configured.

So I'd like to know two things.

Firstly, is there some obvious thing I've missed that will make the
tests work?

Secondly, if not, can I/should I force the install? Attempts to use
sqlplus bring the same error message, so I'm guessing not.

As far as Oracle is concerned, I simply downloaded the three packages
basic, sdk and sqlplus, unpacked them all in a directory, and have set
that directory to be LD_LIBRARY_PATH and ORACLE_HOME. For good measure,
I set ORACLE_USERID to be 'scott/tiger', though that seems unnecessary
and doesn't help :-)

Regards, K.

-- 
~~~
Karl Auer ([EMAIL PROTECTED])   +61-2-64957160 (h)
http://www.biplane.com.au/~kauer/  +61-428-957160 (mob)
CPAN: Storable loaded ok
Going to read /home/kauer/.cpan/Metadata
  Database was generated on Thu, 31 Aug 2006 11:32:19 GMT
Running install for module DBD::Oracle
Running make for P/PY/PYTHIAN/DBD-Oracle-1.18a.tar.gz
CPAN: Digest::MD5 loaded ok
Checksum for 
/home/kauer/.cpan/sources/authors/id/P/PY/PYTHIAN/DBD-Oracle-1.18a.tar.gz ok
Scanning cache /home/kauer/.cpan/build for sizes
DBD-Oracle-1.18/
DBD-Oracle-1.18/Oracle.ex/
DBD-Oracle-1.18/Oracle.ex/ex.pl
DBD-Oracle-1.18/Oracle.ex/sql
DBD-Oracle-1.18/Oracle.ex/japh
DBD-Oracle-1.18/Oracle.ex/oradump.pl
DBD-Oracle-1.18/Oracle.ex/curref.pl
DBD-Oracle-1.18/Oracle.ex/commit.pl
DBD-Oracle-1.18/Oracle.ex/mktable.pl
DBD-Oracle-1.18/Oracle.ex/bind.pl
DBD-Oracle-1.18/Oracle.ex/tabinfo.pl
DBD-Oracle-1.18/Oracle.ex/proc.pl
DBD-Oracle-1.18/Oracle.ex/README
DBD-Oracle-1.18/Oraperl.pm
DBD-Oracle-1.18/ocitrace.h
DBD-Oracle-1.18/hints/
DBD-Oracle-1.18/hints/svr4.pl
DBD-Oracle-1.18/hints/dgux.pl
DBD-Oracle-1.18/hints/macos_lib.syms
DBD-Oracle-1.18/hints/macos_bundle.syms
DBD-Oracle-1.18/hints/macos_syms.pl
DBD-Oracle-1.18/Todo
DBD-Oracle-1.18/README.login.txt
DBD-Oracle-1.18/oci8.c
DBD-Oracle-1.18/README.sec.txt
DBD-Oracle-1.18/README-files/
DBD-Oracle-1.18/README-files/hpux/
DBD-Oracle-1.18/README-files/hpux/Conf-Merijn-588-10.20-gcc
DBD-Oracle-1.18/README-files/hpux/libjava.eml
DBD-Oracle-1.18/README-files/hpux/Conf-Merijn-588-11.00-gcc32
DBD-Oracle-1.18/README-files/hpux/Conf-Merijn-588-11.11-gcc32
DBD-Oracle-1.18/README-files/hpux/Conf-Merijn-588-11.00-gcc64
DBD-Oracle-1.18/README-files/hpux/Conf-Merijn-588-11.11-gcc64
DBD-Oracle-1.18/README-files/hpux/Conf-Merijn-588-11.23-gcc64
DBD-Oracle-1.18/README-files/hpux/Conf-Roger
DBD-Oracle-1.18/README-files/hpux/Conf-Merijn-580-10.20-cc
DBD-Oracle-1.18/README-files/hpux/Conf-Lincoln-1.06
DBD-Oracle-1.18/README-files/hpux/Conf-Lincoln-1.07
DBD-Oracle-1.18/README-files/hpux/Conf-Merijn-585-11.00-cc
DBD-Oracle-1.18/README-files/hpux/Conf-Mike
DBD-Oracle-1.18/README-files/hpux/Conf-Merijn-585-11.11-cc
DBD-Oracle-1.18/README-files/hpux/Makefile-Lincoln
DBD-Oracle-1.18/README-files/hpux/Conf-Merijn-587-11.23-cc
DBD-Oracle-1.18/README.java.txt
DBD-Oracle-1.18/README.aix.txt
DBD-Oracle-1.18/README.longs.txt
DBD-Oracle-1.18/err_unicode/
DBD-Oracle-1.18/err_unicode/err_twolongstr.msg
DBD-Oracle-1.18/err_unicode/err_char.msg
DBD-Oracle-1.18/README.hpux.txt
DBD-Oracle-1.18/err_docs/
DBD-Oracle-1.18/err_docs/err_trace.msg
DBD-Oracle-1.18/README.macosx.txt
DBD-Oracle-1.18/README.help.txt
DBD-Oracle-1.18/lib/
DBD-Oracle-1.18/lib/DBD/
DBD-Oracle-1.18/lib/DBD/Oracle/
DBD-Oracle-1.18/lib/DBD/Oracle/GetInfo.pm
DBD-Oracle-1.18/oraperl.ph
DBD-Oracle-1.18/MANIFEST
DBD-Oracle-1.18/oci.def
DBD-Oracle-1.18/Changes
DBD-Oracle-1.18/err_unsorted/
DBD-Oracle-1.18/err_unsorted/err_xmltypebindplsql.msg
DBD-Oracle-1.18/err_unsorted/err_ora9ir2oci.msg
DBD-Oracle-1.18/err_unsorted/err_xml2.msg
DBD-Oracle-1.18/err_unsorted/err_svrparse.msg
DBD-Oracle-1.18/err_unsorted/err_refcsr_slow.msg
DBD-Oracle-1.18/err_unsorted/err_refcsr_rowcache.msg
DBD-Oracle-1.18/err_unsorted/err_etherreal.msg
DBD-Oracle-1.18/err_unsorted/err_slowcsr.msg
DBD-Oracle-1.18/err_unsorted/err_multiora.msg
DBD-Oracle-1.18/err_unsorted/err_ref_type.msg
DBD-Oracle-1.18/err_unsorted/err_memleak2.msg
DBD-Oracle-1.18/err_unsorted/err_xml.msg
DBD-Oracle-1.18/README.linux.txt
DBD-Oracle-1.18/README.wingcc.txt
DBD-Oracle-1.18/MANIFEST.SKIP
DBD-Oracle-1.18/ora_explain.PL
DBD-Oracle-1.18/README.win32.txt
DBD-Oracle-1.18/README.vms.txt
DBD-Oracle-1.18/dbivport.h
DBD-Oracle-1.18/typemap
DBD-Oracle-1.18/dbdimp.c
DBD-Oracle-1.18/Oracle.pm
DBD-Oracle-1.18/err_bind/
DBD-Oracle-1.18/err_bind/err_bind_param_inout_overrun_bug.msg
DBD-Oracle-1.18/err_bind/err_bindclobleak.msg
DBD-Oracle-1.18/err_bind/err_bindnullhash.msg
DBD-Oracle-1.18/err_bind/err_bindarrays.m

last_insert_rowid and DBD::ODBC combined with DBIx::Class::Storage::DBI

2006-09-01 Thread Eriam Schaffter
Hello

There is two sides to this issue, one has been filled on rt.cpan.org (the
DBIx::Class::Storage::DBI one) and the other one I am raising here.

Actually I'm using DBD::ODBC with DBIx::Class::Storage::DBI and when I try
to add a record

  my $rapport = $schema->resultset('Rapports')->create({
 nom  => 'Hello World'
  });

my software crashes badly due to the fact that DBD::ODBC has not a
"last_insert_rowid" method:

Can't locate DBI object method "last_insert_rowid" via package
"DBD::ODBC::db" a
t C:/Perl/site/lib/DBIx/Class/Storage/DBI.pm line 592.

This is not so cool, you can imagine ..

So is there a special reason why this last_insert_rowid is not implemented
in DBD::ODBC (like an ODBC reason, in this case it's just a
DBIx::Class::Storage::DBI issue) or is it simply missing (in this case I
can try adding this ..) ?

Thank you

Eriam

--
Eriam Schaffter




How to chain DBIxs

2006-09-01 Thread Martin J. Evans

How can you use two DBIx::xxx at the same time?

Say I had DBIx::fred and DBIx::bloggs both providing different
extensions to DBI which do not interfere with each other. Both
DBIx::fred and DBIx::bloggs do a:

DBI->connect

when what I really want to do is:

my $dbh = DBIx::fred->connect()

and DBIx::fred internally does a:

my $dbh = DBIx::bloggs->connect which does the DBI->connect.

Is there a defined way to do this with a DBIx module? or are you stuck
only using one DBIx module unless you edit them? Perhaps no one has
needed or wanted to do this before.

Martin


Problem with DBI make

2006-09-01 Thread John Gallagher

Hi 

I've encountered the below error when running a make for the DBI module;

Make runs up to a certain point but then just bombs with the below message

Perl.c: In function `XS_DBD__Perl__st_DESTROY':
Perl.c:1054: warning: unused parameter `cv'
Perl.c: In function `boot_DBD__Perl':
Perl.c:1106: warning: unused parameter `cv'
make: *** [Perl.o] Error 1

Thanks for any assistance given

John



BT Communications Ireland Limited 
is a wholly owned subsidiary of BT Group plc 
Registered in Ireland, Registration No. 141524 
Grand Canal Plaza, Upper Grand Canal Street, Dublin, Ireland 

This electronic message contains information (and may contain files) from BT
Communications Ireland Limited which may be privileged or confidential. The
information is intended to be for the sole use of the individual(s) or
entity named above. If you are not the intended recipient be aware that any
disclosure, copying, distribution or use of the contents of this information
and or files is prohibited. If you have received this electronic message in
error, please notify us by telephone or email (to the numbers or address
above) immediately. http://www.btireland.ie


Re: Compatible version with Oracle10g - VERY URGENT

2006-09-01 Thread John Scoles
It sould work with perl 5.6.1 can't say for sure.
Most of the testing and developement has been done with Perl 5.8. but I do 
not think it uses anything special controls from 5.8.

You may have to recompile both DBI & DBD so they will work with your older 
perl.

What is your OS and platform?

""Sasikala Elangovan"" <[EMAIL PROTECTED]> wrote in message 
news:[EMAIL PROTECTED]
> Hi,
>
> Please let me know if Perl version 5.6.1 with DBD-Oracle-1.18 and DBI-1.52 
> is compatible with Oracle 10g database.
>
> Regards
> Sasikala 




Compatible version with Oracle10g - VERY URGENT

2006-09-01 Thread Sasikala Elangovan

Hi,

Please let me know if Perl version 5.6.1 with DBD-Oracle-1.18 and 
DBI-1.52 is compatible with Oracle 10g database.


Regards
Sasikala