0

I'm trying to restore a DB from a Linux system to a Windows. I'm working with DB2 9.7.7. I want to create a new DB with the restored DB. The DB file has this name: DBBACKUP.0.db2inst1.DBPART000.20140614125950.001 and I've the file under /home/db2inst1 folder. So, logged as DB2 administrator (db2inst1), I'm trying with this command:

db2inst1@machine:/data/home/db2inst1> db2 restore db DBBACKUP

or

db2inst1@machine:/data/home/db2inst1> db2 restore db DBBACKUP taken at 20140614125950

and it returns me:

SQL2542N No match for a database image file was found based on the source database alias "DBBACKUP" and timestamp "" provided.

It can not find the database, but I don't know if the error is the name of the DB I put in the command, or the path is wrong.

Thanks.

5
  • You're missing the FROM clause in your RESTORE command.
    – mustaccio
    Commented Jun 17, 2014 at 17:16
  • Also, is your database really called "DBBACKUP"?
    – mustaccio
    Commented Jun 17, 2014 at 17:22
  • What does db2ckrst -d DBBACKUP -t 20140614125950 say? Commented Jun 17, 2014 at 18:00
  • Does it matter that you are running the command from the /data/home/db2inst1 directory while the file you say is located in /home/db2inst1?
    – Andriy M
    Commented Jun 18, 2014 at 16:48
  • @Lennart Based on the file name the backup image is a full backup; however it's possible that someone renamed the file, so it might be worthwhile to do db2ckbkp -H DBBACKUP.0.db2inst1.DBPART000.20140614125950.001 and see what proper name of the file should be. Commented Jun 20, 2014 at 17:36

1 Answer 1

0

Thanks all for your answers.

Finally I asked the guy who had give me the copy of the database. It came from a Linux, and I was trying to restore in a Windows, so I think this was the main problem. I tried to do the restore on a Linux-Suse, and it worked.

Once more, it is good to start with the most obvious... sorry, and thanks!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.