Resetting DB2 file permissions
Today something interesting happened at work. My windows system admin seems to have installed a patch on the OS without shutting down DB2. This seems to have screwed up the file permissions on the DB2 install directory. When we tried to start Db2 after the server restart, DB2 started giving SQL1042C.   A little bit of research confirmed that the install directory had lost its permission and db2instance userid was not able to read the files.
I executed the following command from the SQLLIB/BIN (windows) directory and it reset the permissions :
Set permissions for DB2 objects Command   :
db2secv82Â Â Â Â Â Â Â Â Â Â Â – > for DB2 V8.x
db2extsec             -> for DB2 V9.x
This also works on UNIX systems. Read up about the command on DB2 manuals before you execute it.