Why need to create a project for a DB2 instance owner and how ?
By Chang Shu on Sep 19, 2008
To run a DB2 database on a Solaris server, we need to set the System V tunables. Before Solaris 10, this is done by setting the kernel parameters in /etc/system. With Solaris 10, though the /etc/system settings are still valid, there are some drawbacks of using /etc/system file to set the System V tunables.
1. It is not available in Solaris Containers.
2. The system needs a reboot every time you change the file.
3. The settings affect the overall system.
We should use resource controls which have more advantages over /etc/system:
1. It is supported in Solaris Containers.
2. Any changes are dynamic, no reboot required
3. We can have different resource control settings for different DB2 instances or other applications running on the same system.
It is recommended to create a project for each DB2 instance owner. The simplest approach is to edit /etc/project file directly as user root. e.g.,
db2inst1 is the instance name. Become user db2inst1, run id(1M) command to verify the project user.db2inst1 has been associated with the user. e.g.,
uid=7001(db2inst1) gid=5001(db2iadm) projid=1234(user.db2inst1)
And run prctl(1M) command to verify the IPC resource control settings:
Alternatively, the project entry can also be set as the following,
in addition, add the following to /etc/user_attr,
DB2 provides a utility called
db2osconf to generate the recommended values for IPC tunables on the Solaris platform.
# ./db2osconf set msgsys:msginfo_msgmni = 20480 set semsys:seminfo_semmni = 24576 set shmsys:shminfo_shmmax = 123379030425 set shmsys:shminfo_shmmni = 24576
But the utility (in DB2 v8.x and v9.1) only prints out the kernel parameters, you can refer to System V IPC Configuration to map the kernel parameters to the resource controls.
In the latest DB2 V9.5 FP 3, the db2osconf utility has been enhanced to add the support for resource controls.