Case 1: History log is not overwritten (can be fully restored)
1 Switch to non-archive mode
Sql> Archive Log List
Database Log Mode Archive mode
Automatic Archival Enabled
Archive Destination/disk1/arch/anny
Oldest online log sequence 7
Next Log sequence to archive 10
Current log Sequence 10
sql> shutdown Immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
Sql> Startup Mount
ORACLE instance started.
Total System Global area 314572800 bytes
Fixed Size 1279964 bytes
Variable Size 58722340 bytes
Database buffers 251658240 bytes
Redo buffers 2912256 bytes
Database mounted.
sql> ALTER DATABASE Noarchivelog;
Database altered.
sql> archive log list;
Database log mode No Archive mode
Automatic Archival Disabled
Archive Destination/disk1/arch/anny
Oldest online log sequence 7
Current log Sequence 10
Sql>!
[ORACLE@SOLARIS10 ~] $rm/disk1/backup/anny/cold_bak/*
[ORACLE@SOLARIS10 ~] $rm/disk1/arch/anny/*
[ORACLE@SOLARIS10 ~] $exit
Exit
2 Redo the database fully prepared (consistent backup-cold backup)
-------back up all the datafile and Controlfile
Sql> @/export/home/oracle/sqlplus/anny_cold_bak--Execute Cold backup script
3) Simulation Environment
Sql> select * from V$log;
group# thread# sequence# BYTES members archived STATUS first_change#
---------- ---------- ---------- ---------- ---------- --------- ---------- ------------- -------------------
1 1 104857600 3 NO current 845923 2012-03-22 14:53:47
4 1 8 104857600 3 YES INACTIVE 801096 2012-03-21 18:22:29
3 1 9 104857600 3 YES INACTIVE 821972 2012-03-22 11:42:07
2 1 7 104857600 3 YES INACTIVE 779349 2012-03-21 17:13:00
4 rows selected.
Sql> select * from SCOTT.TB01;
Id
----------
111
222
333
3 Rows selected.
sql> INSERT into SCOTT.TB01 values (444);
1 row created.
sql> INSERT into SCOTT.TB01 values (555);