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 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".
share|improve this question

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.

share|improve this answer

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.

share|improve this answer

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.