Batch File to run SQL Program [message #20213] |
Tue, 07 May 2002 04:03 |
sql gurus
Messages: 22 Registered: May 2002
|
Junior Member |
|
|
Hi,
Can any one tell me how to write a batch file which runs an sql program without asking for username and password.
I tried like this.
SQLPLUS.EXE USER/PWD@DATABASE <file.sql>
It is not working.
|
|
|
|
|
Re: Batch File to run SQL Program [message #20223 is a reply to message #20213] |
Tue, 07 May 2002 22:18 |
S.Muthu Kumar
Messages: 6 Registered: July 2001
|
Junior Member |
|
|
Hi,
create a sql file with the following contents
select * from emp;
save it as c:test.sql
Create a batch file with the following contents
sqlplus scott/tiger@db c:test
execute the batch file.
This shld solve ur reqmt.
HTH
S.Muthu Kumar
|
|
|
|
|