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".
2 Answers 2
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.
If you have problems like this, just copy the number of the error and search for it in the information center. In your case, it says
The following could have caused the error:
- file permissions do not allow file access
- the file does not exist
When it comes to file permissions in AIX, you need to make sure that users of type "others" can access the file.