Since Oracle 10g, Oracle begins with Grid infrastructure and introducing RAC environment; while RAC stands for Real Application Clusters.
In this post, it focus on the simple notes of how to setup the service on the RAC environment.
If you are interested with the RAC infrastructure concept, please refer to the Oracle Grid Infrastructure.
(Still under construction)
Basic service setup procedure on a RAC environment is like below:
1. Add database, usually only one database to be added.
2. Add instances, usually the number of instances as same number of nodes.
ex: three instances and three nodes.
3. Add services.
command prompt demo:
Login to one of the node in the cluster, and use srvctl to accomplish this:
1. add database:
$ srvctl add database -d $DBNAME -o $ORACLE_HOME
-- adding the database, -d following the DBNAME, -o following the ORACLE_HOME
-- the environment parameter can be replaced with hard-coded name.
2. add instances:
$ srvctl add instance -d $DBNAME -i instance_name -n node_name (without domain name)
-- adding the instances, -d following the DBNAME, -n following the hostname, usually without
-- the domain name. This is repeated for each node in the cluster.
3. add services:
$ srvctl add service -d $DBNAME -s service_name -r primary_instance -a secondary_instance, secondary_instance
-- adding the services, -s following the service_name you want to specify, -r following the list of
-- primary nodes the service wants to direct the connection request to, and -a following the list of
-- secondary node when primary nodes are all not available.
-- This step may be repeated for each service you want to setup for the cluster.
-- A cluster may have multiple services.
4. Start the service:
$ srvctl start service -d $DBNAME -s service_name
-- this command will start the service. And usually it's' repeated for each service you setup on each
-- node if you have multiple services setup for the cluster.
5. Check the status of service:
$ srvctl status service -d $DBNAME
6. Obtain the config status of service
$ srvctl config service -d $DBNAME -s service_name -a
Example:
$ srvctl add dagtabase -d DB1 -o $ORACLE_HOME
$ srvctl add instance -d DB1 -i INST1 -n host1
$ srvctl add instance -d DB1 -i INST2 -n host2
$ srvctl add instance -d DB1 -i INST3 -n host3
$ srvctl add service -d DB1 -s SVC1 -r host1 -a host2, host3
$ srvctl start service -d DB1 -s SVC1
$ srvctl status service -d DB1 -s SVC1
$ srvctl status service -d DB1 --> list all services under database DB1
$ srvctl cnofig service -d DB1 -s SVC1 -a
No comments:
Post a Comment