Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   Perl Misc (http://www.velocityreviews.com/forums/f67-perl-misc.html)
-   -   DBD::Oracle build on aix 6.1 ( host is a 64 bit db server ) (http://www.velocityreviews.com/forums/t946385-dbd-oracle-build-on-aix-6-1-host-is-a-64-bit-db-server.html)

Am Nym 05-19-2012 06:35 PM

DBD::Oracle build on aix 6.1 ( host is a 64 bit db server )
 
The 64 bit Oracle server is loaded on this host.

Do I still have to load an Oracle client?

README.clients.txt says:

*** THE PREFERED METHOD IS TO USE Oracle Instant Client ***

So should I install the 'Oracle Instant Client' before attempting
the build of DBD::Oracle?

--
thanks!


xtdkmqc@gmail.com 05-19-2012 09:57 PM

Re: DBD::Oracle build on aix 6.1 ( host is a 64 bit db server )
 
On Saturday, May 19, 2012 2:07:10 PM UTC-5, Ben Morrow wrote:
> Quoth Am Nym <------@gmail.com>:
> > The 64 bit Oracle server is loaded on this host.
> >
> > Do I still have to load an Oracle client?

>
> Is your perl 32bit or 64bit?


$ perl -V
Summary of my perl5 (revision 5 version 8 subversion 8) configuration:
Platform:
osname=aix, osvers=5.3.0.0, archname=aix-thread-multi
uname='aix akash79 3 5 00011a85d600 '
config_args='-desr -Dinstallprefix=/usr/opt/perl5 -Dprefix=/usr/opt/perl5 -Dcc=xlc_r -Duseshrplib -Dusethreads'
hint=recommended, useposix=true, d_sigaction=define
usethreads=define use5005threads=undef useithreads=define usemultiplicity=define
useperlio=define d_sfio=undef uselargefiles=define usesocks=undef
use64bitint=undef use64bitall=undef uselongdouble=undef
usemymalloc=n, bincompat5005=undef
Compiler:
cc='cc_r', ccflags ='-D_ALL_SOURCE -D_ANSI_C_SOURCE -D_POSIX_SOURCE -qmaxmem=-1 -qnoansialias -DUSE_NATIVE_DLOPEN -DNEED_PTHREAD_INIT -q32-D_LARGE_FILES -qlonglong',
optimize='-O',
cppflags='-D_ALL_SOURCE -D_ANSI_C_SOURCE -D_POSIX_SOURCE -qmaxmem=-1 -qnoansialias -DUSE_NATIVE_DLOPEN -DNEED_PTHREAD_INIT'
ccversion='9.0.0.2', gccversion='', gccosandvers=''
intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=4321
d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=8
ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8
alignbytes=8, prototype=define
Linker and Libraries:
ld='ld', ldflags =' -brtl -bdynamic -b32'
libpth=/lib /usr/lib /usr/ccs/lib
libs=-lbind -lnsl -lgdbm -ldbm -ldb -ldl -lld -lm -lcrypt -lpthreads -lc -lbsd
perllibs=-lbind -lnsl -ldl -lld -lm -lcrypt -lpthreads -lc -lbsd
libc=, so=a, useshrplib=true, libperl=libperl.a
gnulibc_version=''
Dynamic Linking:
dlsrc=dl_aix.xs, dlext=so, d_dlsymun=undef, ccdlflags=' -bE:/usr/opt/perl5/lib/5.8.8/aix-thread-multi/CORE/perl.exp'
cccdlflags=' ', lddlflags='-bhalt:4 -bexpall -G -bnoentry -lpthreads -lc'


Characteristics of this binary (from libperl):
Compile-time options: MULTIPLICITY PERL_IMPLICIT_CONTEXT
PERL_MALLOC_WRAP USE_ITHREADS USE_LARGE_FILES
USE_PERLIO USE_REENTRANT_API
Built under aix
Compiled at Jun 2 2009 16:11:40
@INC:
/usr/opt/perl5/lib/5.8.8/aix-thread-multi
/usr/opt/perl5/lib/5.8.8
/usr/opt/perl5/lib/site_perl/5.8.8/aix-thread-multi
/usr/opt/perl5/lib/site_perl/5.8.8
/usr/opt/perl5/lib/site_perl

Am Nym 05-20-2012 07:55 PM

Re: DBD::Oracle build on aix 6.1 ( host is a 64 bit db server )
 
Ben Morrow <ben@morrow.me.uk> writes:

> Quoth xtdkmqc@gmail.com:
>> On Saturday, May 19, 2012 2:07:10 PM UTC-5, Ben Morrow wrote:
>> > Quoth Am Nym <------@gmail.com>:
>> > > The 64 bit Oracle server is loaded on this host.
>> > >
>> > > Do I still have to load an Oracle client?
>> >
>> > Is your perl 32bit or 64bit?

>>
>> $ perl -V
>> Summary of my perl5 (revision 5 version 8 subversion 8) configuration:

>
> (That's pretty old; both 5.8 and 5.10 are unsupported by the perl
> developers at this point. You should seriously consider upgrading.)


We need to plan for that.

> <snip>
>> cc='cc_r', ccflags ='-D_ALL_SOURCE -D_ANSI_C_SOURCE

>
> That's the system cc.


Right, the AIX compiler.

>> intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=4321
>> d_longlong=define, longlongsize=8, d_longdbl=define,
>> longdblsize=8 ivtype='long', ivsize=4, nvtype='double',
>> nvsize=8, Off_t='off_t',

>
> intsize=4, ivsize=4 and ptrsize=4, so this is an entirely 32bit perl.
> (It's possible, at least on some architectures, to build perl to use
> 64bit integers even if it's using 32bit pointers.)
>
>> > Which version of Oracle are you using?

>>
>> 11g
>>
>> > The impression I get from README.{clients,aix}.txt is that if your perl
>> > is 64bit, or if you have Oracle 10g (which apparently comes with 32bit
>> > client libraries), you don't need anything else;

>>
>> Is there a way to check for the client libs?
>>
>> The build made it to near the end; it failed w/error:
>>
>> --snip
>> rm -f blib/arch/auto/DBD/Oracle/Oracle.so
>>
>> LD_RUN_PATH="/products/app/oracle/product/11.2.0/ee_1/lib:/products/app/oracle/product/11.2.0/ee_1/rdbms/lib" ld -bhalt:4 -bexpall -G -bnoentry
>> -lpthreads -lc Oracle.o dbdimp.o oci8.o /usr/lib/crt0_r.o -o
>> blib/arch/auto/DBD/Oracle/Oracle.so
>> -L/products/app/oracle/product/11.2.0/ee_1/lib/ -lclntsh -lld -lm -ldl
>> -lc -lm -lpthreads -lodm -lbsd_r -lld -lperfstat -lm -lpthreads
>> ld: 0711-736 ERROR: Input file
>> /products/app/oracle/product/11.2.0/ee_1/lib//libclntsh.so:
>> XCOFF64 object files are not allowed in 32-bit mode.
>> make: The error code from the last command is 8.

>
> Well, that seems fairly unambiguous: the client libs appear to be there,
> but they are 64bit so you can't link them with your perl.


Thanks for clearing that up.

> The first section in README.aix suggests you may have 32bit
> libraries in /products/app/oracle/product/11.2.0/ee_1/lib32 and
> .../rdbms/lib32; you may be able to edit the Makefile to link
> against them instead,


There is no lib32 dir or sym link:

# 15:39:12 Sun 120520 0j 0 48890062
# /products/app/oracle/product/11.2.0
# ourdbserver02 txr6 $ find . 2>/dev/null |grep 'lib$' |wc -l
114
# 15:39:28 Sun 120520 0j 0 48890062
# /products/app/oracle/product/11.2.0
# ourdbserver02 txr6 $ find . 2>/dev/null |grep lib32
# 15:40:06 Sun 120520 0j 0 48890062 /products/app/oracle/product/11.2.0
# ourdbserver02 txr6 $

> but tbh it's probably easier just to install the Instant Client. (Unless that's
> something you have to pay for separately?)


I'm not sure. Last Friday we were thinking we would install the "normal"
32 bit client, that we install on other AIX hosts. Will ask at work about the
Instant Client.

--
thanks again,


Mladen Gogala 05-21-2012 11:14 PM

Re: DBD::Oracle build on aix 6.1 ( host is a 64 bit db server )
 
On Sat, 19 May 2012 13:35:07 -0500, Am Nym wrote:

> So should I install the 'Oracle Instant Client' before attempting the
> build of DBD::Oracle?


Yes, you should install instant client. I did it on linux:

mgogala@medo ~]$ perl -e 'use DBD::Oracle;print "$DBD::Oracle::VERSION
\n";'
1.44
[mgogala@medo ~]$ rpm -qa|grep oracle
oracle-instantclient11.2-devel-11.2.0.3.0-1.x86_64
oracle-instantclient11.2-odbc-11.2.0.3.0-1.x86_64
oracle-instantclient11.2-sqlplus-11.2.0.3.0-1.x86_64
oracle-instantclient11.2-basic-11.2.0.3.0-1.x86_64
oracle-instantclient11.2-jdbc-11.2.0.3.0-1.x86_64
oracle-instantclient11.2-precomp-11.2.0.3.0-1.x86_64
[mgogala@medo ~]$

Before you start building, you should set ORACLE_HOME to whatever
directory your instant client unpacks them and LD_LIBRARY_PATH to where
your Oracle libraries will be. Don't forget to set TWO_TASK and point it
to a database which has scott/tiger schema, as that is what DBD uses in
the "make test" phase. You also need $TNS_ADMIN directory, with sqlnet.ora
and tnsnames.ora



--
http://mgogala.byethost5.com

Heinrich Mislik 05-22-2012 08:58 AM

Re: DBD::Oracle build on aix 6.1 ( host is a 64 bit db server )
 
In article <pan.2012.05.21.23.14.02@gmail.com>, gogala.mladen@gmail.com says...
>
>
>On Sat, 19 May 2012 13:35:07 -0500, Am Nym wrote:
>
>> So should I install the 'Oracle Instant Client' before attempting the
>> build of DBD::Oracle?

>
>Yes, you should install instant client. I did it on linux:


Don't do that. Point ORACLE_HOME to the installed Oracle. Having the
instantclient installed on an Oracle DB-server may leave you with
incompatible versions of client libraries on that server. This can
lead to strange errors (core dumped within Oracle library) during
connect using ORACLE_SID.

Cheers

Heinrich

--
Heinrich Mislik
Zentraler Informatikdienst der Universitaet Wien
A-1010 Wien, Universitaetsstrasse 7
Tel.: (+43 1) 4277-14056, Fax: (+43 1) 4277-9140


Peter J. Holzer 05-22-2012 08:21 PM

Re: DBD::Oracle build on aix 6.1 ( host is a 64 bit db server )
 
On 2012-05-20 22:09, Ben Morrow <ben@morrow.me.uk> wrote:
> You may need to make sure ORACLE_HOME and/or other Oracle environment
> variables are set correctly when you run Perl programs: I don't know
> if they are used at runtime as well as at compile time.


Yes, they are.

hp


--
_ | Peter J. Holzer | Deprecating human carelessness and
|_|_) | Sysadmin WSR | ignorance has no successful track record.
| | | hjp@hjp.at |
__/ | http://www.hjp.at/ | -- Bill Code on asrg@irtf.org

Peter J. Holzer 05-22-2012 08:37 PM

Re: DBD::Oracle build on aix 6.1 ( host is a 64 bit db server )
 
On 2012-05-22 08:58, Heinrich Mislik <Heinrich.Mislik@univie.ac.at> wrote:
> In article <pan.2012.05.21.23.14.02@gmail.com>, gogala.mladen@gmail.com says...
>>On Sat, 19 May 2012 13:35:07 -0500, Am Nym wrote:
>>> So should I install the 'Oracle Instant Client' before attempting the
>>> build of DBD::Oracle?

>>
>>Yes, you should install instant client. I did it on linux:

>
> Don't do that. Point ORACLE_HOME to the installed Oracle. Having the
> instantclient installed on an Oracle DB-server may leave you with
> incompatible versions of client libraries on that server. This can
> lead to strange errors (core dumped within Oracle library) during
> connect using ORACLE_SID.


My advice is just the opposite: Even if there is already a server
installation on the machine, install a separate client[1] and let your
users use only this client. That neatly separates the client and server
side and you can upgrade them independently.

Oracle seems to agree with me: Since Oracle 10 (IIRC) the client part of
the server installation (shared libraries, sqlplus, ...) is only
accessible by the "dba" group by default. So you can't just point
ORACLE_HOME there because a normal user doesn't have the necessary
permissions to invoke sqlplus or load libclntsh.so. (There is a script
to change the permissions, but IIRC it isn't included in the normal
distribution, you have download it from metalink)

hp

[1] These days I use instant client, mostly because I can just install
them with yum or apt-get (I really hate the Oracle Java installer
thingy). But you can do a client installation from the full
distribution, too.

--
_ | Peter J. Holzer | Deprecating human carelessness and
|_|_) | Sysadmin WSR | ignorance has no successful track record.
| | | hjp@hjp.at |
__/ | http://www.hjp.at/ | -- Bill Code on asrg@irtf.org

Mladen Gogala 05-23-2012 01:54 AM

Re: DBD::Oracle build on aix 6.1 ( host is a 64 bit db server )
 
On Tue, 22 May 2012 08:58:36 +0000, Heinrich Mislik wrote:

> Don't do that. Point ORACLE_HOME to the installed Oracle. Having the
> instantclient installed on an Oracle DB-server may leave you with
> incompatible versions of client libraries on that server. This can lead
> to strange errors (core dumped within Oracle library) during connect
> using ORACLE_SID.


1) Never, ever connect to Oracle using ORACLE_SID when using instant
client. It is not built for that. It is built for Oracle*Net.
2) I have almost quarter of a century of experience with Oracle and am
still working as an Oracle DBA. I have never had a problem with the
instant client.



--
http://mgogala.byethost5.com


All times are GMT. The time now is 09:24 AM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.