2

I had made backup from remote IBM DB2 server in AIX using this command:

./db2 backup database DBEMP to /home/dbemp/backup

Then I grab the backup file using FTP Client from my Windows.

I run this command to restore the database in my local machine:

./db2 restore database DBEMP from "C:\backup" TAKEN AT 20130521002219

But I got this error message:

SQL2570N An attempt to restore on target OS "NT-64" from a backup created on source OS "AIX-64" failed due to the incompatibility of operating systems or an incorrect specification of the restore command. Reason-code: "1".

So what is the solution for this?

1 Answer 1

3

You cannot restore a DB2 database from AIX into Windows because of the endian. These are not compatible architectures.

For more information, check the InfoCenter: http://publib.boulder.ibm.com/infocenter/db2luw/v10r1/topic/com.ibm.db2.luw.admin.ha.doc/doc/c0005960.html

The only way to retrieve the data between these platforms is via db2look + db2move.

9
  • +1 to answer. We use db2look and db2move where we are. db2move currently includes a "look" in it, but this is not guaranteed to stay that way in the future per what I've read from IBM. Use the db2look for the schema and the db2move for your data. We use this to ship developers (who use Windows) schema and data from our AIX systems. Commented May 21, 2013 at 12:46
  • thanks for the response. I tried the db2move to import with replace/replace_create option, but it can't overwrite the existing database, so I had to drop the database first. Is there a command to import and overwrite the database at once?
    – null
    Commented May 21, 2013 at 15:15
  • db2move includes the DDL for tables (as export files are in IDX format), but not for other objects. This is the reason it is necessary to use db2look (stored procedures, sequences, functions, etc.)
    – AngocA
    Commented May 21, 2013 at 15:59
  • Is db2lookup and db2move are included in IBM Data Studio? I prefer to do it in GUI tool if possible.
    – null
    Commented May 22, 2013 at 4:02
  • No, I don't believe they are. They are executable programs (and thus "commands") on the command line for DB2. So these you will have to use command line access for. Commented May 22, 2013 at 13:19

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.