Home > Ask the AS/400 Experts > iSeries Systems Management Questions & Answers > SQL statement history storage
Ask The iSeries 400 Expert: Questions & Answers
EMAIL THIS

SQL statement history storage

Scott Ingvaldson EXPERT RESPONSE FROM: Scott Ingvaldson

Pose a Question
Other iSeries 400 Categories
Meet all iSeries 400 Experts
Become an Expert for this site


iSeries news and advice
Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us    Add to Google


>
QUESTION POSED ON: 13 March 2008
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.


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us    Add to Google



RELATED CONTENT
iSeries Systems Management
Transfer files from one environment to another without closing all other AS/400 sessions
Send a *LMSG successfully on AS/400 using the SNDDST command
Extend storage capacity on an IBM i without negatively effecting system performance
Configure the iSeries v5r4 to open the HTTPS port for incoming connections
Changing system CCSID
Changing user password expiration
Detecting system changes made by outside IP address
HIPER PTF installation and cover letters for SF99097
Library QUSRSYS not completely installed
Setting up an automatic reply in the system reply list

iSeries SQL commands and statements
Enhancing RPG with external SQL stored procedures
Tracking data changes on IBM i with triggers
Introduction to SQLRPGLE on IBM i: Making a report
Making the most of RPG data handling on IBM i
When is the YES option for 'reuse deleted files' function the best choice?
Monitoring members 'stuck' within a physical file on an EDI system
Creating a host variable of the 'where in' statement in SQL
SQL server error message -321
Choose which column names are returned via ODBC when working with DB2 files
Convert a numeric physical file to a character in SQL without leading zeros
iSeries SQL commands and statements Research

RELATED RESOURCES
2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
Search Bitpipe.com for the latest white papers and business webcasts
Whatis.com, the online computer dictionary



Search and Browse the Expert Answer Center
Search and browse more than 25,000 question and answer pairs from more than 250 TechTarget industry experts.
Browse our Expert Advice



iSeries Networking - Printing, Remote Access, TCP/IP
HomeNewsTopicsITKnowledge ExchangeTipsBlogsAsk the ExpertsMultimediaWhite PapersProducts
About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
SEARCH 
TechTarget provides technology professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective purchase decisions and managing their organizations' technology projects - with its network of technology-specific websites, events and online magazines.

TechTarget Corporate Web Site  |  Media Kits  |  Site Map




All Rights Reserved, Copyright 1999 - 2009, TechTarget | Read our Privacy Policy
  TechTarget - The IT Media ROI Experts