How to run/execute SQL script outside of SQLPLUS in Windows DOS command prompt
It is simple to run sql script outside of sqlplus in *nix environment. You can simple add “@scriptname.sql” at the end of the sqlplus command. However, if you need to run a sql script outside of sqlplus in Windows, you need a little trick to do it “without” the need to manually enter “exit”
smallwei 2:51 pm on February 9, 2010
In *nix environment, use the following command to run sql script:
sqlplus -s username/password@dbname @scriptname.sql
In Windows DOS environment, use the following command:
echo quit | sqlplus -s username/password@dbname @scriptname.sql
Remember to replace username, password, dbname, scriptname for your need