DB Creation   «Prev  Next»

Oracle SPOOL Command - Exercise

Spooling Some Output

Objective: Run the SPOOL command to create an output file.

Exercise Scoring

You will receive ten points for this exercise. The exercise is auto-scored; when you have completed the exercise, click the Submit button to receive full credit.

Instructions

Go ahead and spool some output, just to be sure that you know how. If you are running Oracle, you can complete this exercise, and if not, you can see what would happen by reading through the commands, and looking at the results. Start Oracle Shared Server, connect to your database, and issue the following series of commands:
SPOOL output
SELECT owner, table_name
FROM all_tables
ORDER BY owner, table_name;
SPOOL OFF

You should find the results in a file named output .log in your current working directory.
The .log extension will be used because it is the default and you did not specify anything else.