RAC allows for parallel database instance operating environments. These instances cooperate to share work and back each other up in case one of them fails. RAC can help with both planned and unplanned outages. It allows you to shift your processing from server to server with little to no interruption to your end users and applications.
A typical Oracle database is comprised of control files, data files, redo logs (the database), and memory+background processes (the instance). In this configuration, the database files can be mounted and accessed by only one machine and one Oracle instance at a time.
With RAC, those files are shareable so that many machines and instances can access the same files. You can have (depending on certifications and versions) 100 database instances accessing the same shared database.
Like having two DBAs in the office:
*One can vacation while the other works (high availability)
*Both can work together on a large project to split the workload and meet an aggressive timeline (performance)
*Add a third person to meet workload requirements as the Oracle responsibilities grow (scalability)
Requires a set of database files on shared storage accessible by each node in the cluster.
Grid Infrastructure includes ASM + CRS
CRS = Cluster Ready Services - the clustering solutions that couples the database to the volume management solution. Must be installed before the database and installed in its own home directory (CRS_HOME). The database is installed in the ORACLE_HOME.
NETWORK = each node in a RAC has a minimum of three IP addresses: one for the public network, one for the private network interconnect, and a virtual IP address to support faster failover in the event of a node failure.
A minimum of 2 network cards are required to support RAC.
The Public network is used for all routine connections to and from the server.
The Interconnect network, or Private network, supports communication between nodes in the cluster, such as node status information and data blocks shared between nodes.
The Virtual IP address is the address signed to the Oracle listener process and supports rapid connect-time failover, which is able to switch the network traffic and Oracle connection to a different instance in the RAC much faster than a third-party solution.
Disk Storage = shared disk may or may not be a RAID device to support redundancy. If the disks are not mirrored, you can use the mirroring capabilities of ASM to provide performance and availability benefits.
SPFILE = resides on an ASM disk group and is shared by each node in the cluster.
Dynamic Performance Views = in single-instance environment, all dynamic performance views with V$ have a corresponding view beginning with GV$.
RAC Maintenance = most maintenance operations that are performed on single-node instance apply directly to a multiple-node RAC environment.
Starting Up a RAC = during database startup, the ASM instance starts and mounts the shared disk groups; next, the RDBMS instance starts and joins the cluster.
Redo Logs in a RAC Environment = each instance in a RAC environment has its own set of online redo log files that are used to roll forward all information in the redo logs and then roll back any uncommitted transactions initiated on that node using the undo tablespace.
Even before the failed instance has restarted, one of the surviving instances detects the instance failure and uses the online redo log files to ensure that no committed transactions are lost; if this process completes before the failed instance restarts, the restarted instance does not need instance recovery. If all instances in a RAC fail, the first instance that starts up will perform instance recovery for the database using the online redo log file s from all instances in the cluster.
If media recovery is required and the entire database must be recovered, all instances except for one must be shut down and media recovery is performed from a single instance. If recovering noncritical database files, all nodes may be up as long as the tablespaces containing the files to be recovered are marked as OFFLINE.
Undo Tablespaces in a RAC Environment = Each instance in a RAC environment must have its own undo tablespace on a shared drive or disk group. Undo tablespace is used for rolling back transactions during normal transactional operations or during instance recovery. The undo tablespace is used by other nodes in the cluster to support read consistency for transactions that are reading rows from a table on node rac2 while a data-entry process on node rac1 makes updates to the same table and has not yet committed the transaction. The user on rac2 needs to see the before-image data stored in rac1's undo tablespace. This is why all undo tablespaces must be visible to all nodes in the cluster.
Tuning a RAC Node = The first step in tuning a RAC node is to tune the instance. If individual instances are not tuned correctly, the performance of the entire RAC will not be optimal. Use AWR to tune a instance as if it was not part of a cluster. With Cloud Control 12c, the AWR can be used to produce reports on a RAC-wide basis.
Comments