The RAC Environment. Each instance corresponds to the corresponding Redolog set (at least 2) and the corresponding undo table space.
Instance recovery:
instance recovery for single instance databases:
Redo: All committed and uncommitted operations are rolled forward
Undo: All uncommitted actions are rolled back
Instance recovery for a RAC environment:
When a instance of node A crashes, Node B automatically rolls back in Undo (immediately) based on Redolog, without waiting for the instance of node A to resume normally. (Instance recovery is performed by the remaining nodes, and if the instance crashes, there is a first instance node that is started to recover
)
Eg: can be seen in Alarmlog
Post Smon to Start 1st pass IR
-------------------------------
Instance Recovery:look for dead threads
———————————————
Beginning instance Recovery of 1 threads
———————————————
Start First Pass Scan
———————————————
Completed first pass scan
3941 Redo blocks read,165 data blocks need recovery
-----------------------------
Start Instance recovery ...
Media Recovery:
Media recovery refers to a corrupted database file or data file (set) that requires manual action.
Classification:
Media recovery of data files for an instance of RAC
Media recovery for the entire database: Close all other instances and install the database on the node that you selected for recovery.
Files that do not affect the database: This file needs to be taken offline.
Redo Thread:
Alter database Add logfile thread 2 Group 5 '/ocfs/oradata/.../redo02_05.log ' size 300M
Instance thread number: The SPFile parameter is <sid>. THREAD = n
How different storage devices are archived
1. Archive using raw device as file system
Raw: Each file must correspond to a raw disk slice, because there are more archive logs, so it is not suitable for storage on raw. Therefore, the general archive log is stored on the drives of each node. And because of the RAC environment, media recovery requires all archive logs for all instances, typically a dual-instance (only two-instance RAC) with a local archive directory on the drive with Node A, and Node B points the archive log of B to a in the NFS target directory, which in turn acts on B. So when any one node crashes or the archive logs are corrupted, you can ensure that the other node has all the archived logs for all nodes for media recovery.
2. Use the archive under OCFS (Clustered file system)
All nodes store their archive logs in the same archive directory on the OCFS.
But! Because in the shared archive directory, when a new archive log is created, other instances have a certain delay. So the common approach is that different instances have separate archive directories on the OCFS, and when media recovery is required, all archived logs are put into the same archive directory.
Archiving in a 3.ASM environment
ASM creates an archived log Flash zone (the archive log that holds all instances for 7 days by default), with other OCFS
Note that even if the instance of a certain point is closed but no redo thread is disabled, Redolog will still do log switchover to generate the archive log (to avoid excessive instance SCN and log gaps)
Disable the thread number ALTER DATABASE disable/enable public thread 3;
Undo in RAC: A separate undo_tablespace for each instance is located on the shared disk.
Parameters: <instance_name>. Undo_tablespace
Eg:alter system Set Undo_tablespace = <undo_tablespace> scope = Both sid = ' test3 ';
This article is from the "8091532" blog, please be sure to keep this source http://8101532.blog.51cto.com/8091532/1588904
Redo and undo management in RAC