| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Simple Q re calling script from within another script
Holger Peine wrote:
> Hello everyone,
>
> this question seems ridiculously simple, but I honestly searched the SQL
> and PL/SQL reference manuals to no avail:
>
> I have a script init.sql containing statements initializing my database
> (e.g. creating roles, users, tables etc.), and another script
> initspecial.sql containing some more initializations which I'd like to
> keep in a separate file (e.g. inispecial might be a file defining a
> package). Now I'd like init.sql somehow call (load/source/exec - whatever
> you'd like to call it) initspecial.sql (i.e. exactly what is done in sqlplus
> by the start command). How do I do this in PL/SQL??
>
> Thanks for your help,
> Holger Peine
>
Not.
PL/SQL calls PL/SQL, which resides in the database, or is
an anonumous block, in which case it is scripted.
SQL*Plus will let you run scripts off disk.
Run your init.sql by:
SQL > @init
Have init.sql call initspecial.sql by:
@@initspecial
![]() |
![]() |