Thursday, December 21

Using Solaris projects with Oracle

In older versions of Solaris (9 and earlier) we used to set the system resource control in /etc/system, in Solaris 10 and later we do it in a neater way. No more reboots or mocking about, all online, even while Oracle is running.
It's all about projects now.
I've just finished installing 10gR2 under Solaris Express Community Release Build 54 (long name ey?) under VMware on my new laptop.
Example project:
root@solvm[~]$ projadd -U oracle -K \
"project.max-shm-memory=(priv,4g,deny);\
project.max-sem-nsems=(priv,256,deny);\
project.max-sem-ids=(priv,100,deny);\
project.max-shm-ids=(priv,100,deny)" oraproj

-- Lets review our project

root@solvm[~]$ su - oracle
Sun Microsystems Inc. SunOS 5.11 snv_54 October 2007
oracle@solvm[~]$ projects
default oraproj
oracle@solvm[~]$ projects -l oraproj
oraproj
projid : 101
comment: ""
users : oracle
groups : (none)
attribs: project.max-sem-ids=(priv,100,deny)
project.max-sem-nsems=(priv,256,deny)
project.max-shm-ids=(priv,100,deny)
project.max-shm-memory=(priv,4294967296,deny)
oracle@solvm[~]$
It's described slightly different in the Oracle installation manual but I'd say my way is slightly better. prctl is legacy. You can use usermod -K project=oraproj oracle to set the new project as the users default project (not really necessary)

3 comments:

Anonymous said...

I've recently tried to install
Oracle 10.2.0.2 on Nevada build 52.
Option performed : Software Install
Only.
DBCA and NETCA ran fine at the end
of install procedure.After all service restarted EM console looked
good enough.Connection to database
also worked properly. However,during linking phase I had
to ignore two exceptions. As install log showed up the second exception caused "extproc" not to be compiled.

JPH said...

I'd like to take this one step further and introduce Grid Control to the mix. How can you get Grid Control to start a database instance under a certain project in Solaris 10. I have a server with 3 database instances, each under their own project. Grid Control has no clue regarding projects and will always use the default. The only thing I can think of is if each instance used a different OS login (where each had the appropriate project). It may be a little late to do anything about it since the instances are already up, running and in production.

Hampus said...

I'm not familiar with Grid Control but one way to specify a project would be to use the newtask function in Solaris 10, preferably launching the process with the newtask command or by later using newtask -c PID to change to the project of a running process.