Several times I asked myself (or others asked me) what statements I executed or what results I had gotten from many days before. Of course I didn’t remember them anymore.
Here’s where one of my favorite SQL*Plus features comes in handy: spooling. You can have it log everything you do.
First, create a folder to store the logs. Mine is C:\Spool .
Second, add these lines to the login.sql file ( you can type “ed login” to do this ):
column dinstasdasd new_value myinstance noprint
select instance_name dinstasdasd from v$instance;
column dcolasdasd new_value mydate noprint