Results 1 to 6 of 6
  1. #1
    Join Date
    Feb 2007
    Posts
    47

    Unanswered: v8 not logged initially

    If a table is created with not logged initially, when you do an online backup, does that table get backed up ok (ie you go to restore, is that table available and you don't do a rollforward to end of logs and complete)?

  2. #2
    Join Date
    Jan 2003
    Posts
    4,292
    Provided Answers: 5
    It depends. If the unit of work that created the table was committed and any operations on the table while it is in the "NOT LOGGED INITIALLY" state is committed, the table will be there. This is true whether the commits are done during normal operation or through rollforward. If any unit of work is not completed properly, the table will be marked as inaccessible and it can only be dropped at that point.

    Andy

  3. #3
    Join Date
    Feb 2007
    Posts
    47
    I sure hope that an offline full backup can get the table ok?

  4. #4
    Join Date
    Jan 2003
    Posts
    4,292
    Provided Answers: 5
    Sure, if all previous operations did not leave it as inaccessible.

    Andy

  5. #5
    Join Date
    Aug 2008
    Location
    Toronto, Canada
    Posts
    2,367
    Rollforward through a "create table ... not logged initially" will mark the table inaccessible. The table will accessible if you restore from an offline backup without rolling forward or if restore from an offline/online backup but rollforward doesn't process a log record for "create table ... not logged initially" or "alter table ... activate not logged initially".

  6. #6
    Join Date
    Aug 2008
    Location
    Toronto, Canada
    Posts
    2,367
    From DB2 Universal Database :

    You cannot recover these tables when rolling forward. If the rollforward operation encounters a table that was created or altered with the NOT LOGGED INITIALLY option, the table is marked as unavailable. After the database is recovered, any attempt to access the table returns SQL1477N.

Posting Permissions

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