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

Home -> Community -> Mailing Lists -> Oracle-L -> Re: Perl DBI/SQL question - For those who use it...

Re: Perl DBI/SQL question - For those who use it...

From: Tim Bunce <Tim.Bunce_at_pobox.com>
Date: Fri, 03 Jan 2003 10:08:55 -0800
Message-ID: <F001.00526BC4.20030103100855@fatcity.com>


Try

        dbish dbi:Oracle:tnsname < commands.sql

The dbish is a "DBI shell" supplied with the DBI.

The version supplied with the DBI is functional but basic. Tom Lowery is working on an extended version with plugins adding more functionality. One of his goals is an SQL*Plus clone... http://search.cpan.org/author/TLOWERY/DBI-Shell-11.91/lib/DBI/Shell.pm

The dbi-users mailing list is probably the best place to get answers to DBI questions.

Tim.

On Fri, Jan 03, 2003 at 09:09:06AM -0800, Koivu, Lisa wrote:
> Hi everyone,
>
> This may be a stupid question. If so please humor me with a stupid answer.
> However:
>
> I FINALLY have the fun fun fun chance to change one of my data loads to use
> the DBI instead of the procedures I hacked together. In true ksh style I
> had written my loads to fire a sql script (calling a stored proc) that was
> stored separately. It seems to me the DBI wants the text of the sql script
> embedded piece by piece in the code. I have looked around for examples
> because even though the DBI seems straightforward, it doesn't take much to
> confuse me. I don't see examples of firing a sql script from the DBI (like
> this sqlplus /@dbname < @script.sql > logfile.log ... Gosh do I miss unix,
> everything was SO EASY)
>
> So my questions to you, my learned friends, are:
>
> 1. is it not perl-style to store the sql in a separate file? I understand I
> may be missing the opportunity for more specific error handling here but
> honestly at this point it does not matter. The thing fails, I restart the
> whole script.
>
> 2. Does anyone have an example of firing the DBI and calling a sql script
> like I could so easily do in ksh?
>
> Any and all comments are welcome. Thank you
>
> I wish everyone a rested and relaxing weekend.
>
> Lisa Koivu
> Oracle Database Monkey
> Fairfield Resorts, Inc.
> 5259 Coconut Creek Parkway
> Ft. Lauderdale, FL, USA 33063
>

-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.net
-- 
Author: Tim Bunce
  INET: Tim.Bunce_at_pobox.com

Fat City Network Services    -- 858-538-5051 http://www.fatcity.com
San Diego, California        -- Mailing list and web hosting services
---------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).
Received on Fri Jan 03 2003 - 12:08:55 CST

Original text of this message

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