Using rac time, there are several very shiny use properties, is a load balance, this is no doubt, has really done a lot of improvement, load balance multiple vip addresses from Oracle 10g version of the beginning, to 11g version further load balance improved scan-ip, it has really done a great simplification.
In failover implementation, there are still some limited use, such as 11g default scan-ip default implementation of it is still no failover option, if two nodes linked to a node, then the original connection to continue query will prompt session has been disconnected, you need to reconnect.
Many applications are so used scan-ip, also we are at peace, so for failover option or a certain choice, if the failover implementation, in simple terms, mainly through the exchange of time or resources to achieve the exchange.
How to understand it.
We assume that there are two nodes, if a session is connected to the node 2, node 2 abruptly hung up, then there is a way through a failover for time or exchange resources.
For example, for time, in order to achieve faster speeds failover, failover method has preconnect, such pre-connection will still take up more resources, or will pre-empt some additional resources on each node, when switching relatively smoother, faster. This is the way preconect
Another case, in the event of a failover situation, go to the corresponding switching resources, there will be some intermediate Caton, but resources are relatively much smaller. This is the default basic mode.
failover method for the user to focus on when to create a connection to an instance, the basic approach will be taken to judge when a fault occurs, there is a delay of taste, preconnect is a rainy day, after the first ready, in the event of failure, faster switching from the actual applications, or basic in this way more versatile.
For failover type is, rac implementation richer and flexible, this is really unthinkable in other databases. This time it is that the particle size for the user to control the implementation of sql.
For example, we have a lot of queries on node 2, node 2 abruptly hung up the results, then this time, there are two types of failover, that the query is being executed, for example, there are 10,000 data, just when the results of failure detected 8000, then the remaining 2000 how to deal with.
One way is to use select, that is, failover completes, continue to record the rest of the 2000 return, of course, there will be some intermediate context switching for users or substantially transparent, but there will be some delay.
Another direct disconnected asked to re-query. This type is session
Vip by means of configuration to achieve load balance in the 10g version + failover configuration is as follows:
(ADDRESS = (PROTOCOL = TCP) (HOST = 192.168.3.101) (PORT = 1521))
(ADDRESS = (PROTOCOL = TCP) (HOST = 192.168.3.201) (PORT = 1521))
(LOAD_BALANCE = yes)
(FAILOVER = ON)
(SERVER = DEDICATED)
(SERVICE_NAME = racdb)
(TYPE = SELECT)
(METHOD = BASIC)
(RETRIES = 30)
(DELAY = 5))))
11g of scan-ip If you also want to extend failover, also need to set failover_mode and the corresponding type.
Of course there is a difference is in 10g we can to complete the configuration by dbca, is simple and clear.
In 11g, only by means of a command or EM to achieve. I do not know why this part of the graphical interface functions to get rid of.
In fact, the command is not too much trouble, we can use the following way to do a simple configuration.
For example, we have chosen to taf basic failover_mode created for racdb_taf
srvctl add service -d RACDB -s racdb_taf -r "RACDB1, RACDB2" -P BASIC
bash-4.1 $ crs_stat -t | grep taf
Name Type Target State Host
ora .... taf.svc ora .... ce.type OFFLINE OFFLINE
We open hand
srvctl start service -d RACDB -s racdb_taf
Then to configure more properties by dbms_service.
execute dbms_service.modify_service (service_name => 'racdb_taf', aq_ha_notifications => true, failover_method => dbms_service.failover_method_basic, failover_type => dbms_service.failover_type_select, failover_retries => 181, failover_delay => 5, clb_goal => dbms_service.clb_goal_long);
In the database you can easily view the service conditions.
SQL> select service_id, name from dba_services;
---------- ---------------------------------------- ------------------------
1 SYS $ BACKGROUND
2 SYS $ USERS
select name, failover_method, failover_type, failover_retries, goal, clb_goal, aq_ha_notifications from dba_services where service_id = 3;