Professional Web Applications Themes

DBD::Oracle and various oracle clients - PERL Modules

I would like to be able to use various DBD::Oracle drivers one using the client library for oracle 8.1.7.x and another using the client library for oracle 9.2.x one (ugly) way would be to build twice DBD::Oracle and then sistematically change one of the tree to have (say) DBD::Oracle8... another way would be to subclass in a smart way... is this doable? anybody maintaining various DBI/Oracle combinations that could give insight thanks --stephan...

  1. #1

    Default DBD::Oracle and various oracle clients

    I would like to be able to use various DBD::Oracle drivers
    one using the client library for oracle 8.1.7.x
    and another using the client library for oracle 9.2.x

    one (ugly) way would be to build twice DBD::Oracle and then
    sistematically change one of the tree to have (say) DBD::Oracle8...

    another way would be to subclass in a smart way...
    is this doable? anybody maintaining various DBI/Oracle combinations that
    could give insight

    thanks
    --stephan
    Stephan Titard Guest

  2. #2

    Default Re: DBD::Oracle and various oracle clients

    Stephan Titard <sgt19tid.es> wrote:
    > I would like to be able to use various DBD::Oracle drivers
    > one using the client library for oracle 8.1.7.x
    > and another using the client library for oracle 9.2.x
    Why?
    Achim Grolms Guest

  3. #3

    Default Re: DBD::Oracle and various oracle clients

    Stephan Titard <sgt19tid.es> writes:
    > I would like to be able to use various DBD::Oracle drivers
    > one using the client library for oracle 8.1.7.x
    > and another using the client library for oracle 9.2.x
    Easy - just use the PREFIX or LIB options to "perl Makefile.PL" to install
    them in different locations. Then "use lib" in your script to add one or
    the other location to Perl's module search path.

    Have a look at "perldoc perlmodinstall" for details.

    sherm--

    --
    Web Hosting by West Virginians, for West Virginians: [url]http://wv-www.net[/url]
    Cocoa programming in Perl: [url]http://camelbones.sourceforge.net[/url]
    Sherm Pendley Guest

  4. #4

    Default Re: DBD::Oracle and various oracle clients

    Achim Grolms escribió:
    > Stephan Titard <sgt19tid.es> wrote:
    >> I would like to be able to use various DBD::Oracle drivers
    >> one using the client library for oracle 8.1.7.x
    >> and another using the client library for oracle 9.2.x
    >
    > Why?
    the same perl tree is used to access different versions of oracle.

    sherm's idea in this thread is to have DBD::Oracle and for example
    DBDOracle8::DBD::Oracle tweaking PREFIX (or DBD::Oracle8::DBD::Oracle)

    thanks
    --stephan
    Stephan Titard Guest

  5. #5

    Default Re: DBD::Oracle and various oracle clients

    Sherm Pendley escribió:
    > Stephan Titard <sgt19tid.es> writes:
    >
    >> I would like to be able to use various DBD::Oracle drivers
    >> one using the client library for oracle 8.1.7.x
    >> and another using the client library for oracle 9.2.x
    >
    > Easy - just use the PREFIX or LIB options to "perl Makefile.PL" to install
    > them in different locations. Then "use lib" in your script to add one or
    > the other location to Perl's module search path.
    >
    > Have a look at "perldoc perlmodinstall" for details.
    >
    > sherm--
    >
    Yes, but this implies having e.g DBDOracle8::DBD::Oracle or even
    DBD::Oracle8::DBD::Oracle, a bit ugly...
    it has implications with respect to the automatic discovery of drivers
    by DBI (dbi:Oracle:host -> dbi:Oracle8174:host etc...)

    I would have liked DBD::Oracle
    maybe I could make DBD::Oracle8 a proxy for DBDOracle8::DBD::Oracle
    I have to look into that (maybe use some of the tricks of the 'aliased'
    module)
    almost seems safer to transform the code.

    thanks
    --stephan
    Stephan Titard Guest

  6. #6

    Default Re: DBD::Oracle and various oracle clients

    > Yes, but this implies having e.g DBDOracle8::DBD::Oracle or even
    > DBD::Oracle8::DBD::Oracle, a bit ugly...
    > it has implications with respect to the automatic discovery of drivers
    > by DBI (dbi:Oracle:host -> dbi:Oracle8174:host etc...)
    >
    > I would have liked DBD::Oracle
    > maybe I could make DBD::Oracle8 a proxy for DBDOracle8::DBD::Oracle
    > I have to look into that (maybe use some of the tricks of the 'aliased'
    > module)
    > almost seems safer to transform the code.
    >
    > thanks
    > --stephan
    actually this is a generic question how to have A::B install as A1::B1
    (not <PREFIX>A::B)
    or make A::B completely equivalent to MY::A::B (this must work for
    procedural o OO interface)

    hth
    --stephan

    Stephan Titard Guest

  7. #7

    Default Re: DBD::Oracle and various oracle clients

    Stephan Titard <sgt19tid.es> wrote:
    > Achim Grolms escribió:
    >> Stephan Titard <sgt19tid.es> wrote:
    >>> I would like to be able to use various DBD::Oracle drivers
    >>> one using the client library for oracle 8.1.7.x
    >>> and another using the client library for oracle 9.2.x
    >>
    >> Why?
    > the same perl tree is used to access different versions of oracle.
    Sure. But why?

    One idea is to install DBD::Oracle to different PREFIX locations
    and use PERL5LIB, ORACLE_HOME and LD_LIBRARY_PATH
    to configure the correct locations of Perllibs and
    Oracle-code.
    Achim Grolms Guest

  8. #8

    Default Re: DBD::Oracle and various oracle clients

    Stephan Titard <sgt19tid.es> writes:
    > Sherm Pendley escribió:
    >> Stephan Titard <sgt19tid.es> writes:
    >>
    >>> I would like to be able to use various DBD::Oracle drivers
    >>> one using the client library for oracle 8.1.7.x
    >>> and another using the client library for oracle 9.2.x
    >>
    >> Easy - just use the PREFIX or LIB options to "perl Makefile.PL" to install
    >> them in different locations. Then "use lib" in your script to add one or
    >> the other location to Perl's module search path.
    >>
    >> Have a look at "perldoc perlmodinstall" for details.
    >>
    >> sherm--
    >>
    > Yes, but this implies having e.g DBDOracle8::DBD::Oracle or even
    > DBD::Oracle8::DBD::Oracle
    No, it doesn't.
    > it has implications with respect to the automatic discovery of drivers
    > by DBI (dbi:Oracle:host -> dbi:Oracle8174:host etc...)
    No, it doesn't.

    Please - read "perldoc perlmodinstall" to see what PREFIX and LIB *really*
    do before making further incorrect assumptions.

    sherm--

    --
    Web Hosting by West Virginians, for West Virginians: [url]http://wv-www.net[/url]
    Cocoa programming in Perl: [url]http://camelbones.sourceforge.net[/url]
    Sherm Pendley Guest

  9. #9

    Default Re: DBD::Oracle and various oracle clients

    > Please - read "perldoc perlmodinstall" to see what PREFIX and LIB *really*
    > do before making further incorrect assumptions.
    >
    > sherm--
    >
    Sherm, I just re-read the perlmodinstall to see if I missed something
    obvious (after all these years) , but you just lost me...
    PREFIX, LIB and use lib permit to have various directories acting as one
    single hierarchy where to find modules, i.e module A::B is
    <unique_root>/A/B.pm etc
    (they deal with the mechanics of installing, not the dynamics of using)

    where is the second DBD::Oracle rooted?
    how do I 'use' both at the same time?

    maybe my original question was poorly phrased...sorry
    of course I can encapsulate in various .pm

    use lib /where/is/oracle;
    use DBD::Oracle;

    but it is not what I was asking for.

    thanks
    --stephan

    Stephan Titard Guest

  10. #10

    Default Re: DBD::Oracle and various oracle clients

    Stephan Titard <sgt19tid.es> wrote:
    >
    >> Please - read "perldoc perlmodinstall" to see what PREFIX and LIB *really*
    >> do before making further incorrect assumptions.
    >>
    >> sherm--
    >>
    >
    > Sherm, I just re-read the perlmodinstall to see if I missed something
    > obvious (after all these years) , but you just lost me...
    > PREFIX, LIB and use lib permit to have various directories acting as one
    > single hierarchy where to find modules, i.e module A::B is
    > <unique_root>/A/B.pm etc
    > (they deal with the mechanics of installing, not the dynamics of using)
    >
    > where is the second DBD::Oracle rooted?
    > how do I 'use' both at the same time?
    What means "at the same time"?
    In the same process?
    Achim Grolms Guest

  11. #11

    Default Re: DBD::Oracle and various oracle clients

    Achim Grolms escribió:
    > Stephan Titard <sgt19tid.es> wrote:
    >> Achim Grolms escribió:
    >>> Stephan Titard <sgt19tid.es> wrote:
    >>>> I would like to be able to use various DBD::Oracle drivers
    >>>> one using the client library for oracle 8.1.7.x
    >>>> and another using the client library for oracle 9.2.x
    >>> Why?
    >> the same perl tree is used to access different versions of oracle.
    >
    > Sure. But why?
    >
    > One idea is to install DBD::Oracle to different PREFIX locations
    > and use PERL5LIB, ORACLE_HOME and LD_LIBRARY_PATH
    > to configure the correct locations of Perllibs and
    > Oracle-code.
    Well I try always to minimize the use of env. vars, especially
    SHLIB_PATH, LD_LIBRARY_PATH and the such.

    On HP-UX (11.0 32bit) I build a distribution with about 350 modules where
    all external shared objects are found (modulo one symlink) directly
    inside the perl tree
    so that it is ready for tar and independent. In the case of a (perl)
    built shared library
    with external dependency (like DBD/oracle.sl) I create a link to the
    external library inside my perl-tree that I use for the install of the
    perl module. finally an external OS-dependent command is used to turn
    off the use of SHLIB_PATH and the such.

    why? "principle of least surprise, probably and KISS too"

    I use a couple ugly tricks like to relocate a fresh build
    to another place: I build normally for /opt/perl58X (core + modules)
    and I "generate" for /var/tmp/p*/perl58X (the core part is actually
    installed normally using PREFIX). In all the *sl I reserved enough room
    in the shared object header using ///////external/shared/object
    which I subsistute directly in the binary.
    Does not work yet for solaris, but is mainly ok on cygwin.


    hth
    --stephan




    Stephan Titard Guest

  12. #12

    Default Re: DBD::Oracle and various oracle clients

    Achim Grolms escribió:
    > Stephan Titard <sgt19tid.es> wrote:
    >>> Please - read "perldoc perlmodinstall" to see what PREFIX and LIB *really*
    >>> do before making further incorrect assumptions.
    >>>
    >>> sherm--
    >>>
    >> Sherm, I just re-read the perlmodinstall to see if I missed something
    >> obvious (after all these years) , but you just lost me...
    >> PREFIX, LIB and use lib permit to have various directories acting as one
    >> single hierarchy where to find modules, i.e module A::B is
    >> <unique_root>/A/B.pm etc
    >> (they deal with the mechanics of installing, not the dynamics of using)
    >>
    >> where is the second DBD::Oracle rooted?
    >> how do I 'use' both at the same time?
    >
    > What means "at the same time"?
    > In the same process?
    Yes. sloppy wording again:
    I meant in the same perl file one use behind the other like in

    use DBD::Oracle;
    use DBD:Whatever;

    Stephan Titard Guest

  13. #13

    Default Re: DBD::Oracle and various oracle clients

    > On HP-UX (11.0 32bit) I build a distribution with about 350 modules where
    > all external shared objects are found (modulo one symlink) directly
    > inside the perl tree
    > so that it is ready for tar and independent. In the case of a (perl)
    > built shared library
    > with external dependency (like DBD/oracle.sl) I create a link to the
    > external library inside my perl-tree that I use for the install of the
    > perl module. finally an external OS-dependent command is used to turn
    > off the use of SHLIB_PATH and the such.
    >
    > why? "principle of least surprise, probably and KISS too"
    >
    actually, Nicholas Clark has been doing lately work on the relocation
    problem
    of a core distribution (see p5p about 2 months ago)
    it is not easy and the double dependency problem is not handled
    completely (as far as I can tell for HP-UX and external modules)
    Stephan Titard Guest

Similar Threads

  1. Replies: 2
    Last Post: April 11th, 03:47 PM
  2. #13053 [Com]: oci8 error, this kill oracle-prosseces in the oracle-instance.
    By gid at gifpaste dot net in forum PHP Development
    Replies: 0
    Last Post: November 20th, 06:51 PM
  3. Replies: 0
    Last Post: August 6th, 02:54 PM
  4. #23668 [Opn->Fbk]: oracle<defunct> problem apache2+php+oracle
    By sniper@php.net in forum PHP Development
    Replies: 0
    Last Post: July 11th, 04:56 AM
  5. Replies: 0
    Last Post: January 2nd, 10:35 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139