Results 1 to 2 of 2
  1. #1
    Join Date
    Jul 2015
    Posts
    6

    Unanswered: Restore online db2 backup to different server/location?.

    Hi All,

    I am trying to restore our db2 production database (v 10.5) to test server, The database has 9 DMS tabale space with automatic storage, when I'm using redirect option,
    I got following error when I want to set tablespace container:
    SQL20319N The SET TABLESPACE CONTAINERS command is not allowed on an automatic storage table space.

    The restore command That I used was:
    db2 RESTORE DATABASE DB2PROD FROM '/new-db2data' TAKEN AT 20151108011505 ON '/new-db2data/db2test5' DBPATH ON '/new-db2data/db2test5/'
    INTO DB2TEST5 LOGTARGET '/db2backup/logtarget/' NEWLOGPATH '/db2logs/db2test5/NODE0000/LOGSTREAM0000/' REDIRECT;

    Also I tried the following command with ON and "DBPATH ON" option and without redirect , but some of table spaces did not restored correctly.
    db2 RESTORE DATABASE DB2PROD FROM '/new-db2data' TAKEN AT 20151108011505 ON '/new-db2data/db2test5' DBPATH ON '/new-db2data/db2test5/' INTO DB2TEST5 LOGTARGET '/db2backup/logtarget/' NEWLOGPATH '/db2logs/db2test5/NODE0000/LOGSTREAM0000/';

    and here is Tablespace Configuration on production db:
    Address Id Type Content PageSz ExtentSz Auto Prefetch BufID BufIDDisk FSC NumCntrs MaxStripe LastConsecPg RSE Name
    0x00002B87B5490D40 0 DMS Regular 4096 4 Yes 4 1 1 Off 1 0 3 Yes SYSCATSPACE
    0x00002B88CBA90080 1 SMS SysTmp 4096 32 Yes 32 1 1 On 1 0 31 No TEMP4K
    0x00002B88CBA9D220 2 DMS Large 4096 32 Yes 32 1 1 Off 1 0 31 Yes USERSPACE1
    0x00002B88CBAAA3C0 3 DMS Large 4096 4 Yes 4 1 1 Off 1 0 3 Yes SYSTOOLSPACE
    0x00002B88CBAB7560 4 DMS Large 4096 4 No 8 2 2 Off 1 0 3 Yes TS_CCCDE_DATA
    0x00002B88CBAC4700 5 DMS Regular 4096 4 No 8 3 3 Off 1 0 3 Yes TS_CCCDE_INDEX
    0x00002B88CBAD18A0 6 DMS Large 4096 32 No 64 4 4 Off 1 0 31 Yes TS_4K_DATA
    0x00002B88CBADEA40 7 DMS Large 4096 32 No 64 5 5 Off 1 0 31 Yes TS_4K_INDEX
    0x00002B88CBAEBBE0 8 DMS Large 32768 16 No 32 6 6 Off 1 0 15 Yes TS_32K_DATA
    0x00002B88CBAF8D80 9 SMS UsrTmp 4096 4 Yes 4 1 1 Off 1 0 3 No SYSTOOLSTMPSPACE
    0x00002B88CBB05F20 10 SMS SysTmp 32768 32 Yes 32 6 6 On 1 0 31 No TEMP32K
    0x00002B88CBB720A0 11 DMS Large 32768 32 Yes 32 7 7 On 1 0 31 Yes TS_32K_LONG


    Which step is missing?

    Regards,
    Daniel

  2. #2
    Join Date
    Jul 2013
    Location
    Moscow, Russia
    Posts
    666
    Provided Answers: 55
    When you say "some of table spaces did not restored correctly", it would be better if you specify what it means exactly.
    Which tablespaces? What does it mean "not restored correctly"?

    Run the following command:
    db2 RESTORE ... REDIRECT GENERATE SCRIPT DB2PROD.sql
    Show here the contents of the DB2PROD.sql file and point to the tablespaces in this script, which were not restored correctly.
    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
  •