Solved

change oracle home in dbd and dbi for perl

Posted on 2010-11-15
15
721 Views
Last Modified: 2013-12-18
I need to change the oracle home from 9 to 10 in the DBD and DBI scripts that our reports use when they run perl.  I don't know exactly what steps to take - can someone give me specific steps to change and recompile the DBD and DBI so that they use the new oracle home?  Our programmer used to take care of all of this so I don't really know anything about it.  I have looked through the readmes but don't see where you change the oracle home and how you recompile these things
0
Comment
Question by:bkreynolds48
  • 6
  • 5
  • 4
15 Comments
 
LVL 28

Expert Comment

by:FishMonger
ID: 34136559
What version of DBD::Oracle and DBI are you using?

I've never worked with Oracle, but my read of the DBD::Oracle doc indicates that it should work with Oracle 9 thru 11.

What error messages are you receiving?

Please post your code, but obfuscate anything confidential, such as the db user and password.
0
 
LVL 8

Expert Comment

by:Rindbaek
ID: 34136560
you normally set those values as environmental values. on unix they are often set in the .profile for the user that execute the scripts. So what operative system do you use and if unix/linux what shell does you executing user use?
0
 
LVL 1

Author Comment

by:bkreynolds48
ID: 34136574
ld: fatal: file /export/home/oracle/product/10_2/lib//libclntsh.so: wrong ELF class: ELFCLASS64
ld: fatal: File processing errors. No output written to blib/arch/auto/DBD/Oracle/Oracle.so
collect2: ld returned 1 exit status
*** Error code 1
make: Fatal error: Command failed for target `blib/arch/auto/DBD/Oracle/Oracle.so'


I was able to do
 /usr/local/bin/perl Makefile.PL              
    make
    make test

for DBI
now for DBD I get the above error
0
 
LVL 28

Expert Comment

by:FishMonger
ID: 34136587
If you haven't already done so, you should read the module's documentation to see it it answers your question.

DBD::Oracle
0
 
LVL 8

Expert Comment

by:Rindbaek
ID: 34136606
Contrary to fishmonger im the dba/sysadmin guy, with almost no knowledge about perl

You could also have a look at this: http://search.cpan.org/~timb/DBD-Oracle-1.26/Oracle.pm#DESCRIPTION

Theres a couple of sections regarding oracle connections.

0
 
LVL 1

Author Comment

by:bkreynolds48
ID: 34136607
That doc talks about connecting not installing
0
 
LVL 8

Expert Comment

by:Rindbaek
ID: 34136657
as tsated im not a perl programmer but i did find this line:
 BEGIN {
     $ENV{ORACLE_HOME} = '/home/oracle/product/10.x.x';
...
}

any how i could see that you used unix/linux
this will give you the shell used:  
echo $SHELL

this will show if the ORACLE_HOME is set (and to what)
echo $ORACLE_HOME

it should be run as the user executing the reports


0
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
LVL 1

Author Comment

by:bkreynolds48
ID: 34136679
oracle home is /export/home/oracle/product/10_2
I use both korn and bash shells - currently logged in with korn shell
0
 
LVL 28

Expert Comment

by:FishMonger
ID: 34136732
The first error message show an extra / in the path.  Could that be what's causing it to fail?
0
 
LVL 8

Expert Comment

by:Rindbaek
ID: 34136753
does your $PATH contain the /export/home/oracle/product/10_2/bin
?
0
 
LVL 1

Author Comment

by:bkreynolds48
ID: 34136769
echo $PATH
/usr/bin::/usr/bin:/usr/ccs/bin:/usr/local:/usr/local/bin:/usr/sbin:/usr/ucb:/export/home/oracle/product/10_2/bin:/usr/local/j2sdk1.4.2_03/bin
0
 
LVL 28

Expert Comment

by:FishMonger
ID: 34136790
I'm just starting to review some of these google hits, which you may want to look over.

google search: Oracle wrong ELF class: ELFCLASS64
0
 
LVL 8

Expert Comment

by:Rindbaek
ID: 34136817
indeed i was also starting to look at that search as well ;-)
0
 
LVL 8

Accepted Solution

by:
Rindbaek earned 500 total points
ID: 34136846

if on solaris this could be prove to be very good:
http://coding.derkeiler.com/Archive/Perl/perl.dbi.users/2006-12/msg00029.html
0
 
LVL 1

Author Closing Comment

by:bkreynolds48
ID: 34137135
That worked -  thanks
0

Featured Post

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Oracle Database creation fails 5 38
Pl/SQL Query 31 62
null value 15 70
sql for Oracle views 8 38
Working with Network Access Control Lists in Oracle 11g (part 1) Part 2: http://www.e-e.com/A_9074.html So, you upgraded to a shiny new 11g database and all of a sudden every program that used UTL_MAIL, UTL_SMTP, UTL_TCP, UTL_HTTP or any oth…
Working with Network Access Control Lists in Oracle 11g (part 2) Part 1: http://www.e-e.com/A_8429.html Previously, I introduced the basics of network ACL's including how to create, delete and modify entries to allow and deny access.  For many…
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
This video shows syntax for various backup options while discussing how the different basic backup types work.  It explains how to take full backups, incremental level 0 backups, incremental level 1 backups in both differential and cumulative mode a…

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now