Nice!
> begin 2 for i in 1 ..10 3 loop 4 execute immediate 'alter system switch logfile'; 5 end loop; 6 end; 7 /
PL/SQL procedure successfully completed.
> archive log list; Database log mode Archive Mode Automatic archival Enabled Archive destination USE_DB_RECOVERY_FILE_DEST Oldest online log sequence 9 Next log sequence to archive 11 Current log sequence 11
> shutdown immediate; Database closed. Database dismounted. ORACLE instance shut down.
> startup mount; ORACLE instance started.
Total System Global Area 289406976 bytes Fixed Size 1248576 bytes Variable Size 104858304 bytes Database Buffers 176160768 bytes Redo Buffers 7139328 bytes Database mounted.
> recover database until cancel; Media recovery complete. > alter database open resetlogs;
Database altered.
> archive log list; Database log mode Archive Mode Automatic archival Enabled Archive destination USE_DB_RECOVERY_FILE_DEST Oldest online log sequence 0 Next log sequence to archive 1 Current log sequence 1
Mark J. Bobak wrote:
It's been a while, and this is from memory, but I don't believe you need
to re-create the control file. If I recall correctly, it's as simple
as:
shutdown immediate
(if you need to do an abort above, make sure you startup and shutdown
immediate, immediately following. Since you're resetting the on-line
redo, you need a clean shutdown.)
startup mount
recover database until cancel;
cancel
alter database open resetlogs;
-- "Oracle error messages being what they are, do not highlight the correct cause of fault, but will identify some other error located close to where the real fault lies."
-- //www.freelists.org/webpage/oracle-l