Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

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?

share|improve this question
add comment

1 Answer

up vote 2 down vote accepted

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.

share|improve this answer
    
+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. –  Chris Aldrich May 21 '13 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? –  suud May 21 '13 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 May 21 '13 at 15:59
    
Is db2lookup and db2move are included in IBM Data Studio? I prefer to do it in GUI tool if possible. –  suud May 22 '13 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. –  Chris Aldrich May 22 '13 at 13:19
show 4 more comments

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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