• No se han encontrado resultados

2 Estado del arte

2.4 Sistemas tecnológicos para jardines inteligentes

2.4.1 Tipos de jardines

Oracle provides the capability to multiplex an instance’s online redo log files to safeguard against damage to its online redo log files. With multiplexed online redo log files, LGWR concurrently writes the same redo log information to multiple identical online redo log files, thereby eliminating a single point of online redo log failure.

Figure 2–2 illustrates duplexed (two sets of) online redo log files.

Note: The information that is recorded in the datafiles and con- trol files as part of a checkpoint varies if the Oracle Parallel Server configuration is used; see Oracle8 Parallel Server Concepts and Admin-

istration.

Note: Oracle recommends that you multiplex your redo log files; the loss of the log file information can be catastrophic if a recovery operation is required.

The Online Redo Log

Figure 2–2 Multiplexed Online Redo Log Files

The corresponding online redo log files are called groups. Each online redo log file in a group is called a member. Notice that all members of a group are concurrently active (concurrently written to by LGWR), as indicated by the identical log sequence numbers assigned by LGWR. If a multiplexed online redo log is used, each member in a group must be the exact same size.

The Mechanics of a Multiplexed Online Redo Log

LGWR always addresses all members of a group, whether the group contains one or many members. For example, after a log switch, LGWR concurrently writes to all members of the next group, and so on. LGWR never writes concurrently to one member of a given group and one member of another group.

LGWR reacts differently when certain online redo log members are unavailable, depending on the reason for the file(s) being unavailable:

■ If LGWR can successfully write to at least one member in a group (either at a

log switch or as writing to the group is proceeding), writing to the accessible members of the group proceeds as normal; LGWR simply writes to the avail- able members of a group and ignores the unavailable members.

■ If LGWR cannot access the next group at a log switch because the group needs

to be archived, database operation is temporarily halted until the group becomes available (in other words, until the group is archived).

Disk B Disk A LGRW 1, 3, 5, ... 2, 4, 6, ... ,     Group 1 Group 2 ,    B_LOG1 ,    B_LOG2 ,    A_LOG1 ,    A_LOG2

■ If all members of the next group are inaccessible to LGWR at a log switch

because of one or more disk failures, an error is returned and the database instance is immediately shut down. In this case, the database may need media recovery from the loss of an online redo log file. However, if the database check- point has moved beyond the lost log (this is not the current log in this exam- ple), media recovery is not necessary. Simply drop the inaccessible log group. If the log was not archived, you can disable archiving before the log can be dropped by using the ALTER DATABASE CLEAR UNARCHIVED LOG com- mand.

■ If all members of a group suddenly become inaccessible to LGWR as they are

being written, an error is returned and the database instance is immediately shut down. In this case, the database might need media recovery from the loss of an online redo log file. If the media containing the log is not actually lost — for example, if the drive for the log was inadvertently turned off — media recovery might not be needed. In this example, all that is necessary is to turn the drive back on and do instance recovery.

Whenever LGWR cannot write to a member of a group, Oracle marks that member as stale and writes an error message to the LGWR trace file and to the database’s ALERT file to indicate the problem with the inaccessible file(s).

To safeguard against a single point of online redo log failure, a multiplexed online redo log should be completely symmetrical: all groups of the online redo log should have the same number of members. However, Oracle does not require that a multiplexed online redo log be symmetrical. For example, one group can have only one member, while other groups can have two members. Oracle allows this

behavior to provide for situations that temporarily affect some online redo log members but leave others unaffected (for example, a disk failure). The only requirement for an instance’s online redo log, multiplexed or non-multiplexed, is that it be comprised of at least two groups. Figure 2–3 shows a legal and illegal multiplexed online redo log configuration. The second configuration is illegal because it has only one group.

The Online Redo Log

Figure 2–3 Legal and Illegal Multiplexed Online Redo Log Configuration

,    A_LOG3 Group 3   Group 1 Group 2 Group 3 Group 1 Group 2 ILLEGAL LEGAL Disk A ,  A_LOG1   A_LOG2 ,    B_LOG3   B_LOG2 Group 3 Group 1 Group 2 Disk A ,  A_LOG1 Disk B ,  B_LOG1 Disk B ,  B_LOG1