You just installed DB2 as non-root user on Linux and when you attempt to start your instance with the db2start command, you get the following message:
"SQL1220N The database manager shared memory set cannot be allocated."
Depending on which version of DB2 you’re using, and who knows what else, you could try one or more of the following solutions.
1) Set INSTANCE_MEMORY to AUTOMATIC
Issue the following command:
db2 update dbm cfg using INSTANCE_MEMORY AUTOMATIC
And then try to start the DB again.
2) Change shared memory size on Linux
You might need to increase the shared memory size of your Linux installation. Sometimes this value is set too low and DB2 doesn’t like that. For instance for 512MB of shared memory, try the following:
sudo -s "echo 536870912 > /proc/sys/kernel/shmmax"
Then try to start the DB again. If this works, you can make this setting permanent by adding the following line to /etc/sysctl.conf:
kernel.shmmax=536870912
3) Create sqllib/.ftok file
In some cases, the file sqllib/.ftok is not created during the DB instance creation process. To fix this, run db2ftok
located under sqllib/bin. This will create a new .ftok file. After that, try to start the DB again.