Lost my SQL log

20 pts.
Tags:
SQL Sessions
SQL statement
SQL statements from a session (first session) have been lost because I opened a second SQL session and saved this when exiting AFTER exiting my first session. So, when I STRSQL, I only see the statements from my second session, those from the first session are gone. Can I somehow retrieve the statements from my first session?

Software/Hardware used:
System i
ASKED: March 12, 2013  9:23 AM
UPDATED: March 12, 2013  12:49 PM

Answer Wiki

Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Discuss This Question: 3  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • TomLiotta
    The basic process used by the system is described in Using an existing SQL session. The actual saving of a session is done in a space object in library QRECOVERY. These objects get created by iSQL for each user who exits iSQL and chooses to save a session.   Normally you can't see any of these objects because they aren't external objects. They require MI functions to access and manipulate. There is one external function you can use, though, to see them and what they contain, the DMPSYSOBJ command.   Run this command to dump your set of iSQL objects to a spooled file:
    DMPSYSOBJ OBJ(ISQLSTmyuserid*) CONTEXT(QRECOVERY) TYPE(19) SUBTYPE(EE)
    Replace "myuserid" with your user profile name and use an asterisk for generic name format.   The spooled output should show one or more dumped objects. Each one will have a name consisting of "ISQLST" in the first six characters, your user ID in the next ten characters (padded with blanks), a device name in the next ten characters (also padded if needed), and probably four zeros in the final four characters. Internal names are 30-characters long.   From the dump, you can see how many different sessions you have saved and which devices they are associated with. You can search the spooled file with "ISQLST" to find the beginning of each session. Each one will have a device name you can use to sign on to (if there is more than one).   Locate the session that you want to recover. Sign on to the associated device, and it should show up in iSQL. If no such session can be found, then it cannot be recovered; it's gone.   If you find two saved sessions and want to keep only one of them, sign on to the device you want to get rid of, go into iSQL, and exit the session without saving. (You can save it into a source member if you want a copy.) Do this for any extra sessions that you want gone, if there are more than two.   Once the extra session is gone, only the single session you want will remain. It will then be the one that shows up no matter where you sign on, unless you start iSQL sessions on two devices at the same time and save again. That will again create multiple sessions and require signing on to matching devices.   Note that using named devices can make this easier.   Tom
    125,585 pointsBadges:
    report
  • TomLiotta
    I added a comment that describes this, but it's not showing up. Perhaps it'll appear in the morning. -- Tom
    125,585 pointsBadges:
    report
  • usuala
    Brilliant! Thanks Tom a great help and yes, I got my statements back. usuala
    20 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following