records retrievel

5 pts.
Tags:
iSeries
iseries v5r4
how can i retrieve deleted records?

Software/Hardware used:
v5r4
ASKED: April 27, 2010  7:28 PM
UPDATED: May 4, 2010  6:32 AM

Answer Wiki

Thanks. We'll let you know when a new response is added.

Best way (most reliable, easiest) is to retrieve the images from the journal that the file is journalled to. That’s a prime example of what journalling is used for.

Next would be to restore a saved version of the file to a different library. Copy the desired records to wherever you can do whatever you need to do with them.

Beyond that, it can be possible to “retrieve” records from a savefile of the file. As long as the data space of the file is not set to “reuse deleted records” (and one or two less likely possibilities), then the data bytes of the records are still saved with the rest of the file. There are ways to read and process savefile data records to locate and recover deleted records. It’s not trivial. A google search that looks for something like {savefile deleted records retrieve} (or “recover”) will probably show some downloadable utilities or example coding.

Tom

Discuss This Question: 10  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
  • Meandyou
    my 2 cents worth - In the old days, many applications were written with journal files or log files or transaction files where the application would record what was happening. This is separate from any database log or recovery files. these were application specific. The intent was to be able to recreate and even rerun the transactions, or any activity for that matter. For the most part, we no longer write applications using this approach.
    5,220 pointsBadges:
    report
  • CharlieBrowne
    DBU from PRODATA has this function
    39,815 pointsBadges:
    report
  • TomLiotta
    DBU from PRODATA has this function For DBU, see their RDR (Retrieving Deleted Records) FAQ's for issues in recent i5/OS releases. This technically also applies to various other similar products and utilities. The capability can be highly dependent upon OS version/release and related supporting hardware such as DASD controllers. Tom
    125,585 pointsBadges:
    report
  • TomLiotta
    In the old days, many applications were written with journal files... In modern days, e.g., since the System/38 came into wide use, this should have been an obsolete procedure. Applications no longer needed to maintain logs because DB2 could do it automatically through database journals. The journals were (and are) far superior because they are effective even when running utilities that are outside of the scope of an application. Under i5/OS, it isn't even necessary to maintain the journals. You can have the system do it all, including starting journalling for any new files that might be added later. Your normal backup procedures should be enough to trigger automatic cleanup of older receivers that are no longer attached. Tom
    125,585 pointsBadges:
    report
  • Meandyou
    In modern days, e.g., since the System/38 came into wide use, this should have been an obsolete procedure. Applications no longer needed to maintain logs because DB2 could do it automatically through database journals. That is true as far as it goes. DB2 does a wonderful job of logging. But, the DB2 logs are for recovery (forward or backward). The logs are not easily read to find specific deleted rows from specific tables.
    5,220 pointsBadges:
    report
  • TomLiotta
    The logs are not easily read to find specific deleted rows from specific tables. This might be a matter of some learning. Once learned for a single database file, the knowledge applies to every journalled file. When an application performs the logging, it will be different for every file. Individual deletions (or groups of deletions) can be selected for a file. Selection can include date/time ranges, user and even program name or job name. And once the group is selected, it's often trivial to undo the deletion. (That can even include necessary changes to related tables for referential integrity.) Getting the same things done through a custom log file requires far more effort to program and maintain, as well as simply to learn, than it does for journalled recovery. Some of that comes because it can often be done with no programming or maintenance effort at all. It shouldn't even require a new staff person to learn a custom recovery function -- staff should already know how journalling works on essentially every system they ever work on. IMO, of course! I have a fairly basic utility command that lets me enter a file name and some basic selection criteria. The command then determines what journal to access, pulls related transactions from the receiver and lists the records in the file's format. It's written in simple CL with a general REXX procedure to run a dynamic SQL statement. It works for any DB2 file that's journalled. It could be easily extended to add RMVJRNCHG or APYJRNCHG based on my approval of the displayed set of records. I can't imagine what it would take to do the same for more than a single custom application log file. Tom
    125,585 pointsBadges:
    report
  • aceofdelts
    Something new you can try is http://www.neuobjects.com It has an undelete option. My buddy wrote the programming behind it so I'm confident it is legit. Mike L.
    1,720 pointsBadges:
    report
  • MurrayInfoSys
    PEOPLE - If you compile the PF with REUSEDLT = *NO You are pretty much .... Then again you may get lucky. Phil
    940 pointsBadges:
    report
  • MurrayInfoSys
    ARG! Got it wrong. Specifies whether the space used by deleted data entries should be reclaimed by future insert requests. Phil
    940 pointsBadges:
    report
  • TomLiotta
    If you compile the PF with REUSEDLT = *NO Yes, REUSEDLT(*YES) generally makes a mess of trying to recover deleted records without a journal. The reuse of deleted record space plus the elimination of application log-file space plus the guarantee of tracking even when file maintenance is done outside of application control makes journalling as good as it can be done. Tom
    125,585 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