Db2 express c mac osx

db2mac os x

I'm experiencing some troubles with the execution of DB2 express c on Mac OSX 10.6 Snow Leopard.

I have installed the db system, creating two users, db2 and db2-user. The latter is the instance owner. I have sourced db2profile and the env variables seem to be set correctly.

Db2 starts successfully, but I'm not able to run db2sampl, the error is:

Attempt to start DB2 instance failed.
SQL1019N  The node name "db2-user" specified in the command is not valid.

I have googled the error and it looks like I have to change the DB2INSTANCE variable, but I do not know what value should be.

Best Answer

You do not want to change DBINSTANCE. All that does is change what instance is the "main" one for your OS. And you only have one instance from what I understand (named db2 I believe). I'm betting this has more to do with permissions as you are attempting to run db2sampl, which I believe creates the sample database if I remember correctly. Instance owner should be able to run this without any issues.

If I were you, I would run db2sampl as instance owner and then perform your necessary GRANTs for db2-user once the database is there.