【控制文件丢失-恢复-1】(十一)
it
Recovery Manager complete.
***完成恢复后查询DB,发现之前建立的表C3丢失了,日志文件丢失肯定会造成数据的丢失,只是多少的问题噢噢!!!***
[oracle@oracle ~]$ sqlplus / as sysdba
SQL*Plus: Release 10.2.0.5.0 - Production on Thu Nov 6 13:47:59 2014
Copyright (c) 1982, 2010, Oracle. All Rights Reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bit Production
With the Partitioning, Oracle Label Security, OLAP, Data Mining Scoring Engine
and Real Application Testing options
SQL> conn scott/tiger
Connected.
SQL> select * from tab;
TNAME TABTYPE CLUSTERID
------------------------------ ------- ----------
DEPT TABLE
EMP TABLE
BONUS TABLE
SALGRADE TABLE
C2 TABLE
C1 TABLE
6 rows selected.
SQL> desc c3 ----c3已经丢失了,他可能运气有点背,刚好在那个删除的归档日志里。
ERROR:
ORA-04043: object c3 does not exist
SQL> exit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bit Production
With the Partitioning, Oracle Label Security, OLAP, Data Mining Scoring Engine
and Real Application Testing options
进入rman重新备份数据库,删除无效备份:
[oracle@oracle ~]$ rman target /
Recovery Manager: Release 10.2.0.5.0 - Production on Thu Nov 6 13:50:35 2014
Copyright (c) 1982, 2007, Oracle. All rights reserved.
connected to target database: JADL10G (DBID=2011530396)
RMAN> delete backup;
****删除之前无效的备份
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=139 devtype=DISK
List of Backup Pieces
BP Key BS Key Pc# Cp# Status Device Type Piece Name
------- ------- --- --- ----------- ----------- ----------
1 1 1 1 AVAILABLE DISK /u01/oracle/flash_recovery_area/JADL10G/backupset/2014_11_06/o1_mf_nnndf_TAG20141106T123548_b5oyo4xm_.bkp
2 2 1 1 AVAILABLE DISK /u01/oracle/flash_recovery_area/JADL10G/backupset/2014_11_06/o1_mf_ncsnf_TAG20141106T123548_b5oyp966_.bkp
Do you really want to delete the above objects (enter YES or NO)? yes
deleted backup piece
backup piece handle=/u01/oracle/flash_recovery_area/JADL10G/backupset/2014_11_06/o1_mf_nnndf_TAG20141106T123548_b5oyo4xm_.bkp recid=1 stamp=862922148
deleted backup piece
backup piece handle=/u01/oracle/flash_recovery_area/JADL10G/backupset/2014_11_06/o1_mf_ncsnf_TAG20141106T123548_b5oyp966_.bkp recid=2 stamp=862926343
Deleted 2 objects
RMAN>
backup database;
*****重新备份数据库之前的备份无效了;
Starting backup at 06-NOV-14
using channel ORA_DISK_1
channel ORA_DISK_1: starting full datafile backupset
channel ORA_DISK_1: specifying datafile(s) in backupset
input datafile fno=00001 name=/u01/oracle/oradata/jadl10g/system01.dbf
input datafile fno=00003 name=/u01/oracle/oradata/jadl10g/sysaux01.dbf
input datafile fno=00005 name=/u01/oracle/oradata/jadl10g/example01.dbf
input datafile fno=00002 name=/u01/oracle/oradata/jadl10g/undotbs01.dbf
input datafile fno=00004 name=/u01/oracle/oradata/jadl10g/users01.dbf
channel ORA_DISK_1: starting piece 1 at 06-NOV-14
channel ORA_DISK_1: finished piece 1 at 06-NOV-14
piece handle=/u01/oracle/flash_recovery_area/JADL10G/backupset/2014_11_06/o1_mf_nnndf_TAG20141106T135107_b5p32dhf_.bkp tag=TAG20141106T135107 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:35
channel ORA_DISK_1: starting full datafile backupset
channel ORA_DISK_1: spe