Monday, September 12, 2011

Run Oracle Database in distinct resource pools in global container

Suppose you have created three resource pools namely:
  • rac1Pool
  • rac2Pool
  • rac3Pool
You want to run four Oracle database instances in each of these three pools and in the global pset.
You can do so by creating 3 additional oracle users namely oracle_2, oracle_3 and oracle_4. All these users should have the same group as oracle user  and different (distinct)  home directory . Also, ensure that Oracle user home directory has group write permission. The command to create additional users is as under:
  • useradd -g oinstall -G dba -u 202 oracle_2
  •  useradd -g oinstall -G dba -u 203 oracle_3
  • useradd -g oinstall -G dba -u 204 oracle_4
Next, create three projects with following pool and user association:
rac1Project ---> rac1Pool---->oracle
rac2Project---->rac2Pool----->oracle_2
rac3Project---->rac3Pool----->oracle_3
You can create the above mentioned associated by issuing the following command:
1)Create a project , associate it with right user and pool:
  • projadd -U oracle -p 400  -K project.pool=rac1Pool rac1Project 
  • projadd -U oracle_2 -p 402  -K project.pool=rac2Pool rac2Project 
  • projadd -U oracle_3 -p 403 -K project.pool=rac3Pool rac3Project
Additonal info : http://docs.oracle.com/cd/E26502_01/html/E29024/rmpool.task-41.html#rmpool.task-46

2)Associate the user with right project  


edit /etc/user_attr and add the following line
  • oracle::::project=rac1project  (add four colons after oracle)
  • orace_2::::project=rac2Project
  • oracle_3::::project=rac3Project
3) Re-login as the use and verify that it is associated with right project
  •  id -p

No comments:

Post a Comment