ORACLE使用RMAN对SYSTEM表空间进行介质恢复(四)
o such file or directory
Additional information: 3
BYS@bys1>conn / as sysdba
Connected.
SYS@bys1>shutdown immediate;
ORA-01116: error in opening database file 1
ORA-01110: data file 1: '/u01/oradata/bys1/system01.dbf'
ORA-27041: unable to open file
Linux Error: 2: No such file or directory
Additional information: 3
SYS@bys1>select open_mode from v$database;
OPEN_MODE
--------------------
READ WRITE
SYS@bys1>shutdown abort;
ORACLE instance shut down.
SYS@bys1>startup;
ORACLE instance started.
Total System Global Area 631914496 bytes
Fixed Size 1338364 bytes
Variable Size 260047876 bytes
Database Buffers 364904448 bytes
Redo Buffers 5623808 bytes
Database mounted.
ORA-01157: cannot identify/lock data file 1 - see DBWR trace file
ORA-01110: data file 1: '/u01/oradata/bys1/system01.dbf'
SYS@bys1>select status from v$instance;
STATUS
------------
MOUNTED
######################################################
4,使用RMAN恢复系统表空间
RMAN> list backup;
List of Backup Sets
===================
BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
1 Full 596.67M DISK 00:02:19 17-SEP-13
BP Key: 1 Status: AVAILABLE Compressed: NO Tag: TAG20130917T104438
Piece Name: /u01/flash_recovery_area/BYS1/backupset/2013_09_17/o1_mf_nnndf_TAG20130917T104438_93hjjqph_.bkp
List of Datafiles in backup set 1
File LV Type Ckp SCN Ckp Time Name
---- -- ---- ---------- --------- ----
1 Full 1646291 17-SEP-13 /u01/oradata/bys1/system01.dbf
BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
2 Full 9.64M DISK 00:00:10 17-SEP-13
BP Key: 2 Status: AVAILABLE Compressed: NO Tag: TAG20130917T104438
Piece Name: /u01/flash_recovery_area/BYS1/backupset/2013_09_17/o1_mf_ncsnf_TAG20130917T104438_93hjok2q_.bkp
SPFILE Included: Modification time: 16-SEP-13
SPFILE db_unique_name: BYS1
Control File Included: Ckp SCN: 1646360 Ckp time: 17-SEP-13
RMAN> restore tablespace system;
Starting restore at 17-SEP-13
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=18 device type=DISK
channel ORA_DISK_1: starting datafile backup set restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_DISK_1: restoring datafile 00001 to /u01/oradata/bys1/system01.dbf
channel ORA_DISK_1: reading from backup piece /u01/flash_recovery_area/BYS1/backupset/2013_09_17/o1_mf_nnndf_TAG20130917T104438_93hjjqph_.bkp
channel ORA_DISK_1: piece handle=/u01/flash_recovery_area/BYS1/backupset/2013_09_17/o1_mf_nnndf_TAG20130917T104438_93hjjqph_.bkp tag=TAG20130917T104438
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:01:55
Finished restore at 17-SEP-13
RMAN> recover tablespace system;
Starting recover at 17-SEP-13
using channel ORA_DISK_1
starting media recovery
media recovery complete, elapsed time: 00:00:01
Finished recover at 17-SEP-13
RMAN> alter database open;
databas