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: How to use the start command in pl/sql or loops in a script

Re: How to use the start command in pl/sql or loops in a script

From: Henrik Otto <ottoh_at_space.se>
Date: Mon, 08 Nov 1999 15:57:06 +0100
Message-ID: <3826E4C2.649B@space.se>


Thanks both Michael and Yosi, I just got a similar idea myself when I gave it some thought. This will work fine.

/Henrik

Yosi Greenfield wrote:
>
> One possibility I've used:
>
> 1. Create a 2-column table, line (number (4)) and text (varchar2 (100)).
> Create a temporary sequence.
>
> 2. Using SQL or PL/SQL, insert rows into the table containing the
> sequence's nextval and a line of SQL text you want to run - the connect
> statements, DDL, DML, (or, in your case, @command statements after each
> connect).
>
> 3. Then spool to a file, select * from <the table> order by line;, spool
> off
>
> 4. Run the spooled file.
>
> If this message was too short and cryptic, I can elaborate, but it's
> really simple.
>
> HTH,
>
> Yosi
>
> Henrik Otto wrote:
>
> > Hi, Its me again with another question,
> > I want to use the sqlplus command 'start <script>' multiple times i.e.
> > loop through a bunch of schemas and run the script there. So I either
> > want to know how I can run the scripts from pl/sql or how I can make a
> > loop or something similar in an sqlplus script. Any ideas?
> >
> > /Henrik
Received on Mon Nov 08 1999 - 08:57:06 CST

Original text of this message

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