Db2 – Error While restoring DB2 db from AIX to AIX server

db2migrationrestore

I am required to migrate 1 database One AIX server to another AIX server.
To achieve, I took backup from 1 machine and followed below steps

1st Command I tried is as following.

db2 restore db DBNAME FROM /home/LOCATION taken at 20130912184605 into DBNAME1 REDIRECT generate script DBNAME1.sql

Which generated 1 sql file. Then I tired to run below command.

db2 -tvf DBNAME1.sql

I am getting following error

UPDATE COMMAND OPTIONS USING S ON Z ON DBNAME_NODE0000.out V ON
DB21005E  An error occurred while accessing the file "DBNAME_NODE0000.out".

Best Answer

Z ON DBNAME_NODE0000.out instructs the DB2 command line processor to redirect all output to a file named DBNAME_NODE0000.out in the current directory. Apparently, you don't have permissions to create files in that directory.