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: Create SQL Batch file

Re: Create SQL Batch file

From: TurkBear <john.greco_at_dot.state.mn.us>
Date: Fri, 10 Jan 2003 14:19:48 -0600
Message-ID: <heau1vses6jgscb0fc103lqlu5mdkd5lj9@4ax.com>

Of course Linux and DOS use very different methods..

In Linux write a shell script ( say runsql.sh ) containing sqlplus scott/tiger @mysqltorun

In DOS it would be
( if Win95 0r 98)
DoSql.bat
same contents as shell

For NT or 2K or XP name it
DoSql.cmd
samestuffinside

( assumes:
for LINUX: Environment variable and paths are set and sql file is in same directory as shell for WIN: Registry has correct entries for Oracle_home , Path has oracle_home/bin and sql file is in same directory as calling file.)

You can take it from here...

"Mohamed Badr" <MohamedBadr75_at_hotmail.com> wrote:

>Hello,
> I want to make a linux or dos batch file to run a SQL Command
>i.e. SQLPLUS.exe scott/tiger SQL_COMMAND
> so how can I write this batch file like that.
>thanks
>
Received on Fri Jan 10 2003 - 14:19:48 CST

Original text of this message

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