Cluster database configuration can be Policy-Managed or Administrator-Managed. A Policy-Managed database has managed instances on the basis of server pools for the effective use of resources. An Admin-Managed database has instances connected to specific servers.
The following figure shows the differences in behavior.
Some benefits of the Policy-Managed configuration:
- Provides distribution according to demand.
- Manages business requirements effectively.
- Scales just in time.
- Maximizes data center efficiency.
By default, there are two server pools, GENERIC and FREE. We can display existing pools as follows.
1 2 3 4 5 6 7 | -bash-4.3$ srvctl config srvpool Server pool name: Free Importance: 0, Min: 0, Max: -1 Candidate server names: Server pool name: Generic Importance: 0, Min: 0, Max: -1 Candidate server names: oradb1,oradb2 |
Features of server pools :
min : (-l)
The minimum number of servers that must be protected in the server pool.
max : (-u)
Maximum number of servers allowed in server pool.
imp : (-i)
The server pool with an imp value is filled to the Min values first. imp determines the order of precedence.
By following these steps, you can convert a database that is created as Admin-Managed to a Policy-Managed database.
First, let’s look at our current configuration.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | -bash-4.3$ srvctl config database -d TESTDB Database unique name: TESTDB Database name: TESTDB Oracle home: /u01/app/oracle/product/11.2.0/dbhome_1 Oracle user: oracle Spfile: +DATA/TESTDB/spfileTESTDB.ora Domain: Start options: open Stop options: immediate Database role: PRIMARY Management policy: AUTOMATIC Server pools: TESTDB Database instances: TESTDB1,TESTDB2 Disk Groups: DATA,RECO Mount point paths: Services: Type: RAC Database is administrator managed |
Let’s create a new pool. The min and max values for the new pool are set to 2.
1 | -bash-4.3$ srvctl add serverpool -g testpool -l 2 -u 2 |
When we view existing pools, the pool we just created is visible.
1 2 3 4 5 6 7 8 9 10 | -bash-4.3$ srvctl config srvpool Server pool name: Free Importance: 0, Min: 0, Max: -1 Candidate server names: Server pool name: Generic Importance: 0, Min: 0, Max: -1 Candidate server names: oradb1,oradb2 Server pool name: testpool Importance: 0, Min: 2, Max: 2 Candidate server names: |
Now, we can convert our database.
1 | -bash-4.3$ srvctl modify database -d TESTDB -g testpool |
The database configuration will now appear as policy managed.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | -bash-4.3$ srvctl config database -d TESTDB Database unique name: TESTDB Database name: TESTDB Oracle home: /u01/app/oracle/product/11.2.0/dbhome_1 Oracle user: oracle Spfile: +DATA/TESTDB/spfileTESTDB.ora Domain: Start options: open Stop options: immediate Database role: PRIMARY Management policy: AUTOMATIC Server pools: testpool Database instances: Disk Groups: DATA,RECO Mount point paths: Services: Type: RAC Database is policy managed |
Now our database is policy managed. Our database will run when there is an appropriate server for the testpool we created above. We can check the status of the server repositories as follows.
1 2 3 4 5 6 7 | -bash-4.3$ srvctl status serverpool Server pool name: Free Active servers count: 0 Server pool name: Generic Active servers count: 0 Server pool name: testpool Active servers count: 2 |