Oracle SQL: Running and Logging

For my database class, I needed to write an SQL file and then run it in SQLPLUS, I also had to log SQLPLUS output to a file.

Start SQLPLUS.

SQL > spool "output.file";

SQL > @file.sql;

SQL > spool off;

Spool will channel all of the commands output to a specific file, and then @ will load and run the specified file.