Results 1 to 8 of 8
  1. #1
    Join Date
    Apr 2009
    Posts
    16

    Unanswered: How to restore from backup created by Load..Copy Yes command

    I run the following command ...

    load from mycursor of cursor replace into <table_name> copy yes to c:\test check pending cascade immediate

    After running the command :
    In folder C:\test , the following 2 files got created:
    DBNAME.4.DB2.NODE0000.CATN0000.20090525163235.001
    DBNAME.4.DB2.NODE0000.CATN0000.20090525163237.001

    __________________________________________________ _________________

    I understand that these two files create the backup of data during the Load

    I tried using DB2 RESTORE command:
    DB2 RESTORE DATABASE DBNAME FROM "C:\test" TAKEN AT 20090525163235 WITH 2
    BUFFERS BUFFER 1024 PARALLELISM 1 WITHOUT PROMPTING


    And got the error:
    SQL2542N No match for a database image file was found based on the source
    database alias "DBNAME" and timestamp "20090525163235" provided.


    Please tell me what is the use of the two files created suring DB2 load.
    And How exactly can I use it for recovery.
    Last edited by MeeraJoy; 05-25-09 at 09:36.

  2. #2
    Join Date
    Jun 2003
    Location
    Toronto, Canada
    Posts
    5,516
    Provided Answers: 1
    The COPY YES option does not create a backup image, so you cannot use the RESTORE command the way you tried. The data collected by that option contains information that is necessary to roll forward the LOAD command. The proper way of restoring a database in this situation would be to RESTORE a backup image taken before the LOAD, then ROLLFORWARD to a point in time after the LOAD.
    ---
    "It does not work" is not a valid problem statement.

  3. #3
    Join Date
    Aug 2008
    Location
    Toronto, Canada
    Posts
    2,367
    You can't restore from this image. This image will be used by db2 during the rollforward.

  4. #4
    Join Date
    Apr 2009
    Posts
    16
    OK. I was trying to know the usability of the files created after I run the Load command
    namely
    DBNAME.4.DB2.NODE0000.CATN0000.20090525163235.001
    DBNAME.4.DB2.NODE0000.CATN0000.20090525163237.001


    What is the way, that gets used? and how?

  5. #5
    Join Date
    Apr 2009
    Posts
    16
    Quote Originally Posted by db2girl
    You can't restore from this image. This image will be used by db2 during the rollforward.
    So, is there any way the user can use it?.....by what command...?

  6. #6
    Join Date
    Aug 2008
    Location
    Toronto, Canada
    Posts
    2,367
    This image is only intended to be used by db2 itself during the rollforward. It will be read when db2 encounters a LOAD ...COPY YES log record.

  7. #7
    Join Date
    Apr 2009
    Posts
    16
    So once the Load command completes, these files still remain ,
    So, are they of no use for an end user to use at all?

  8. #8
    Join Date
    Aug 2008
    Location
    Toronto, Canada
    Posts
    2,367
    Yes, they're for db2 internal use only, not for any end users at all.

Posting Permissions

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