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: Running an SQL script from C Shell (Unix)

Re: Running an SQL script from C Shell (Unix)

From: Mark D Powell <markp7832_at_my-deja.com>
Date: Mon, 02 Oct 2000 16:19:08 GMT
Message-ID: <8rachi$pt8$1@nnrp1.deja.com>

In article <8ra9ud$nju$1_at_nnrp1.deja.com>,   jpebejer_at_maltanet.net wrote:
>
>
> I have a script (myscript.sql) which I want to run AUTOMATICALLY each
> time from the shell through some sort of scripting (on a UNIX box).
>
> Aren't there some command line parameters to do this ?
> Say SQL*Plus myscript.sql ?
>
> Many Thanks
> JP
>

Look up cron in the manual pages or the dbms_job package in the database if what you want to do can be done in pl/sql.

For a cron job you would need to set the Oracle environment and then you could use this line to execute your script sqlplus userid/password @smyscript.sql

Because this is a cron job you would also need to cd to the correct directory or full path all filenames in the shell script and your spool file to be sure they are found/written to the correct location.

--
Mark D. Powell  -- The only advice that counts is the advice that
 you follow so follow your own advice --


Sent via Deja.com http://www.deja.com/
Before you buy.
Received on Mon Oct 02 2000 - 11:19:08 CDT

Original text of this message

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