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: HELP! Running SQLPlus in batch

Re: HELP! Running SQLPlus in batch

From: Régis Padilha Vaz <oracy_at_zaz.com.br>
Date: Tue, 06 Apr 1999 20:50:00 -0300
Message-ID: <370A9DA7.5D43BE53@zaz.com.br>


Hi Mark,

To execute SQL*Plus in batch mode in command line, simply enter this:

sqlplus -s user/passwd @script_file.sql

To execute SQL*Plus in batch mode with a predefined schedule, use CRON utility. This is easy and works well, but don't forget the complete path to script file. Edit crontab and put a command like this:

su - oracle -c sqlplus -s user/passwd @/usr/oracle/script_file.sql

Bye!

Suresh Bhat wrote:

> Hi Mark,
>
> If you have OPS$ accounts and the database and script are on the same
> server you can use this in your shell:
>
> sqlplus -s / @$PATH_SRC/xxx.sql
>
> In a CRON job you will have to give the entire PATH rather than $PATH_SRC.
>
> For SQL*Plus code fragments, you can also do this in a Unix HERE document
> if you wish:
>
> sqlplus / << HERE
> SET PAUSE OFF FEEDBACK OFF
> UPDATE TABLE1 SET SEQCODE = 1 WHERE SEQCODE = 0
> /
> COMMIT;
> exit
> HERE
>
> Suresh
> www.oracleguru.net
> oracleguru_at_mailcity.com
>
> Mark Kimball <mkimball_at_rhs.org> wrote in article
> <P1wJ2.2$Ja4.130113_at_IConNet>...
> > I'm trying to run SQLPlus code in batch mode in HP-UX. Any suggestions
> on
> > how to make this happen? Running Oracle 7.3.2 on HP9000 with Unix 10.20.
> >
> >
> >
Received on Tue Apr 06 1999 - 18:50:00 CDT

Original text of this message

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