Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: PL/SQL: Exiting to Operating System?
Michael A. Casillas wrote:
> Greetings:
>
> I'm kinda stumped with a question regarding PL/SQL scripts and how to
> exit to the OS when they are run using SQL*Plus. I'm writing some
> PL/SQL scripts that need to be run directly from the OS from a shell
> script and once they've run, control needs to return to the OS to
> continue processing the shell script. I am running the scripts using
> the
>
> following:
>
> sqlplus myname/mypswd_at_mydb @myscript.sql
>
You could also just use simple I/O redirection, sqlplus will end when it hits end of file. Using the above example:
sqlplus myname/mypswd_at_mydb < myscript.sql
or alternatively (assuming a Unix environment) -
sqlplus myname/mypswd_at_mydb <<END
/* insert several SQL commands here */
END
John Kroll
Received on Tue Aug 19 1997 - 00:00:00 CDT
![]() |
![]() |