Manages Services in RAC Environment

Managed Services in RAC Oracle 12c

Services is used for managed the workload in Oracle database and simplified the way of connection with application and group of application.
Divide the workload with help of services like OLTP , Batch , Reporting to simplified the bottleneck when issued occurred.
srvctl command is used to managed the services.Services integrated with resource manager
Services also control parallel operation in rac , by default all instance is used for parallel operations in RAC.

Characteristics for service
Service Name
Service Edition
Service management policy – Manual when service not start when database is start , Automatic when database start service automatic start
Database role
Instance preference – Specify the instance preference
Server pool Assignment
Load balancing advisory – Run time connection load balancing to choose the
Connection load balancing goal –

Note: Default database name service identified by db_unique_name if not set then db_name or pdb_name is as default service.

Creating and Managing the Services in RAC Oracle 12c

Create a new Service for ORCL database.

srvctl add service -db orcl -service GL -preferred NODE1,NODE2,NODE3

Check the Configuration of the Service created.

srvclt config service -db orcl -service GL

Create a service with available and preferred options

srvctl add service -db orcl -service AL -preferred NODE1,NODE2 -available NODE3

Create a service “ETL” with server pool with singleton option so that it will work only on one instance. Policy is manual means it doesnot start or stop automatically adminstrator do it manually to stop and start service

srvctl add service -db orcl -service ETL -serverpool SP1 -cardinality SINGLTON -policy MANUAL

Create a service “TRAN” with uniform cardinality so that it run all the node present in serverpool. Choose policy to automatic so it automatic start or stop with database

srvctl add service -db orcl -service TRAN -serverpool SP2 -cardinality UNIFORM -policy AUTOMATIC

Start the service in RAC

srvctl start service -db orcl -service GL
srvctl start service -db orcl -service AL

Check the status of the service in RAC

srvctl status service -db orcl -service AL
Service AL is running on instance(s) node1

Stop the Service in RAC

srvctl stop service -db orcl -service AL
-- Stop service on particular instance only
srvctl stop service -db orcl -service GL -instance NODE1

Disable the service in RAC environment

srvctl disable service -db orcl -service AL -instance NODE1

Changing the preferred and available instance

srvctl modify service -db orcl -service AL -modifyconfig -perferred NODE1, NODE2 -available NODE3

Relocate the service from NOde1 to Node3

srvctl relocate service -db orcl -service AL -oldinst NODE1 -newinst Node3

Manage Service for PDB database in RAC Environment
It is dynamic service we are created, default service is the service which is created when pdb database is created, it name as same pdb name or pdb name plus domain name.

Create a Service for PDB database
Note: you create it with policy automatic then you donot need to start the pdb database everytime when instance started

srvctl add service -db contdb -pdb pdb1 -service pdb1srv -serverpool sp1 -cardinality singleton -policy manual

serctl add service -db contdb -pdb pdb2 -service pdb2srv -serverpool sp1 -cardinality uniform -policy automatic
automatic is default

Start the service of PDB database:

srvctl start service -db contdb -service pdb1srv

Check the Status of the Service

srvctl status service -db contdb
Service pdb1srv is running on nodes: NODE1
Service pdb2srv is running on nodes: NODE1,NODE2

Check Service from sqlplus

select name, con_id from cdb_services;

Remove the service

srvctl remove service -db contdb -service pdb1srv

Restricted Service Registration
Restricted Service Registration is only for local ip address/ network. (subnet address is same). valid node checking is enabled by default.

Check the default setting for SCAN Listener when configured

srvctl config scan_listener

SCAN Listener LISTENER_SCAN1 exists. Port: TCP:1521
Registration invited nodes:
Registration invited subnets:
SCAN Listener is enabled.
SCAN Listener is individually enabled on nodes:
SCAN Listener is individually disabled on nodes:
SCAN Listener LISTENER_SCAN2 exists. Port: TCP:1521
Registration invited nodes:
Registration invited subnets:
SCAN Listener is enabled.
SCAN Listener is individually enabled on nodes:
SCAN Listener is individually disabled on nodes:
SCAN Listener LISTENER_SCAN3 exists. Port: TCP:1521
Registration invited nodes:
Registration invited subnets:
SCAN Listener is enabled.
SCAN Listener is individually enabled on nodes:
SCAN Listener is individually disabled on nodes:

Restricted Service to registered nodes on scan listener:

srvctl modify scan_listener -update -invitednodes host1,host2,host3

Restricted Service with Registered subnet on Scan Listener:

srvclt modify scan_listener -update -invitedsubnets 192.168.0.0/24,10.10.10.0/24

Check again the Scan listener setting:

#srvctl config scan_listener

SCAN Listener LISTENER_SCAN1 exists. Port: TCP:1521
Registration invited nodes: host1,host2,host3
Registration invited subnets: 192.168.0.0/24,10.10.10.0/24
SCAN Listener is enabled.
SCAN Listener is individually enabled on nodes:
SCAN Listener is individually disabled on nodes:
SCAN Listener LISTENER_SCAN2 exists. Port: TCP:1521
Registration invited nodes: host1,host2,host3
Registration invited subnets: 192.168.0.0/24,10.10.10.0/24
SCAN Listener is enabled.
SCAN Listener is individually enabled on nodes:
SCAN Listener is individually disabled on nodes:
SCAN Listener LISTENER_SCAN3 exists. Port: TCP:1521
Registration invited nodes: host1,host2,host3
Registration invited subnets: 192.168.0.0/24,10.10.10.0/24
SCAN Listener is enabled.
SCAN Listener is individually enabled on nodes:
SCAN Listener is individually disabled on nodes:

Note: when you add register nodes and subnet then listener.ora file is updated with parameters REGISTRATION_INVITED_NODES_LISTENER_SCAN

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s