Results 1 to 13 of 13
  1. #1
    Join Date
    Sep 2003
    Posts
    33

    Unanswered: recover tablespace from any image copy

    unknowingly we ran a job of Modify Recover Utility for deleting all Syscopy records greater than age 45. In one situation we needed some tables to be restored prior to the period, like 90 days.
    Is there a way i can restore the tablespace...since the recover utility fails says that syscopy record not found...
    Is it possible to recover now.....we have the image copy dataset..
    any help will be apreciated.
    bs

  2. #2
    Join Date
    May 2003
    Location
    USA
    Posts
    5,737
    Yes, you just Recover TOCOPY data-set-name. See the Utility Reference for more information. You can also extract the data in sequential dataset format from the Image Copy using the UNLOAD utility (version 7).

    For those that are confused, this is OS/390. Please always state your DB2 version and OS.
    M. A. Feldman
    IBM Certified DBA on DB2 for Linux, UNIX, and Windows
    IBM Certified DBA on DB2 for z/OS and OS/390

  3. #3
    Join Date
    Jan 2004
    Location
    Zuerich, Switzerland
    Posts
    13
    Marcus,
    this is wrong. You get error message

    DSNU519I csect-name TOCOPY DATA SET NOT FOUND

    Explanation: The data set specified with the keywords TOCOPY, TOVOLUME, or TOSEQNO cannot be found in the SYSCOPY table for the object to be recovered.

    in the RECOVER utility if you just RECOVER TOCOPY after deleting all SYSCOPY rows.

    In this situation, DSN1COPY must be used to bring the data back from the image copy dataset, then REPAIR to remove the LEVELID mismatch, and COPY to remove the COPYPEND restriction. This is in DB2 V7.1 on z/OS 1.4.

    good luck, Heinz

  4. #4
    Join Date
    May 2003
    Location
    USA
    Posts
    5,737
    Heinz, thanks for correcting me. Fortunately, I have never deleted syscopy rows that I needed. I have used the DSN1COPY with the REPAIR to restore image copies when the obid changed.

    I think the other solution is also viable (extracting the data from the image copy with the UNLOAD utility and loading it back to the table with REPLACE).
    M. A. Feldman
    IBM Certified DBA on DB2 for Linux, UNIX, and Windows
    IBM Certified DBA on DB2 for z/OS and OS/390

  5. #5
    Join Date
    Jan 2004
    Location
    Zuerich, Switzerland
    Posts
    13
    Yes, UNLOADing the data would work of course. There are some restrictions with incremental COPY datasets and compressed rows, so that that this method might fail.
    Also, in today's 24x7 application environments, you have to use COPY in SHRLEVEL CHANGE mode, and therefore rely on the DB2 log to be able to recover to a consistent state. It is therefore very important to not lose the SYSCOPY and SYSLOGRNGX content.

    greetings, Heinz

  6. #6
    Join Date
    Sep 2003
    Posts
    33
    Sorry i did not mentioned the version of DB2 and operating system. Well you figured correctly that it is OS/390. We are v2r10 and database is still db2 ver 5.1. So i believe the unload from the image copy is only possible in V7.1.
    We take monthly full image copies for all table spaces. DSN1COPY utility is good only offline i believe, don't we need to stop the database/sub system while running the utility.
    after dsn1copy, do we need to reorg/runstat/rebind to get in sync with catalog and dbrmlibs.
    If i did Dsn1copy using one year old image copy to see data in it and then want to come to present that is recovering to point in time using logs and latest image copy in syscopy is it possible..
    is it too much for asking?
    bs

  7. #7
    Join Date
    Jan 2004
    Location
    Zuerich, Switzerland
    Posts
    13

    Post

    Yes, you have to stop the table space to run DSN1COPY.
    Then, you also have to rebuild all indexes on the tables in that table space.
    REORG , RUNSTATS, and REBIND can be done, but are not necessary.

    What i would do to view the data on an old image copy file, is
    create a new table space and table with an identical structure,
    and load the image copy file there.

  8. #8
    Join Date
    Sep 2003
    Posts
    33
    It worked alright. Thanks. For some tables i was getting this unusual error while recovering the INDEX.

    RESOURCE UNAVAILABLE
    REASON 00C90087
    TYPE 00000302
    NAME DTCDB01X.DTCTS001.X'000006B2'
    broken page and all.
    browsing through the administration guide.. nothing is clear so far,,
    can u help
    bs

  9. #9
    Join Date
    May 2003
    Location
    USA
    Posts
    5,737
    How about dropping and re-creating the indexes?
    M. A. Feldman
    IBM Certified DBA on DB2 for Linux, UNIX, and Windows
    IBM Certified DBA on DB2 for z/OS and OS/390

  10. #10
    Join Date
    Sep 2003
    Posts
    33
    Thanks for replying marcus.
    Just tried droping and recreating thru spufi.
    Getting these errors in the log.
    DSNI012I @ PAGE LOGICALLY BROKEN 150
    TYPE 00000302
    NAME DTCDB01X.DTCTS001.X'00001414'
    MODNAME DSNIOLIN
    ERQUAL 0CA4
    bs

  11. #11
    Join Date
    Sep 2003
    Posts
    33
    got it. The tablespace where i am copying was not segmented (Missed the parm Segsize). Now all are working! yup!!!!!
    bs

  12. #12
    Join Date
    Sep 2003
    Posts
    33

    new problem

    WE have restored some 100 tables of production to test region using DSN1copy. All are restored sucessfully. Few tables are giving trouble.
    giving the following message when tried Select on this table.
    DSNI014I @ DSNIRNXT DATA IN USE DURING ABEND
    REASON 00C90101
    ERQUAL 53CB
    TYPE 00000302
    NAME AUTDB01X.AUTTS026.X'00000002'
    CONNECTION-ID=DB2CALL
    CORRELATION-ID=SYSDBA
    LUW-ID=*
    Ob ids match, segsize also matching..what else can be problem.
    any help is appreciated. developers are around me.....all the time
    bs

  13. #13
    Join Date
    Mar 2010
    Posts
    1

    DB2 Database is Your Solution!

    As you have written your error in DB2 database table, the same was with me. On that time a registered users of dBforums - Database Support Community suggest me about DB2 Database Repair. And it worked and resolved my issue. You may also follow this!

Posting Permissions

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