Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: What are DBD::Oracle's dependencies (on Linux)?

by Rhys (Pilgrim)
on Oct 01, 2004 at 19:15 UTC ( #395713=note: print w/ replies, xml ) Need Help??


in reply to What are DBD::Oracle's dependencies (on Linux)?

I just got through this myself not too long ago. It was such a giant PITA that I created an RPM for it once everything finally worked.

Basically, the only thing you need from the Oracle CDs are the C libraries and headers. You need these in order to build DBD::Oracle. I also recommend adding a script to /etc/profile.d that will set your ORACLE_HOME and ORACLE_BASE environment variables.

Once you have the Oracle client pieces installed properly (don't forget to edit tnsnames.ora!), you should be able to use CPAN to install DBD::Oracle. The 'make test' part will fail if you have not set the ORACLE_SID variable, but if you look through the build output and that's the only thing that fails, just do force install DBD::Oracle and it will work. (At least, it works for me.)

Really, the hard part is getting all of the Oracle client to install properly. When I installed 9.2, the biggest problem was working around the _libcwait Java problem. Oracle has a 'patch' for it that builds a library with that function and preloads it. It's kind of silly, and only necessary for the installation. It's also a good idea to create the 'oracle' user ID and the 'oinstall' group on your system before running the installer. Also, DO NOT RUN THE INSTALLER FROM THE CD-ROM. Stay in your home directory and use the absolute path to run it. E.g.:

cd /mnt/cdrom ; ./runInstaller BAD! BAD! BAD! cd ~root ; /mnt/cdrom/runInstaller WORKS PROPERLY.

The reason is that if the current directory is in the CD-ROM when you run the installer, it won't be able to properly unmount the CD when it's time to change discs, things get weird, and you have to start over.

But to help you with anything more specific, I'm afraid we need to know what version of the Oracle client you're trying to install, since they are all different.

NOTE: The "Instant Client" won't work, because it comes with none of the libraries and headers you need to build DBD::Oracle. It's a functioning client, but that won't help you write Perl. ;-)

--J


Comment on Re: What are DBD::Oracle's dependencies (on Linux)?
Select or Download Code
Re^2: What are DBD::Oracle's dependencies (on Linux)?
by iburrell (Chaplain) on Oct 01, 2004 at 22:02 UTC
    It is possible to run DBD::Oracle with the Oracle Instant Client after DBD::Oracle has been built with the development headers. Oracle has said they are going to release an SDK for Instant Client that can build DBD::Oracle. Last I heard about that was few months ago; I guess they move slowly.

    Also, I had success in not using the Oracle installer and pulling the needed files out of Oracle database distribution archives.

Re^2: What are DBD::Oracle's dependencies (on Linux)?
by nguye103 (Acolyte) on Oct 05, 2004 at 17:36 UTC
    thank you so much for your help. If possible could you answer some questions that I have? I believe we have oracle 8 or 9. I will have to ask the system administrator about that if you really need to know. 1. I was wondering if there was a way to get the C librabries and headers from the Oracle webstite, or do I need to get them off the cd. 2. How would I make a script? Is making a script like writing a program? 3. Where do I locate tnsnames.ora and in what way do i change it?
      1. I was wondering if there was a way to get the C librabries and headers from the Oracle webstite, or do I need to get them off the cd.

        You will want to get them off the CD.

      2. How would I make a script? Is making a script like writing a program?

        Perl is a programming language. Thus, making a Perl script is programming in Perl. I would strongly urge you to read Learning Perl, which you can find at any bookstore.

      3. Where do I locate tnsnames.ora and in what way do i change it?

        tnsnames.ora is an Oracle configuration file that maps database aliases to where they're really located. Only the DBA should ever modify this file. If you want to modify it, you should really talk to your DBA to do so. If you want to see it, it's located in $ORACLE_HOME/network/admin. (Yes, there's that $ORACLE_HOME thing again.)

      nguye103 - have you talked to your DBA yet? Do you guys even have a DBA? Working with Oracle is non-trivial. If you're just looking for a database that anyone can administer, I would go with one of the opensource options, like MySQL or PostgreSQL. Oracle is the top-of-the-line mothership of all databases, and requires a lot of knowledge to run it correctly. This is reflected in the amount of crap you have to do just to install DBD::Oracle.

      To compare, installing MySQL and DBD::mysql takes about 30 minutes, tops. And, it's even optimized for and meant to be installed on most flavors of Linux. Maybe what you need can be solved by MySQL ...

      Being right, does not endow the right to be rude; politeness costs nothing.
      Being unknowing, is not the same as being stupid.
      Expressing a contrary opinion, whether to the individual or the group, is more often a sign of deeper thought than of cantankerous belligerence.
      Do not mistake your goals as the only goals; your opinion as the only opinion; your confidence as correctness. Saying you know better is not the same as explaining you know better.

        We do have a DBA... We are currently using Oracle. With windows, we were able to have oracle on the computer and use the oracle database. We now want to use linux to retrieve the oracle database w/o having oracle installed. Are you saying that it would be easier to completely use a new database system then to get DBD::Oracle to work with linux?
        Can any body help me to find
        What are DBD::Oracle's dependencies (on Windows)?
        I have successfully installed DBD::Oracle on my windows XP based PC
        When I tried to connect to remote Oracle Sever using following code
        # --- Connecting to host my $dbh = DBI->connect('dbi:Oracle:host=myserverIP;sid=ORCL;port=1525' +, 'pfisher', 'password', { RaiseError => 1, AutoCommit => 0 });

        It gives me following error
        DBI connect('host=.....; sid=ORCL;port=1521','pfisher',...) failed: ORA-12541: TNS:no listener (DBD ERROR: OCISer verAttach) at oracleTest.pl line 12
        Can any body help me...........................?????

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://395713]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (7)
As of 2014-08-20 22:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (125 votes), past polls