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

A

Am Nym

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?
 
X

xtdkmqc

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
 
A

Am Nym

Ben Morrow said:
Quoth (e-mail address removed):

(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.
That's the system cc.

Right, the AIX compiler.
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.)


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

Mladen Gogala

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
 
H

Heinrich Mislik

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
 
P

Peter J. Holzer

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
 
P

Peter J. Holzer

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

Mladen Gogala

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top