Page 1 of 2 12 LastLast
Results 1 to 15 of 18
  1. #1
    Join Date
    Aug 2010
    Posts
    8

    Unanswered: restoring db2 database.

    Hello All,

    I have got a database backup with name as below....

    "EHA0710.0.db2inst1.NODE0000.CATN0000.201008101504 36.001"

    This I want to restore to my database EHA0710, which I have created
    myself using DB2 express c "control center".

    But when I try to restore It by right clicking on the database and then restore
    option It says that.....

    "SQL2532N The backup file contains the backup image of database
    "EHA0710" taken at timestamp "20100810150436". This is not the
    backup image requested."

    What should I do ? I need this database badly.

    Thanks in advance.

  2. #2
    Join Date
    Jan 2003
    Posts
    4,292
    Provided Answers: 5
    I have several questions:

    1) What DB2 version and OS are you using?
    2) Where did the backup image come from? Was it the same database you are trying to restore into? Did it come from the same server?
    3) What is the restore command you are trying to use to restore the database?

    Andy

  3. #3
    Join Date
    Apr 2009
    Posts
    42
    do you enter a wrong timestamp in the control centre when control centre is trying to look for the image ? 20100810150436 is what you should enter

  4. #4
    Join Date
    Aug 2008
    Location
    Toronto, Canada
    Posts
    2,367
    Some additional things you can try:

    - drop db you created yourself and retry the restore (from the command line)
    - if you transferred this image from another server, make sure it was done using binary mode (you can use db2ckbkp to verify that the image is good)

  5. #5
    Join Date
    Sep 2008
    Location
    Toronto,Canada
    Posts
    655
    Code:
    >db2 drop db EHA0710
    DB20000I  The DROP DATABASE command completed successfully.
    >db2 restore db EHA0710 
    DB20000I  The RESTORE DATABASE command completed successfully.
    OR

    Code:
    >db2 restore db EHA0710 replace existing
    SQL2539W  Warning!  Restoring to an existing database that is the same as the backup image database.  The database files will be deleted.

  6. #6
    Join Date
    Aug 2010
    Posts
    8
    Quote Originally Posted by ARWinner View Post
    I have several questions:

    1) What DB2 version and OS are you using?
    2) Where did the backup image come from? Was it the same database you are trying to restore into? Did it come from the same server?
    3) What is the restore command you are trying to use to restore the database?

    Andy
    1) Version DB2 v9.7.200.358

    2) The backup image came from clients production environment
    which their previous vendors had set up for them. ( may be from their
    server.)

    3) I am not trying any restore command. I am using the db2 express c
    to restore the database and It gives a command before restoring, that
    is as follows.

    ********
    RESTORE DATABASE EHA0710 FROM "C:\DB2" TAKEN AT 20100816171950 WITH 2 BUFFERS BUFFER 1024 PARALLELISM 1 WITHOUT ROLLING FORWARD WITHOUT PROMPTING;
    ********

    I am not sure what db2 version the previous vendor was using.

  7. #7
    Join Date
    Aug 2010
    Posts
    8
    Quote Originally Posted by wilsonfv View Post
    do you enter a wrong timestamp in the control centre when control centre is trying to look for the image ? 20100810150436 is what you should enter
    when I try to restore the database through db2 express c tool.
    I provide it with the image name and the timestamp that is mentioned in
    the image provided by the client. (which may be different from the database on which I try to restore. I try to restore clients image on the database I created myself.)

  8. #8
    Join Date
    Sep 2008
    Location
    Toronto,Canada
    Posts
    655
    Quote Originally Posted by Vish_1x1 View Post
    1)
    3) I am not trying any restore command. I am using the db2 express c
    to restore the database and It gives a command before restoring, that
    is as follows.

    ********
    RESTORE DATABASE EHA0710 FROM "C:\DB2" TAKEN AT 20100816171950 WITH 2 BUFFERS BUFFER 1024 PARALLELISM 1 WITHOUT ROLLING FORWARD WITHOUT PROMPTING;
    ********
    Definitely, you are trying to restore the database. No matter it is GUI or commnad line.

    This should work in any case because the image seems to be an offline backup image ( I am not sure if image comes from ver 5 or v6 ).

    Regards

  9. #9
    Join Date
    Aug 2010
    Posts
    8
    Quote Originally Posted by DBFinder View Post
    Code:
    >db2 drop db EHA0710
    DB20000I  The DROP DATABASE command completed successfully.
    >db2 restore db EHA0710 
    DB20000I  The RESTORE DATABASE command completed successfully.
    OR

    Code:
    >db2 restore db EHA0710 replace existing
    SQL2539W  Warning!  Restoring to an existing database that is the same as the backup image database.  The database files will be deleted.
    Thanks Every one for your valuable feedback.

    If I have the image file as below

    EHA0710.0.db2inst1.NODE0000.CATN0000.2010081015043 6.001

    what would be the restore command for that.

    I tried the restore command as specidied by you "db2 restore db EHA0710"
    but it says
    **********
    SQL2542N No match for a database image file was found based on the source
    database alias "EHA0710" and timestamp "" provided.
    **********

  10. #10
    Join Date
    Sep 2008
    Location
    Toronto,Canada
    Posts
    655
    Quote Originally Posted by Vish_1x1 View Post
    Thanks Every one for your valuable feedback.

    If I have the image file as below

    EHA0710.0.db2inst1.NODE0000.CATN0000.2010081015043 6.001

    what would be the restore command for that.

    I tried the restore command as specidied by you "db2 restore db EHA0710"
    but it says
    **********
    SQL2542N No match for a database image file was found based on the source
    database alias "EHA0710" and timestamp "" provided.
    **********
    The one you pasted already. The simplest version will be as I said

    Code:
    db2 restore db EHA0710
    when you are in the same folder as image.


    or

    Code:
    db2 restore db EHA0710 from C:/DB2
    from anywhere.


    regards

  11. #11
    Join Date
    Sep 2008
    Location
    Toronto,Canada
    Posts
    655
    Seems that the image was created on Linux platform. You may have to restore it on Linux box, then export data or db2relocate or db2move, in fact I am not sure at this moment.

    I will find out more for you.

    regards

  12. #12
    Join Date
    Aug 2010
    Posts
    8
    Quote Originally Posted by DBFinder View Post
    The one you pasted already. The simplest version will be as I said

    Code:
    db2 restore db EHA0710
    when you are in the same folder as image.


    or

    Code:
    db2 restore db EHA0710 from C:/DB2
    from anywhere.


    regards
    Thanks so much for immediate reply.
    I just tried out as you said

    db2 => restore db EHA0710 from C:\DB2

    This was the out come......
    *************************
    SQL2570N An attempt to restore on target OS "NT-32" from a backup created on
    source OS "Linux-IA32" failed due to the incompatibility of operating systems
    or an incorrect specification of the restore command. Reason-code: "1".
    *************************

    I am using windows 7.....

  13. #13
    Join Date
    Sep 2008
    Location
    Toronto,Canada
    Posts
    655
    Better,

    I had indicated that. Now you are almost clear.

    Only way can be to restore it on similar system and move it via some utility or native db2 commands. I have never done that; but there are many experts on this forum to help out.

    regards

  14. #14
    Join Date
    Aug 2010
    Posts
    8
    Quote Originally Posted by DBFinder View Post
    Better,

    I had indicated that. Now you are almost clear.

    Only way can be to restore it on similar system and move it via some utility or native db2 commands. I have never done that; but there are many experts on this forum to help out.

    regards

    Thank you so much for the help. I will try to restore it on linux platform and
    then move it to some other server. Will keep the tread updated with all my progress and findings ......

    Thanks ALL .

  15. #15
    Join Date
    Aug 2010
    Posts
    8
    Hello All,

    Any latest version of db2ecpress installer on linux can help me restore the database on linux. am I right?

    or do I need to get any specific varsion of db2 to restore my image file.

Posting Permissions

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