Results 1 to 8 of 8
  1. #1
    Join Date
    Oct 2016
    Posts
    6

    Answered: DB2 Tablespace corrupted - A bad page was encountered

    Hi,

    Need advice about this situation. We have one database with this issue... First, in db2diag we have Severe error with DIA8400C message (A bad page was encountered) with FODC_BadPage and FODC_ForceDBShutdown generated in db2dump. Also, there are *.events.bin files generated... We can see which tablespace and which table is affected. After running db2dart, we have following:

    ---
    ERROR:
    One or more tablespaces is corrupt.
    Table data in such tablespaces may be orphaned.

    Error: Extent number 1519360 in tablespace 2 is orphaned
    Error: Extent number 1519362 in tablespace 2 is orphaned
    Error: Extent number 1519364 in tablespace 2 is orphaned
    Error: Extent number 1519366 in tablespace 2 is orphaned
    Error: Extent number 1519368 in tablespace 2 is orphaned

    Tablespace-info inspection phase end.

    Error: This phase encountered an error and did not complete.
    Tablespace inspection phase end.
    ---

    We cannot start database nor do anything else... Is backup restore only option for these kind of cases? Anything to do to fix this state so we could query some data? Is it possible at all?

    Regards,

  2. Best Answer
    Posted by mark.bb

    "You have a bad data page (type=0):

    2017-01-11-00.20.55.164525+060 I54489E4505 LEVEL: Severe
    PID : 21514 TID : 140459485685504 PROC : db2sysc 0
    INSTANCE: db2inst1 NODE : 000 DB : DPPDB
    APPHDL : 0-7 APPID: *LOCAL.db2inst1.170110232012
    AUTHID : DB2INST1 HOSTNAME: erpdb.sfr5.local
    EDUID : 41 EDUNAME: db2redow (DPPDB) 0
    FUNCTION: DB2 UDB, buffer pool services, sqlb_verify_page, probe:2
    MESSAGE : ZRC=0x86020001=-2046689279=SQLB_BADP "page is bad"
    DIA8400C A bad page was encountered.
    DATA #1 : String, 64 bytes
    Error encountered trying to read a page - information follows :
    DATA #2 : String, 23 bytes
    Page verification error
    DATA #3 : Page ID, PD_TYPE_SQLB_PAGE_ID, 4 bytes
    48619457
    DATA #4 : Object descriptor, PD_TYPE_SQLB_OBJECT_DESC, 104 bytes
    Obj: {pool:2;obj:16;type:0} Parent={2;16}

    This means, that you have to restore the whole tablespace with id = 2 from a backup at least.
    Alternatively, you can try to export the contents of this table and mark it as invalid with db2dart, but this can be done by IBM support only."


  3. #2
    Join Date
    Jul 2016
    Location
    Moscow
    Posts
    294
    Provided Answers: 45
    Hi,

    Show the db2dart report. It's hard to say what to do without it.
    Regards,
    Mark.

  4. #3
    Join Date
    Oct 2016
    Posts
    6
    Hi Mark,

    Thank you for reply. You can find report in attachment.

    Regards,
    Last edited by db2user11; 01-10-17 at 11:50.

  5. #4
    Join Date
    Jul 2016
    Location
    Moscow
    Posts
    294
    Provided Answers: 45
    Try to mark the index as invalid using the following command (stop db2 instance first):
    db2dart DPPDB /MI /TSI 2 /OI 16
    It should repair the following error:

    Traversing extent map for:
    OTR ID: 16
    Parent object ID = 16 pool ID = 2
    For all table objects in tablespace: 2

    DAT extent anchor: 9920, in pool: 2
    Traversing extent map for object type: 0
    INX extent anchor: 9984, in pool: 2
    Traversing extent map for object type: 1
    Error: Extent used but marked FREE in SMP (# 189, pool page 40960029)! Page: 48619872
    ...


    Run
    db2diag -A
    , start db2 instance and try to work with the database afterwards.
    Attach db2diag.log & db2dart output (run it with stopped instance) If you still have any errors.
    Regards,
    Mark.

  6. #5
    Join Date
    Oct 2016
    Posts
    6
    Hi Mark,

    This is sequence:

    1. db2dart DPPDB /MI /TSI 2 /OI 16

    Warning: The database state is not consistent.
    False errors may be reported.

    Warning: Errors reported about reorg rows may be due to the inconsistent state of the database.
    Attempting to mark index object (p=2;o=16) as bad.

    Modification for page (obj rel 0, pool rel 10016) of pool ID (2) obj ID (16), written out to disk successfully.

    Note: If INDEXREC=RESTART, please issue a RESTART DATABASE
    before first connect to rebuild the invalid index(es).
    DB2DART Processing completed with warning(s)!
    Complete DB2DART report found in: DPPDB.RPT


    2. db2diag -A

    3. db2start

    01/10/2017 16:26:15 0 0 SQL6048N A communication error occurred during START or STOP DATABASE MANAGER processing.
    SQL1032N No start database manager command was issued. SQLSTATE=57019



    You can find db2diag and dart output in attachment.

    Thank you!

    Regards,
    Last edited by db2user11; 01-10-17 at 19:54.

  7. #6
    Join Date
    Jul 2016
    Location
    Moscow
    Posts
    294
    Provided Answers: 45
    What's the result of the following commands from the db2 instance owner?

    ping $(hostname)
    cat /etc/hosts
    cat ~sqllib/db2nodes.cfg
    Regards,
    Mark.

  8. #7
    Join Date
    Oct 2016
    Posts
    6
    Hi Mark,

    You made your point... It was wrong entry in /etc/hosts... Now, db2start goes successfully but db2 connect to database goes like this:

    db2 connect to db_name
    SQL1042C An unexpected system error occurred. SQLSTATE=58004


    I'm starting to loose my faith in this... Hope it can be solved somehow... Also, you can find db2dart and db2diag outputs in attachment.

    Thank you very much.

    Regards,
    Attached Files Attached Files

  9. #8
    Join Date
    Jul 2016
    Location
    Moscow
    Posts
    294
    Provided Answers: 45
    You have a bad data page (type=0):

    2017-01-11-00.20.55.164525+060 I54489E4505 LEVEL: Severe
    PID : 21514 TID : 140459485685504 PROC : db2sysc 0
    INSTANCE: db2inst1 NODE : 000 DB : DPPDB
    APPHDL : 0-7 APPID: *LOCAL.db2inst1.170110232012
    AUTHID : DB2INST1 HOSTNAME: erpdb.sfr5.local
    EDUID : 41 EDUNAME: db2redow (DPPDB) 0
    FUNCTION: DB2 UDB, buffer pool services, sqlb_verify_page, probe:2
    MESSAGE : ZRC=0x86020001=-2046689279=SQLB_BADP "page is bad"
    DIA8400C A bad page was encountered.
    DATA #1 : String, 64 bytes
    Error encountered trying to read a page - information follows :
    DATA #2 : String, 23 bytes
    Page verification error
    DATA #3 : Page ID, PD_TYPE_SQLB_PAGE_ID, 4 bytes
    48619457
    DATA #4 : Object descriptor, PD_TYPE_SQLB_OBJECT_DESC, 104 bytes
    Obj: {pool:2;obj:16;type:0} Parent={2;16}

    This means, that you have to restore the whole tablespace with id = 2 from a backup at least.
    Alternatively, you can try to export the contents of this table and mark it as invalid with db2dart, but this can be done by IBM support only.
    Regards,
    Mark.

Posting Permissions

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