Results 1 to 8 of 8
  1. #1
    Join Date
    Apr 2008
    Posts
    29

    Arrow Unanswered: How to restore 8.1 databases in 9.1?

    Guys

    I had created few databases in 8.1 on AIX 5.3.
    Now my application (cognos) is going for migration and so is udb.

    I already have UDB 9.1 ESE installed where i am trying to restore the backed up databases (from 8.1).

    but i am unable to do so.

    Every time i run 'restore' command,i get a message"The System is trying to write to a read-only file".

    Is such restoration possible? If yes,how?

    Regards
    Abhi

  2. #2
    Join Date
    Apr 2006
    Location
    Belgium
    Posts
    2,514
    Provided Answers: 11
    just with restore command- it will be migrated while restored
    maybe a container path is to be created on a location that you don't have authority for
    check the target locations of db containers/path and check authority
    chown all paths to instance owner with at least write authority
    Best Regards, Guy Przytula
    Database Software Consultant
    Good DBAs are not formed in a week or a month. They are created little by little, day by day. Protracted and patient effort is needed to develop good DBAs.
    Spoon feeding : To treat (another) in a way that discourages independent thought or action, as by overindulgence.
    DB2 UDB LUW Certified V7-V8-V9-V9.7-V10.1-V10.5 DB Admin - Advanced DBA -Dprop..
    Information Server Datastage Certified
    http://www.infocura.be

  3. #3
    Join Date
    Apr 2008
    Posts
    29

    Arrow

    ok...this is what i did

    db2 -v restore db AAUD2305 from <PATH1> to <PATH> redirect
    db2 -v "set tablespace containers for 2 using (path 'SQLT0002.0')"
    db2 -v "set tablespace containers for 3 using (path 'tmp02')"
    db2 -v "set tablespace containers for 5 using (path 'usr01')"
    db2 -v "set tablespace containers for 6 using (path 'SYSTOOLSPACE')"
    db2 -v restore database AAUD2305 continue

    after this if i say "db2 connect to AAUD2305",it throws following error:

    bash-3.00$ db2 connect to AAUD2305
    SQL1119N A connection to or activation of database "AAUD2305" cannot be made
    because a previous restore is incomplete. SQLSTATE=57019
    & as per db2

    bash-3.00$ db2 ? SQL1119N

    SQL1119N A connection to or activation of database "<name>"
    cannot be made because a previous restore is
    incomplete.

    Explanation:

    The database is in an inconsistent state because a system error
    occurred during a restore function.

    No connection was made.

    Where is the issue here? Why db is in inconsistent state?

    Regards
    Abhijeet

  4. #4
    Join Date
    Jun 2003
    Location
    Toronto, Canada
    Posts
    5,516
    Provided Answers: 1
    Check db2diag.log - you will probably find the path to the container that was (is) invalid. Also, you seem to be forgetting about the rollforward.
    ---
    "It does not work" is not a valid problem statement.

  5. #5
    Join Date
    Apr 2008
    Posts
    29

    Arrow

    modified my script:

    db2 -v restore db AAUD2305 from <PATH1> to <PATH> into AAUD2305 redirect without rolling f
    orward
    db2 -v "set tablespace containers for 2 using (path '/../../NODE0000/SQL00001/SQLT0002.0')"
    db2 -v "set tablespace containers for 3 using (path '/../../tmpts02/AAUD2305/tmp02')"
    db2 -v "set tablespace containers for 5 using (path '/../../tmpts02/AAUD2305/usr01')"
    db2 -v "set tablespace containers for 6 using (path '/../../srvr2287/NODE0000/SQL00001/SYSTOOLSPACE')"

    db2 -v restore database AAUD2305 continue
    #db2 -v rollforward database AAUD2305 complete
    #db2 connect to AAUD2305
    #db2 list tables

    db2 -v terminate


    i tried verifying my backup image & found few error there:

    [1] Buffers processed: #ERROR: Tablespace control block checksum error detected against tablespace SYSCATSPACE,PoolID 0
    ERROR: Tablespace container list checksum error detected against tablespace TEMPSPACE1,PoolID 1
    ERROR: Tablespace container list checksum error detected against tablespace USERSPACE1,PoolID 2
    ERROR: Tablespace container list checksum error detected against tablespace TEMPSPACE02,PoolID 3
    ERROR: Tablespace control block checksum error detected against tablespace COG0001T,PoolID 4
    ERROR: Tablespace container list checksum error detected against tablespace USERSPACE01,PoolID 5
    ERROR: Tablespace container list checksum error detected against tablespace SYSTOOLSPACE,PoolID 6
    ###############

    Image Verification Complete - ERRORS DETECTED: 7

    Any clues?
    Regards
    Abhijeet

  6. #6
    Join Date
    Apr 2008
    Posts
    29

    Thumbs up

    ok...

    finally i could debug the issue....

    modified my script a bit & it worked...

    thanks guys

    regards
    abhijeet

  7. #7
    Join Date
    Sep 2006
    Posts
    97
    can you post it here . if you don't mind

  8. #8
    Join Date
    Apr 2008
    Posts
    29

    Thumbs up

    here it is..
    -----------------------------------------------------------------
    db2 "restore db MYDB from <_path_to_backup_image_> into MYDB REDIRECT WITHOUT ROLLING FORWARD"
    db2 "set tablespace containers for 0 using (FILE '<_path>'50000)"
    db2 "set tablespace containers for 1 using (PATH '<_path_>')"
    db2 "set tablespace containers for 2 using (PATH '<_path_')"
    db2 "set tablespace containers for 3 using (PATH '<_path_>')"
    db2 "set tablespace containers for 4 using (PATH '<_path_>')"
    db2 "set tablespace containers for 5 using (FILE '<_path_>'131072)"
    db2 "set tablespace containers for 6 using (PATH '<_path_>')"
    db2 "restore database MYDB continue"
    -------------------------------------------------------------

    i had given ',' for FILE separating path & no of pages...

    regards
    abhi

Posting Permissions

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