On Wed, Oct 10, 2007 at 05:22:08PM +1000, Peter McLarty wrote:
> Hello, 
> 
> Well I have had to wait for the sysadmins to do this, but we have done
> as you recommended and removed all the dbd and then tried doing a make
> on the system of the dbd to build a new one.
> It has errors relating to the same problem, but we pressed on and
> installed anyway
> Here is a trace, from an attempt to connect
> 
>  perl -MDBI -e 'DBI->trace(4); DBI->connect("dbi:Oracle:CS89PROD", 
> "/","",{ora_session_mode => 2, RaiseError  => 1});'
>     DBI 1.40-ithread dispatch trace level set to 4 (in pid 18625)
>     Note: perl is running without the recommended perl -w option
>     -> DBI->connect(dbi:Oracle:CS89PROD, /, ****, HASH(0x505290))
>     -> DBI->install_driver(Oracle) for linux perl=5.008005 pid=18625 ruid=500 
> euid=500
>        install_driver: DBD::Oracle version 1.19 loaded from 
> /usr/lib64/perl5/site_perl/5.8.5/x86_64-linux-thread-multi/DBD/Oracle.pm
>     New DBI::dr (for DBD::Oracle::dr, parent=, id=)
>     dbih_setup_handle(DBI::dr=HASH(0x698190)=>DBI::dr=HASH(0x7809e0), 
> DBD::Oracle::dr, 0, Null!)
> Had to create DBD::Oracle::dr::imp_data_size unexpectedly at 
> /usr/lib64/perl5/vendor_perl/5.8.5/x86_64-linux-thread-multi/DBI.pm line 1063.
>     dbih_make_com(Null!, 0, DBD::Oracle::dr, 196, 0) thr#504010

> Had to create DBD::Oracle::db::imp_data_size unexpectedly at 
> /usr/lib64/perl5/vendor_perl/5.8.5/x86_64-linux-thread-multi/DBI.pm line 1063.

> Undefined subroutine &DBD::Oracle::db::_login called at 
> /usr/lib64/perl5/site_perl/5.8.5/x86_64-linux-thread-multi/DBD/Oracle.pm line 
> 222.

These warnings and errors are symptoms of the DBD/Oracle.so file either
not being loaded or the wrong one being loaded.

> Interestingly the ORACLE_HOME that the database we are trying to connect
> to appears to have 32 bit Perl installed and the same one liner runs
> fine in it
> 
> If you can point me as to how we get down to finding the files,
> permissions that cause the error it would be appreciated

Start by setting the PERL_DL_DEBUG env var to 1 and rerun the command.
It'll show you which DBD/Oracle.so file is being loaded.

Also try running

    perl -Mblib -MDBI -e ...

in the DBD::Oracle build directory, also with the PERL_DL_DEBUG env var to 1.

Tim.

> -----Original Message-----
> From: Tim Bunce [mailto:[EMAIL PROTECTED] 
> Sent: Friday, 5 October 2007 06:46 PM
> To: Martin Evans
> Cc: dbi-users@perl.org
> Subject: Re: DBI and DBD::Oracle throw error Had to create
> DBD::Oracle::dr::imp_data_size unexpectedly
> 
> On Fri, Oct 05, 2007 at 09:07:48AM +0100, Martin Evans wrote:
> > Peter McLarty wrote:
> > >Hi
> > >Running some redhat servers and created some scripts that use DBI and
> 
> > >DBD::Oracle to access our 10.2.0.3 databases.
> > >The script was built and tested and has been used successfully on 
> > >dual core 64bit Xeon CPU servers and with as best as we can tell an 
> > >identical installation on some new quad core servers the script fails
> 
> > >with the above error.
> > >
> > >We have tried a later version of DBI we were using the 1.40 version 
> > >installed as a RPM and have installed 1.59 using perl and make.
> > >
> > >DBD::Oracle is 1.19
> > >
> > >I have some strace output from where it fails running a simple piece 
> > >of code that simply connects the the system as / and runs select * 
> > >from dual as well as then would do a couple of log switches
> > 
> > It may be easier to diagnose with a DBI trace instead of an strace 
> > (see DBI_TRACE in DBI pod). In particular what are the full errors
> here:
> > 
> > write(2, "Had to create DBD::Oracle::dr::i"..., 140) = 140 write(2, 
> > "Use of uninitialized value in su"..., 129) = 129
> > brk(0x925000)                           = 0x925000
> > write(2, "Had to create DBD::Oracle::db::i"..., 140) = 140 write(2, 
> > "Use of uninitialized value in su"..., 129) = 129 write(2, "Undefined 
> > subroutine &DBD::Oracl"..., 139) = 139
> 
> The problem will be some kind of mismatch between the Oracle.pm and
> Oracle.so (.sl / .whatever extension your shared libraries have).
> 
> I suggest you carefully find and remove all traces of DBD::Oracle and
> reinstall it. (Mainly delete all files under all perl @INC dirs that
> match DBD/Oracle.*)
> 
> If you still have problems after that then post a one liner that
> demonstrates the problem:
> 
>     perl -MDBI -e 'DBI->connect("...", ...)'
> 
> and we'll talk you through getting more info to diagnose the problem.
> 
> Tim.

Reply via email to