Recovering deleted records

550 pts.
Tags:
AS/400


Hi friends, it´s me again (rsrsrs)

I have a file journalized named (product/master) and Journal Receiver below

                         Work with Journal Attributes                                                                                             Journal  . . . . . . :   QSQJRN          Library  . . . . . . :   MASTER                                                                           Attached receiver  . :   MASTER1065      Library  . . . . . . :   MASTER

The question is: Thousand records of this file was deleted by a SQL command, How can I restore this records using the Journal ?

Thanks, Roberto

Answer Wiki

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

Use the APYJRNCHG command.
This same question was answered about 2 weeks ago with more information.
Here is the link to that question

http://itknowledgeexchange.techtarget.com/itanswers/database-recovery-from-journals/

Discuss This Question: 12  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
  • RBDSILVA
    Ok Charlie, thanks for all. Roberto.
    550 pointsBadges:
    report
  • TomLiotta
    @RBDSILVA: The journal you showed is QSQJRN, a standard for SQL journalling. If you display the product/master file description, what attributes are shown for the 'Journal images' (IMAGES) attribute? If it doesn't say "*BOTH" you might need a specific method of recovery. Also, was the file being updated under commitment control? Were other files involved in the same process? Was product/master update by other processes after the erroneous updates were applied? Tom
    125,585 pointsBadges:
    report
  • RBDSILVA
    
    Hi Tom, it´s correct the name of the journal is QSQJRN.
    
    Access path size  . . . . . . . . . . . . . : ACCPTHSIZ  *MAX4GB         
    Maximum record length . . . . . . . . . . . :              395           
    File is currently journaled . . . . . . . . :            Yes             
    Current or last journal . . . . . . . . . . :            JOURNAL         
    Library . . . . . . . . . . . . . . . . . :            MASTER         
    Journal images  . . . . . . . . . . . . . . : IMAGES     *AFTER          
    Journal entries to be omitted . . . . . . . : OMTJRNE    *NONE    
    
    I´m testing, this example:
    by SQL
    > delete from PRODUCT/MASTER                
      62819 rows deleted from MASTER in PRODUCT.
    
    How can I restore that 62.819 rows deleted ?
    
    Thanks,
    Roberto
    550 pointsBadges:
    report
  • philpl1jb
    It would using rmvjrnchg but first dspjrn to check the stuff that would be selected - you want to specify the file & time range or job. I'm not sure if that will work with delete on an after image. Phil
    49,950 pointsBadges:
    report
  • TomLiotta
    @RBDSILVA: Because your journal only has *AFTER images, you cannot use RMVJRNCHG. You must restore the file from before the problem, and then use APYJRNCHG to apply the updated *AFTER images. There are no *BEFORE images to available to work your way backwards. There are only images that can go forwards from a point in time. If the journal was holding *BOTH (before and after), you could go either forward or backward. Tom
    125,585 pointsBadges:
    report
  • TomLiotta
    Minor note...
    Journal images  . . . . . . . . . . . . . . : IMAGES     *AFTER
    Journal entries to be omitted . . . . . . . : OMTJRNE    *NONE
    It's a little odd to only retain *AFTER images but also to retain all *OPNCLO (opens and closes). I'd assume it was set up automatically. Was there a reason for the choice (other than it being the default)? I usually go the other direction with *BOTH and *OPNCLO. When I've wanted to track opens/closes, it's always been for a specific termporary purpose and I can enable it when needed. It's much harder to enable *BOTH when needed because it's usually needed before it can be enabled... Tom
    125,585 pointsBadges:
    report
  • RBDSILVA
    Thanks for Charlie, Tom and Phil, now step by step below the problem was solved.
    
    Picrure 01
    
    Picture 02
    
    Picture 03
    
    Picture 04
    
    Picture 05
    
    Picture 06
    
    Picture 07
    
    Picture 08
    
    Picture 09
    
    Picture 10
    
    Picture 11
    
    Regards,
    Roberto
    
    
    550 pointsBadges:
    report
  • RBDSILVA
    Thanks for Charlie, Tom and Phil, now step by step below the problem was solved.
    
    Picture 01
    
    
    550 pointsBadges:
    report
  • RBDSILVA
    Picture 01
    
    550 pointsBadges:
    report
  • RBDSILVA
    Sorry friends, the problem was solved, I have 11 pictures with step by step but I am having problem to insert this photos here.
    
    Thanks a lot,
    Roberto
    
    550 pointsBadges:
    report
  • TomLiotta
    Well, I'm not sure exactly what the images show, but they're detailed enough to give an idea. If those record images in the journal are records that you want back in the file, then they're perfectly valid for a couple possible methods. Are you done with this question? Are there details you'd like added to the discussion? Tom
    125,585 pointsBadges:
    report
  • RBDSILVA
    Tom, thanks for your help,
    
    I wanted to detail from the DSPJRN, modifying the SQL database and then restoring the records before the update, you may notice that 7349 records has been restored.
    
    Regards,
    Roberto
    
    550 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