Configure Services using Policy Managed Method on Oracle RAC 11G

oracle-11g-logo

On the Oracle Real Application Clusters (Oracle RAC) 11G you can create services for clients use to connect to one or several instances using  either Oracle Enterprise Manager or SRVCTL. Moreover, it is important you know the managed methods for configure the services and what are the activities that you can do in a service.The activities are show below:

  • Delete a service
  • Check the status of a service
  • Start or stop a service for a database or an instance
  • Map a service to a consumer group
  • Enable or disable a service for a database or an instance
  • Relocate a service to a different instance

The managed methods are Administrator-managed (manual) or Policy-managed. Using Administrator-managed database for a service you define the instance that will support the service by the command SRVCTL with -r option (preferred instances) and SRVCTL with -a option (available instances). Therefore, using Policy-managed you define the service to a server pool through command SRVCTL with -g option and can define weather the service will run in all instance  (Uniform) or in an unique instance (Singleton) through the server pool.

Then, in this post I will show an example creating a service with Administrator-managed (manual) and Policy-managed.

Configure Services using either Manual or Policy Managed Methods

Then, in this post I will show an example creating a service with Policy managed method.

Set the environment variable to your database(in my case instance bd1 ) and run the command below to show the actual managed method:

1

srvctl config database -d unique_name

02

Was showed that the database is Administrator-managed, the default configuration.  Then, let’s start to change the configuration from Administrator-managed to Policy managed method.

We need to create a server pool ( In my case I will create a server pool called techdata and configure 2 numbers of server to the server pool):

srvctl add srvpool serverpool_name -l 0 -u 2

3

srvctl config srvpool  (to see the servers pool )

4

Ok, the server pool techdata was created. But now you have to add the database to the new server pool using the command below:

srvctl modify database -d unique_name -g serverpool_name

5

Now, let’s check wether the database is in Policy managed method through the first command srvctl config database -d unique_name

6

Ok, we achieved our goal. But can you go back to Administrator-managed? It is possible, but you have to stop the database and remove it from the Cluster. Then , hands-on…

srvctl stop database -d unique_name

srvctl remove database -d unique_name

7

Then, let’s add the database to the cluster and assign all the instances to the database:

srvctl stop database -d unique_name
srvctl remove database -d unique_name
srvctl add database -d RAC -n host_node -o $ORACLE_HOME -p  spfile_path  -a disk_groups
srvctl add instance -d RAC -i instance_1 -n host1
srvctl add instance -d RAC -i instance_2 -n host2

Finally , check the configuration using the command srvctl config database -d unique_name

8

References:

Oracle® Real Application Clusters Administration and Deployment Guide 11g Release 2 (11.2) E41960-03
3 Administering Database Instances and Cluster Database

 

icon2

 

Related posts

Leave a Comment