Re: SQLPLUS script

From: William L. Van Hout, Jr. <bvanhout_at_mindspring.com>
Date: Tue, 9 Aug 1994 21:37:45 -0400
Message-ID: <bvanhout.5.00125816_at_mindspring.com>


>Is there a way to setup an automatic sqlplus script. What we want to do is
>to just run a script that logs in does an alter then gets back out and
>runs another caommand and then logs back in to do another alter. We tried
>to do simple redirection of a file with our user-name and password
>followed by the commands, but this did not work. (sqlplus < commandfile)
>We can of course run this by hand but it needs to run once a week in the
>early A.M. and we would like to automate it using cron.
>Any help would be appreciated. Please respond to defarre_at_envc.sandia.gov

First of all, you cannot do a DDL statement like ALTER TABLE in a PL/SQL block. Supposedly that's in v7, but I don't know since we are running v6. Also, this might be what you need:

sqlplus username/userpasswd _at_database @filename

Where filename contains the PL/SQL you want executed Received on Wed Aug 10 1994 - 03:37:45 CEST

Original text of this message