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

Home -> Community -> Usenet -> c.d.o.server -> Re: How can I run many scripts under a path with SQL*PLUS?

Re: How can I run many scripts under a path with SQL*PLUS?

From: Radoulov, Dimitre <cichomitiko_at_gmail.com>
Date: Tue, 21 Nov 2006 17:03:13 +0100
Message-ID: <45632340$0$49208$14726298@news.sunsite.dk>

<caifan01_at_gmail.com> wrote in message
news:1164124559.304639.77290_at_f16g2000cwb.googlegroups.com...
> Using SQL*PLUS I'm trying to run a set of scripts which are under a
> certain path.
>
> The problem is that I may not know how many are them and I won't know
> the names of the .sql files.
>
> Do you know if there is a way that '@' command accepts a directory and
> runs all the .sql files inside the directory?

You can do it in shell:

for file in *.sql; do

    printf "%s\n" "@${file}"
done | sqlplus user/pass

Regards
Dimitre Received on Tue Nov 21 2006 - 10:03:13 CST

Original text of this message

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