1. Create Table T2
SQL> create table t2 (
A1 number (10 ),
A2 char (10) tablespace users;
2. Insert two rows of data
SQL> insert into t2 values (33, 'cc ');
SQL> commit;
SQL> alter system switch logfile;
SQL> insert into t2 values (44, 'dd ');
SQL> commit;
3. The database is shut down abnormally and no check point is executed.
SQL> shutdown abort
Oracle instance shut down.
4. Simulate online log corruption
SQL> host rm-rf/database/ykg *. log
5. view the archive logs currently in use
SQL> archive log list
Database log mode Archive Mode
Automatic archival Enabled
Archive destination USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence 4
Next log sequence to archive 5
Current log sequence 5
6. Incomplete Database recovery
RMAN> run {
2> restore database;
3> recover database until sequence 5 thread 1;
4> alter database open resetlogs ;}
Note: after Incomplete recovery, you must immediately perform a full backup. You cannot perform Incomplete recovery twice in a row.