I was using the standard STRSQL command and exited after use. When I exited I chose option 2=Exit without saving...
session, instead of option 1=Save and exit session. Now I have lost all my cumulative SQL history. Do you know where this data was kept? I may be able to restore it from my last backup. I have been unable to locate where the SQL statement history is kept.
Interactive SQL statement history is kept in an object named ISQLST-usrprf-devicename in the library QRECOVERY.
You can display the statement history with this command:
DMPSYSOBJ ISQLSTuuuuuddddd QRECOVERY TYPE(19) SUBTYPE(EE)
Unfortunately, Qrecovery does not get saved with the standard save commands. Unless you have explicitly saved objects from Qrecovery, I don't think you'll have anything to restore. If you had lost your SQL statement history due to changing your device name you might be able to retrieve it with the above command.
A more permanent way to save your statement history when exiting SQL is to use option 4=Save session in source file.
Dig Deeper on iSeries SQL commands and statements
Related Q&A from Scott Ingvaldson
On the AS/400 system, close all sessions in the receiving envrionment when transferring files from one environment to another if the sessions hold ... Continue Reading
After extending storage capacity on an IBM 520, the system performance depends on the workload amount and should not be affected negatively as long ... Continue Reading
When encountering problems using the SNDDST command to send a *LMSG on the iSeries, specify a valid SMTP name in the directory entry of the sender to... Continue Reading
Have a question for an expert?
Please add a title for your question
Get answers from a TechTarget expert on whatever's puzzling you.