Results 1 to 3 of 3
  1. #1
    Join Date
    Apr 2014
    Posts
    1

    Unanswered: DB2 - Data Retrieval

    hi,
    Is it possible to get previous version of data.

    For ex: consider table
    name dept cost code
    ajay sap 18sa
    ram oracle 19sa
    sameer mainframe 20 sa


    I have updated a particular value in cost code :

    Instead of 20 sa i have updated as 30 sa. I have not taken data backup before updating.
    name dept cost code
    ajay sap 18sa
    ram oracle 19sa
    sameer mainframe 30 sa

    Is it possible to take data backup of previous version of record after update?

  2. #2
    Join Date
    Feb 2004
    Location
    In front of the computer
    Posts
    15,579
    Provided Answers: 54
    If you mean taking a database backup before a problem occurred, no... If anyone ever creates that product, they will be rich beyond their wildest imagination!

    If you mean preparing a database so that at the point where a transaction is about to occur a history of the change is kept, that can be done multiple ways. A trigger is probably the most general solution, database auditing/logging is probably the most dependable/reliable solution. Other options may be available depending on what you want to record and what your environment will tolerate.

    -PatP
    In theory, theory and practice are identical. In practice, theory and practice are unrelated.

  3. #3
    Join Date
    Apr 2008
    Location
    Iasi, Romania
    Posts
    561
    Provided Answers: 2
    In 10.1 you have temporal tables: A matter of time: Temporal data management in DB2 10
    Florin Aparaschivei
    DB2 9.7, 10.5 on Windows
    Iasi, Romania

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •