Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Perl > Perl Misc > DBD::Oracle build on aix 6.1 ( host is a 64 bit db server )

Reply
Thread Tools

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

 
 
Am Nym
Guest
Posts: n/a
 
      05-19-2012
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!

 
Reply With Quote
 
 
 
 
xtdkmqc@gmail.com
Guest
Posts: n/a
 
      05-19-2012
On Saturday, May 19, 2012 2:07:10 PM UTC-5, Ben Morrow wrote:
> Quoth Am Nym <(E-Mail Removed)>:
> > 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 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
 
Reply With Quote
 
 
 
 
Am Nym
Guest
Posts: n/a
 
      05-20-2012
Ben Morrow <(E-Mail Removed)> writes:

> Quoth http://www.velocityreviews.com/forums/(E-Mail Removed):
>> On Saturday, May 19, 2012 2:07:10 PM UTC-5, Ben Morrow wrote:
>> > Quoth Am Nym <(E-Mail Removed)>:
>> > > 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 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,

 
Reply With Quote
 
Mladen Gogala
Guest
Posts: n/a
 
      05-21-2012
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
 
Reply With Quote
 
Heinrich Mislik
Guest
Posts: n/a
 
      05-22-2012
In article <(E-Mail Removed)>, (E-Mail Removed) 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

 
Reply With Quote
 
Peter J. Holzer
Guest
Posts: n/a
 
      05-22-2012
On 2012-05-20 22:09, Ben Morrow <(E-Mail Removed)> 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.
| | | (E-Mail Removed) |
__/ | http://www.hjp.at/ | -- Bill Code on (E-Mail Removed)
 
Reply With Quote
 
Peter J. Holzer
Guest
Posts: n/a
 
      05-22-2012
On 2012-05-22 08:58, Heinrich Mislik <(E-Mail Removed)> wrote:
> In article <(E-Mail Removed)>, (E-Mail Removed) 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.
| | | (E-Mail Removed) |
__/ | http://www.hjp.at/ | -- Bill Code on (E-Mail Removed)
 
Reply With Quote
 
Mladen Gogala
Guest
Posts: n/a
 
      05-23-2012
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
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Is a 32-bit build faster than a 64-bit build Raymond Hettinger Python 3 11-13-2010 12:28 PM
putenv for AIX and ifdef for AIX ClownPleco C Programming 5 08-24-2007 02:15 PM
SWsoft Acronis Disk Director Suite 9.0 Build 508, Acronis OS Selector 8.0 Build 917, Acronis Partition Expert 2003 Build 292, Acronis Power Utilities 2004 Build 502, F-SECURE.ANTI vIRUS.PROXY v1.10.17.WINALL, F-SECURE.ANTI vIRUS v5.50.10260 for CITRI vvcd Computer Support 0 09-25-2004 01:38 AM
64 bit - Windows Liberty 64bit, Windows Limited Edition 64 Bit, Microsoft SQL Server 2000 Developer Edition 64 Bit, IBM DB2 64 bit - new ! vvcd Computer Support 0 09-17-2004 08:15 PM
64 bit - Windows Liberty 64bit, Windows Limited Edition 64 Bit,Microsoft SQL Server 2000 Developer Edition 64 Bit, IBM DB2 64 bit - new! Ionizer Computer Support 1 01-01-2004 07:27 PM



Advertisments