Results 1 to 4 of 4
  1. #1
    Join Date
    Feb 2007
    Posts
    84

    Unanswered: db2 restore database Warnings SQL2563W

    I'm using DB2 v9.1 FixPak 4 with AIX 6.1. I'm trying to restore a backup from Production on our test environment and I'm getting this Warning:

    dbtest$ db2 restore db psftprod from . taken at 20101103011543 replace existing
    SQL2523W Warning! Restoring to an existing database that is different from
    the database on the backup image, but have matching names. The target database will be overwritten by the backup version. The Roll-forward recovery logs associated with the target database will be deleted.
    SQL2563W The restore process has completed successfully, but one or more
    table spaces from the backup were not restored.

    This was in the db2diag.log:

    ./db2syscat/db2
    0x00000001119A3350 : 696E 7374 312F 4E4F 4445 3030 3030 2F53 inst1/NODE0000/S
    0x00000001119A3360 : 514C 3030 3030 342F 0000 0000 0000 0000 QL00004/



    2010-11-04-06.05.12.275532-300 E216990A524 LEVEL: Error
    PID : 23789736 TID : 1 PROC : db2agent (PSFTPROD) 0
    INSTANCE: db2inst1 NODE : 000
    APPHDL : 0-784 APPID: *LOCAL.db2inst1.101104110512
    AUTHID : DB2INST1
    FUNCTION: DB2 UDB, buffer pool services, sqlbStartPools, probe:20
    MESSAGE : ADM6023I The table space "USERTEMP04" (ID "1") is in state
    0x"2001100". The table space cannot be accessed. Refer to the
    documentation for SQLCODE -290.

    2010-11-04-06.05.12.285740-300 I217515A455 LEVEL: Error
    PID : 23789736 TID : 1 PROC : db2agent (PSFTPROD) 0
    INSTANCE: db2inst1 NODE : 000
    APPHDL : 0-784 APPID: *LOCAL.db2inst1.101104110512
    AUTHID : DB2INST1
    FUNCTION: DB2 UDB, buffer pool services, sqlbStartPools, probe:20
    MESSAGE : ZRC=0x80020035=-2147352523=SQLB_NOT_ALLOWED_RECOVERY_P
    "Access not allowed. Tblspc Recovery Pend."

    2010-11-04-06.05.12.466402-300 E217971A522 LEVEL: Error
    PID : 23789736 TID : 1 PROC : db2agent (PSFTPROD) 0
    INSTANCE: db2inst1 NODE : 000
    APPHDL : 0-784 APPID: *LOCAL.db2inst1.101104110512
    AUTHID : DB2INST1
    FUNCTION: DB2 UDB, buffer pool services, sqlbStartPools, probe:20
    MESSAGE : ADM6023I The table space "SNAPDATA" (ID "5") is in state
    0x"2001100". The table space cannot be accessed. Refer to the
    documentation for SQLCODE -290


    Looks like 2 tablespaces are not in Normal state. I ran a db2dart for these two tablespaces and got this below. I'm not sure what "Tablespace state: 33558784" means. I cannot connect to the database, so could someone give me some ideas on how to proceed and fix this issue with these two tablespaces so I can restore the backup and logs and rollforward?

    Thank you!

    Tablespace name: USERTEMP04
    Table space flags (HEX): 0141
    Table space type: System Managed Space (SMS)
    Page size: 4096
    Extent size: 16
    Prefetch size: 80
    Version: 375
    Tablespace state: 33558784
    Number of quiescers: 0
    Storage Group ID: 0
    Usable pages in tablespace: 0
    Total pages in tablespace: 0
    Initial Size: 0 bytes
    Increment : 0 bytes
    Maximum Size: 0 bytes
    Last Resize: None
    Last Resize Failed: No
    SMP page for first free extent: 0
    SMP page for last allocated tablespace extent. 0
    SMP extent number of the last initialized SMP extent: 0
    High Water Mark: 0
    Number of containers associated with this tablespace: 5
    Container list:
    Container #0, /db2_data/temparea/container1/psftprod/userts_temp04k
    Container #1, /db2_data/temparea/container2/psftprod/userts_temp04k
    Container #2, /db2_data/temparea/container3/psftprod/userts_temp04k
    Container #3, /db2_data/temparea/container4/psftprod/userts_temp04k
    Container #4, /db2_data/temparea/container5/psftprod/userts_temp04k
    Container checksum for disk space: 1279997723
    Number of ranges in the map: 0
    Size of the map: 0
    Map entry size: 72
    Map checksum for disk space: 0
    LSN (Log Sequence Number) for life...
    lsn: 0122 C6FA 2348
    lsnword: 122 FFFFC6FA 2348
    LSN (Log Sequence Number) for load pending...
    lsn: 0000 0000 0000
    lsnword: 00 00 00
    LSN (Log Sequence Number) for load recovery...
    lsn: 0000 0000 0000
    lsnword: 00 00 00
    LSN (Log Sequence Number) for begin...
    lsn: 0000 0000 0000
    lsnword: 00 00 00
    LSN (Log Sequence Number) for end...
    lsn: 0000 0000 0000
    lsnword: 00 00 00
    Backup end time : 1275906540
    Backup log rec found status : 0x00000010
    SQLB_BACKUP_END_REC_FOUND
    Bufferpool ID in SPCS file: 7
    Bufferpool ID at DART runtime: 4096






    Tablespace name: SNAPDATA
    Table space flags (HEX): 2122
    Table space type: Database Managed Space (DMS), Auto-Resize
    Page size: 8192
    Extent size: 32
    Prefetch size: 16
    Version: 841
    Tablespace state: 33558784
    Number of quiescers: 0
    Storage Group ID: -1
    Usable pages in tablespace: 0
    Total pages in tablespace: 0
    Initial Size: 0 bytes
    Increment : 5 %
    Maximum Size: None
    Last Resize: None
    Last Resize Failed: No
    SMP page for first free extent: 0
    SMP page for last allocated tablespace extent. 0
    SMP extent number of the last initialized SMP extent: 0
    High Water Mark: 0
    Number of containers associated with this tablespace: 5
    Container list:
    Total Useable Container Container
    # Pages Pages Type Name
    === ======== ======== ============== ============================
    0 16216 16160 striped file /db2_data/snapshot/psftprod/container1/ts_snapdata.db2
    1 16216 16160 striped file /db2_data/snapshot/psftprod/container2/ts_snapdata.db2
    2 16216 16160 striped file /db2_data/snapshot/psftprod/container3/ts_snapdata.db2
    3 16216 16160 striped file /db2_data/snapshot/psftprod/container4/ts_snapdata.db2
    4 16216 16160 striped file /db2_data/snapshot/psftprod/container5/ts_snapdata.db2
    Container checksum for disk space: 963190143
    Number of ranges in the map: 1
    Size of the map: 1
    Map entry size: 72
    Current map:
    MaxPage MaxExtent StartStripe EndStripe Adj Containers
    [ 0] 80799 2524 0 504 0 5 (0,1,2,3,4)
    Map checksum for disk space: 78778
    LSN (Log Sequence Number) for life...
    lsn: 01E0 F05B 7CCD
    lsnword: 1E0 FFFFF05B 7CCD
    LSN (Log Sequence Number) for load pending...
    lsn: 0000 0000 0000
    lsnword: 00 00 00
    LSN (Log Sequence Number) for load recovery...
    lsn: 0000 0000 0000
    lsnword: 00 00 00
    LSN (Log Sequence Number) for begin...
    lsn: 0000 0000 0000
    lsnword: 00 00 00
    LSN (Log Sequence Number) for end...
    lsn: 0000 0000 0000
    lsnword: 00 00 00
    Backup end time : 1275906540
    Backup log rec found status : 0x00000010
    SQLB_BACKUP_END_REC_FOUND
    Bufferpool ID in SPCS file: 10
    Bufferpool ID at DART runtime: 4097

  2. #2
    Join Date
    Nov 2005
    Location
    IL
    Posts
    557
    db2tbst 0x2001100
    State = Restore Pending
    + Storage Must be Defined
    + Storage May be Defined
    --
    IBM Certified DBA on DB2 for Linux, UNIX, and Windows

    DB2 v9.7.0.6 os 6.1.0.0

  3. #3
    Join Date
    Feb 2007
    Posts
    84
    What I'm going to do is restore the logs and then RF. Then I'm going to drop the TS and recreate them. I think this should work.

  4. #4
    Join Date
    Aug 2008
    Location
    Toronto, Canada
    Posts
    2,367
    You need to check if the filesystems used by the tablespace containers in prod exist in your dev env. If they don't exist or in use by some other db, then you may have to redefine them.

Posting Permissions

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