Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Access to Oracle from PERL

Re: Access to Oracle from PERL

From: David Fetter <dfetter_at_shell4.ba.best.com>
Date: 12 May 1998 17:36:27 GMT
Message-ID: <6ja1ar$jot$1@nntp1.ba.best.com>


DannyM <maldonadod_at_ct-arng.ngb.army.mil> wrote:
> Hi there, I have to access and oracle from withing perl. There is
> a package called DBD-Oracle that would allow me to do so but it
> does not work on my machine because of a shared library.

Could you give the exact error message?

Doing it right is as easy as 1,2,3 :)

  1. Make sure that Perl 5.004_04 is installed.
  2. Install the DBI module, which you can find on your fiendly ;) neighborhood CPAN mirror.
  3. Install DBD::Oracle, and you shouild be good to go.

> Instead of going through 10 patches I would like another solution.

Believe me, the above is a *lot* less trouble than making a bunch of code that you won't recognize later.

> Is there anyway
> I could select information from tables with perl and place them in my
> perl script variables? I know I can do the following:
> open(sqlfile, "|sqlplus $login/$passwd");
> print sqlfile "select * from tab\nexit\n";
> close sqlfile;
> This gives me the required output but I do not have a good way of retrieving
> the records from the file and dividing them into fields.

Yes, you could reinvent the whole DBI/DBD setup, one feature at a time, but the above is a lot less hassle both for you and for anyone who needs to follow you.

--

            David Fetter         888 O'Farrell Street Apt E1205
   shackle_at_ren.glaci.com          San Francisco, CA 94109-7089 USA
  http://www.best.com/~dfetter     +1 415 567 2690 (voice)
print unpack ("u*",q+92G5S="!!;F]T:&5R(%!E<FP_at_2&%C:V5R"@``+)

I worry that the person who thought up Muzak may be thinking up something else.

                                       Lily Tomlin
Received on Tue May 12 1998 - 12:36:27 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US