4.12 Database files in RAC

 < Day Day Up > 



In a RAC environment, most of the database-related files are shared between the various instances. However, there are certain files, such as the redo log files, parameter files, archive log files, etc., that are not shared. In the sections below, the various files and their behaviors in a RAC implementation are explored.

4.12.1 Parameter file

The parameter file contains parameter definitions required for the functioning of an instance. While these parameters are instance-specific, certain parameter values have identical values in all the instances participating in the clustered configuration. It is a common practice to keep the parameters that have identical values separate from the parameters that have values specific to an instance. The main purpose of this isolation is for easy maintenance, allowing only a single point for modification of parameter values across instances. It would also be beneficial under RAC to maintain a single copy of the parameter file that is shareable by both instances. Under Oracle 9i this has been made possible.

Parameter files have a new definition syntax that allows storing of all parameters that are unique and common to both instances in one file. This file can then be stored in the shared disk subsystem with soft links, allowing visibility to a single file from both instances.

Examples of parameter values shared across instances would be:

  • CONTROL_FILE

  • CLUSTER_DATABASE

click to expand
Figure 4.10: Database files in a RAC configuration.

By qualifying the parameter with a ''*,'' or the name of the instance, the parameter could be made applicable to either both instances or to a specific instance:

*.CONTROL_FILE  =  RAC1.UNDO_TABLESPACE  = UNDO_TBS1 RAC2.UNDO_TABLESPACE  = UNDO_TBS2 *.DB_BLOCK_SIZE  = 16K
Oracle 9i 

New Feature: The requirement to maintain separate parameter files in the previous versions of Oracle is removed with the new qualification option available in Oracle 9i.

The parameter file that used to be in ASCII text format is replaced with a binary file that could be made shareable. All modifications to this file are through an active instance.

Figure 4.10 illustrates the Oracle instances in a RAC configuration and the files that are common and those that are required for every instance. For example, the control files are common, whereas the alert log files, redo log file, etc., are required for every instance.

4.12.2 Data files

Data files are files that contain data shared by all instances participating in the cluster; those that reside on a shared disk subsystem. In order for an instance to function, all data files should be created as shareable. These files are verified during instance startup and when new data files are added to the database.

4.12.3 Control files

All instances share the control files and should have access to the control files during startup, to keep track of regular activities of the database. In an environment where file systems are not supported, such as Sun clusters, control files should reside on a raw partition.

Since the control file is shared across all instances participating in the cluster, it contains instance-specific information pertaining to redo log files. For example, the redo log thread details, log file history information, archived log records information, etc. All of this information could be viewed by querying the data dictionary views.

4.12.4 Online redo log files

The redo logs contain information relating to an instance and reside in the shared database. This helps in recovery operations during an instance failure. The other instances have access to the file and could use it for recovery purposes.

Users on an instance make changes to the data and these values are stored in a rollback segment or in an undo tablespace. When the LGWR writes the information to disk it updates the log files.

As in a single instance configuration of Oracle, each instance contains at least two groups of the redo log files. To identify a set of redo logs created by an instance from that of another, the redo log files are organized into threads. While group numbers are unique to a database, assignment of threads is arbitrary.

Like in the case of a single instance configuration, there are no restrictions to the number of members in a group; however, it is advisable to create groups that contain the same number of members. Conversely, in a RAC implementation, each instance must have at least two groups of redo log files. When one group fills up, a log switch happens and the instances start writing to the next group. At each log switch Oracle writes information to the control files.

Each log is identified by its thread number, sequence number (within thread), and the range of SCNs spanned by its redo records. This information is stored in the thread number, sequence number, low SCN, and next SCN fields of the log file header.

The redo records in a log are ordered by SCN, and redo records containing change vectors for a given block occur in increasing SCN order across threads. Only some records have SCNs in their header; however, every record is applied after the allocation of the SCN appearing with or before it in the log. The header of the log contains the low SCN and the next SCN. The low SCN is the SCN associated with the first redo record. The next SCN is the low SCN of the log with the next higher sequence number for the same thread. The current log of an enabled thread has an infinite next SCN, since there is no log with a higher sequence number.

For each log file, there is a control file record that describes it. The index of a log's control file record is referred to its log number. These log numbers are equivalent to log group numbers and are globally unique across all threads.

4.12.5 Archived redo log files

As redo log files store information pertaining to a specific instance, archive files, which are copies of redo log files, also contain information pertaining to that specific instance. As in the case of redo log files, write activities to the archived redo log happen from only one instance. However, for easy recovery, these files should be visible from all instances.

Note 

On hardware platforms that require usage of raw partitions for implementation of RAC, it is required that the archived redo log files are stored on file systems. This is due to the fact that archived logs are written to a specific destination. On a raw partition, writing multiple files to the same destination overwrites the existing files, thus losing them.

4.12.6 Other files

Files that contain instance-specific information, such as the alert logs or the trace file generated for the various background and foreground processes, are maintained for every instance.



 < Day Day Up > 



Oracle Real Application Clusters
Oracle Real Application Clusters
ISBN: 1555582885
EAN: 2147483647
Year: 2004
Pages: 174

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net