Restoring a Datafile Using Archivelogs
Suppose a datafile that was recently added to the database is lost for some reasons. In this case, if the archive logs from the time the datafile was created are available, it is possible to recover that datafile. However, as mentioned, this operation has a very strict requirement: “All archive logs from the time the datafile was created must be available.” Below, we will walk through a scenario related to this topic. SQL > archive log list; Database log mode Archive Mode SQL > alter table space USEF_TBS add datafile ‘ / acfs / test2.dbf’ size 10 m; With the following commands, we create a new table that uses space from the new datafile so that after recovery we can verify that no data was lost. SQL > create table usef_tbl1 tablespace usef_tbs as select * from dba_tables where 1 = 2 ; SQL > alter table usef_tbl1 ALLOCATE EXTENT(DATAFILE ‘ / acfs / test2.dbf’ size 5 m); Table altered. SQL > insert into usef_tbl1 select * from ...