– The database is in archive mode.
– Shutdown the database and make a backup of the oradata file.
– Restart the database and using “select * from vslog; ” get the current sequence number
– alter system switch log file;
Making a cold backup (i.e. while the database is shutdown):
cp data/* /backup-data
Connect using SQLPlus, enter data and create an archive log.
insert into hr.ColdBackUpTest values(‘sample’);
alter system switch logfile;
shutdown abort; (if for example there is a power outage)
In order to test this example scenario, delete the datafiles.
note : On Microsoft systems, it isnt possible to delete datafiles without shutting down the database and exiting SQLPlus.
the same isnt necessary on unix/linux systems, datafiles can be deleted without having to shutdown the database or exit SQLPlus.
Start the database, while remaining in mount mode.
– the only thing pending is to copy the *.dbf files to paths of the files.
ERROR at line 1:
ORA-01113: file 1 needs media recovery
ORA-01110: data file 1: ‘/oracle/oradata/data/system01.dbf’
If prompted, select the AUTO option.
The previous command will show that the data has arrived. This table wasn’t available in the coldbackup and was taken from the archive logs.