In Oracle
Database 11g, Oracle brought about a lot of features. One of the major change
was the implementation of SCAN (Single Client Access Name). So this feature is
not understood by many people. So this article will helps you to definitively
know what SCAN is.
But
before, let us understand how an application connects and works to the
Database.
When an
application connects to the Oracle Database, it contacts a listener would have
to then, get connected to the instance. When a RAC database, for example when
you have two nodes, there are two instances running on two different hosts which have their own
respective IP addresses. Additionally, the Clusterware which is the software
that manages the cluster would also have something called a Virtual Ip, VIP,
that it will assign to both the nodes:
So when
one instance goes down, the virtual Ip will fail over to the other node.
Thereby, when the request comes to connect to the VIP, It can communicate by
saying : That node is down and hence the client can now connect to another
node.
But how
the client will connect to the other node? Let's going back to the client
connectivity settings. On the application, you would now have not just a single
host name specified, instead you will list all the host name, which are part of
the cluster and you will not give the host name, instead you will give the VIP
name.
That
means, if you have four nodes cluster, you would have four host names for Ip
addresses which managed by the operating system. Apart from that, when you
create the cluster, you will give 4 VIPs and 4 VIP names or VIP host names,
which will be associated with all the 4 nodes.
The host
names and the Ips address are managed by the operating system, whereas the VIP
and the VIP names are managed by the clusterware.
So, when
the node 1 goes down, the VIP will fail over to another node and it will still
respond, but you notice that the VIP will take a new connection request when it
has failed over. It's only going back to the application to say that : That VIP
is down. So in your client, you will list all the VIPs. If it want connect, it
can look at any one of the VIPs and get connected. In our case above, it will
try the first VIP, if it could connect, it gets connected. If not, it will try
the second. If not it will try the third etc. That is how in RAC environment,
VIPs come playing with the application. So Application don't necessary need to
know which nodes are up. The process of connection will take care of Connect
Time Failover. If node one has failed, the VIP on node one will have failed
over to area, one of the remaining nodes and when the connection request comes,
it will immediately tell the client : "Hey I'm not available, please try
other node".
This is
what database connectivity was established prior Oracle RAC Database 11g
release 2. But from 11g release 2 they brought about SCAN. To understand the
SCAN, we need first to understand one or more aspect called SERVER POOLS. This
will be the purpose of the next article.
Aucun commentaire:
Enregistrer un commentaire