The Maximum Availability Architecture (MAA) is Oracle's best practices for near to zero best failover. It is based on proven Oracle high availability technologies and recommendations. The goal of the MAA is to remove the complexity in designing the optimal high availability architecture by providing configuration recommendations and tuning tips to get the most out of your architecture and Oracle features. This document explain step by step on how to create High Availability Service on grid control service.
This instructions assumes that you already have:
- Grid Control Setup
- Oracle RAC Database Installation
- Oracle Data Guard
STEPS
1.
Connect to Primary Database
2.
Run the below command
$ srvctl add
service –d <DATABASE> -s <SERVICE_NAME> -r <DB_INSTANCE1>,<DB_INSTANCE2>
-l PRIMARY –q FALSE –e NONE –m NODE –w 0 –z 0
3.
Configure the services on Primary Database
$ srvctl
config service –s <SERVICE_NAME> –d <DATABASE>
4.
Start the service on Primary Database
$ srvctl start
service –d <DATABASE> -s <SERVICE_NAME>
5.
Load the environment of grid_asm and check that
the service is STABLE and running OK
$ crsctl stat
res –t
i.e
ora.xxxxxx.xxxxxx_ha_jdbc.svc
1 ONLINE ONLINE
xxxxxxxxxxx STABLE
2
ONLINE ONLINE xxxxxxxxxxx STABLE
6.
Connect to Primary Database as SYSDBA and run
the below command only in one node
>SQL
BEGIN
DBMS_SERVICE.CREATE_SERVICE
(service_name =>'<SERVICE_NAME>',network_name =>'<SERVICE_NAME>',aq_ha_notifications
=> FALSE, failover_method =>'BASIC',failover_type
=>'NONE',failover_retries => 0,failover_delay => 0);
END;
/
7.
Create the trigger to Primary Database as SYSDBA
>SQL
create or
replace trigger START_HA_JDBC after startup on database
DECLARE
role
varchar(30);
BEGIN
select
database_role into role from v$database;
if
role='PRIMARY' then
dbms_service.start_service('<SERVICE_NAME>');
end if;
END;
/
8.
Connect to DR database and run the below command
only in one node
$ srvctl add
service –d <DATABASE> -s <SERVICE_NAME> -r <DB_INSTANCE1>,<DB_INSTANCE2>
-l PRIMARY –q FALSE –e NONE –m NODE –w 0 –z 0
9.
On
DR database configure the service name
$ srvctl
config service –s <SERVICE_NAME> –d <DATABASE>
10.
Connect
to DR Server and load environment grid_asm and check the service, the service should be OFFILINE
$ crsctl stat res –t
i.e
ora.xxxxxx.xxxxxxx_ha_jdbc.svc
1 OFFLINE OFFLINE STABLE
2 OFFLINE OFFLINE STABLE
11.
TNS
name must be change as follow
ALIAS_NAME =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = xxxx-scan)(PORT
= 1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = xxxx-scan)(PORT
= 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = <SERVICE_NAME>)
(FAILOVER_MODE = (TYPE = SELECT)(METHOD =
BASIC))
)
)
No comments:
Post a Comment