Sunday, 14 June 2009

SQL0970N when running DB2SAMPL on Unix

*** HACK ALERT ***

If you're trying to implement DB2 UDB on Unix ( I'm using Red Hat Enterprise Linux ) and you keep getting: -

SQL0970N The system attempted to write to a read-only file.

when running SQL commands as a DB2 user ( db2inst1 in my case ), it is worth checking that the user has write access to the /tmp directory.

I hit this when running db2sampl as db2inst1 which should create a sample database which allows me to test that DB2 is working OK.

As this is my own demonstration environment on VMware, I took the shortcut and merely gave ALL users write permission to the /tmp directory, using the command: -

chmod 777 /tmp

This gives EVERY SINGLE USER the right to read, write and execute files from /tmp which could be a security issue in a production environment.

Therefore, only do this if (a) you have a similar demo/test environment or (b) you really really really know what you're doing. If in doubt, consult a Unix sysadmin ( which I am categorically NOT NOT NOT ).

*** HACK ALERT ***

Comments: Post a Comment

<< Home

This page is powered by Blogger. Isn't yours?

Subscribe to Posts [Atom]