I'm trying to run sqlplus and submit my SQL-Commands through a batch-file, e.g.: sqlplus peter/hans @/mydir/myfile.
It works up to the point, where I try to exit sqlplus, by having a line with EXIT in my batch-file.
How will it work?
you have write exit; in file .sql and write exit; in file .sh or file batch
that's what I've tried in different ways, but it doesn't work;-)
I somehow think, there's something else.
I am sorry to disappoint you, but there's really nothing else.
Write a .sql file with the following:
select * from v$session;
Now write a .bat with the following:
sqlplus system/manager@instance @mysql.sql
I promise that this will work !
If it doesn't try following step by step in command-line...
Hope this helps...
Click Here to Expand Forum to Full Width