-
Open SQL*Plus and connect to your intended database or pluggable
database (PDB) using an ordinary account permitted to connect.
For example, replace the following placeholders with your username
and configured Oracle Net service name:
CONNECT your_username@your_service
Enter your password when prompted. This exercise does not require
SYSDBA privileges or a change to the database connection mode.
-
Choose a writable directory on the computer running SQL*Plus.
Then enter these commands:
SPOOL output.log REPLACE
SELECT owner, table_name
FROM all_tables
ORDER BY owner, table_name;
SPOOL OFF
REPLACE overwrites an existing file named
output.log. Use a different filename if you need to
preserve an existing file.
-
Open output.log in a text editor and check that it
contains the query results. Because the filename has no directory
component, SQL*Plus writes it in its current working directory.
The file is created on the computer running SQL*Plus, even when
the database is on another server.
You can specify an absolute path instead. Enclose the filename
in double quotes if the path contains spaces.
-
In the response box, provide:
- The commands you used.
- The output filename and directory.
- A brief explanation of which tables the query lists.
- Whether you opened the file successfully and what you observed.
If SQL*Plus is unavailable, submit the commands you would use,
describe the expected file location and contents, and state that
you did not run the commands.