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
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.
-
+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– Chris Aldrich2013年05月21日 12:46:29 +00:00Commented 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– null2013年05月21日 15:15:06 +00:00Commented 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– AngocA2013年05月21日 15:59:05 +00:00Commented 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– null2013年05月22日 04:02:10 +00:00Commented 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.Chris Aldrich– Chris Aldrich2013年05月22日 13:19:44 +00:00Commented May 22, 2013 at 13:19