Hot BackupSystemTablespace
SQL> alter tablespace system beginbackup;
Tablespace altered.
SQL>! Cp/u01/tiger/oradata/orcl2/system01.dbf/bk
SQL> alter tablespace system end backup;
Tablespace altered
Then make some transactions
Destroy againSystemTablespace files
An error occurred while switching logs.
SQL>! Cp/etc/passwd/u01/tiger/oradata/orcl2/system01.dbf
SQL> alter system switch logfile;
Alter system switch logfile
*
ERROR at line 1:
ORA-03113: end of-file on communicationchannel
We reconnect to the database
SQL> conn/as sysdba
Connected to an idle instance.
SQL> startup
Oracle instance started.
Total System Global Area 314572800 bytes
Fixed Size 1219136 bytes
Variable Size 121636288 bytes
Database Buffers 184549376 bytes
Redo Buffers 7168000 bytes
Database mounted.
ORA-01122: Database file 1 failedverification check
ORA-01110:Data file 1: '/u01/tiger/oradata/orcl2/system01.dbf'
ORA-01251: Unknown File HeaderVersion read for file number 1
Query the files to be restored
SQL> select * from v $ recover_file;
FILE # ONLINE _ error change # TIME
---------------------------------------------------------------
1 online wrong file type 0
Learn1File No. needs to be restored
View the archive required for recovery
SQL> select * from v $ recovery_log;
No rows selected
At this time, you can see no archived logs.
At this time, the backup isSystem01.dbfCopy the file
SQL>! Cp/bk/system01.dbf/u01/tiger/oradata/orcl2/system01.dbf
Re-view the unrecovered file,
SQL> select * from v $ recover_file;
FILE # ONLINE _ error change # TIME
---------------------------------------------------------------
1 ONLINE 540503 06-SEP-12
Take a look at the recovered archive file
SQL> select * from v $ recovery_log;
THREAD # SEQUENCE # TIME
-----------------------------
ARCHIVE_NAME
Bytes ------------------------------------------------------------------------------------------------------------------------
1 1 06-SEP-12
/U01/tiger/flash_recovery_area/ORCL2/archivelog/2012_09_06/o1_mf_1_84jo2spj _. arc
1 2 06-SEP-12
/U01/tiger/flash_recovery_area/ORCL2/archivelog/2012_09_06/o1_mf_1_2_84jo2vxd _. arc
1 3 06-SEP-12
/U01/tiger/flash_recovery_area/ORCL2/archivelog/2012_09_06/o1_mf_1_3_84jo1_c _. arc
SQL>Recover datafile 1;Restore data files1File No.
ORA-00279: change 540503 generated at09/06/2012 14:31:27 needed for thread 1
ORA-00289: suggestion:/u01/tiger/flash_recovery_area/ORCL2/archivelog/2012_09_06/o1_mf_1_1 _ % u _. arc
ORA-00280: change 540503 for thread 1 is insequence #1
Specify log: {<RET> = suggested | filename | AUTO | CANCEL}
<RET> = suggestedPress enter to go to the system.
FilenameManually specify the location of the log or archive file
AUTOThe system automatically searches
CancelCancel recovery
Auto
Alter database open