Use this statement to start logging executed SQL statements to a log file.
start logging file_name
file_name – the file to which you are logging the session.
This example starts logging to a file called filename.sql, located in the c: directory.
start logging ’c: \filename.sql’
The start logging statement starts copying all subsequent executed SQL statements to the log file that you specify. If the file does not exist, Interactive SQL creates it. Logging continues until you explicitly stop the logging process with the stop logging statement, or until you end the current Interactive SQL session. You can also start and stop logging by selecting SQL | Start Logging and SQL | Stop Logging.
Any user can run this command.