Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1099746
  • 博文数量: 159
  • 博客积分: 3063
  • 博客等级: 中校
  • 技术积分: 2703
  • 用 户 组: 普通用户
  • 注册时间: 2012-04-01 01:51
文章分类

全部博文(159)

文章存档

2013年(48)

2012年(111)

分类: Oracle

2013-08-10 13:52:02

--错误信息


RMAN-06094: datafile 209 must be restored

SQL> ALTER DATABASE CREATE DATAFILE 209;
ALTER DATABASE CREATE DATAFILE 209
*
ERROR at line 1:
ORA-01111: name for data file /u01/app_new/product/11.2/dbs/UNNAMED00209 is
unknown - rename to correct file


SQL>  recover database using backup controlfile;
ORA-00283: recovery session canceled due to errors
ORA-01111: name for data file 209 is unknown - rename to correct file
ORA-01110: data file 209: '/u01/app_new/product/11.2/dbs/UNNAMED00209'
ORA-01157: cannot identify/lock data file 209 - see DBWR trace file
ORA-01111: name for data file 209 is unknown - rename to correct file
ORA-01110: data file 209: '/u01/app_new/product/11.2/dbs/UNNAMED00209'


SQL> alter database create datafile '/u01/app_new/product/11.2/dbs/UNNAMED00209' as '+DATA';
alter database create datafile '/u01/app_new/product/11.2/dbs/UNNAMED00209' as '+DATA'
*
ERROR at line 1:
ORA-01136: specified size of file 209 (12800 blocks) is less than original size
of 1048576 blocks
ORA-01111: name for data file 209 is unknown - rename to correct file
ORA-01110: data file 209: '/u01/app_new/product/11.2/dbs/UNNAMED00209'


SQL> alter database create datafile 210 as '+DATA';
alter database create datafile 210 as '+DATA'
*
ERROR at line 1:
ORA-01516: nonexistent log file, data file, or temporary file "210"


SQL> alter database datafile 209 offline drop;

Database altered.

--恢复归档时报错信息


SQL> recover database using backup controlfile;
ORA-00279: change 3244632370 generated at 05/31/2013 14:23:18 needed for thread 1
ORA-00289: suggestion : /oraarch/ARC_ERP5_3693_802575121_1.log
ORA-00280: change 3244632370 for thread 1 is in sequence #3693


Specify log: {=suggested | filename | AUTO | CANCEL}
/oraarch/ARC_ERP5_3693_802575121_1.log
ORA-10877: error signaled in parallel recovery slave


ORA-01112: media recovery not started


SQL> recover database using backup controlfile;
ORA-00283: recovery session canceled due to errors
ORA-01111: name for data file 212 is unknown - rename to correct file
ORA-01110: data file 212: '/u01/app_new/product/11.2/dbs/UNNAMED00212'
ORA-01157: cannot identify/lock data file 212 - see DBWR trace file
ORA-01111: name for data file 212 is unknown - rename to correct file
ORA-01110: data file 212: '/u01/app_new/product/11.2/dbs/UNNAMED00212'

 

创建数据文件


alter database create datafile '/opt/oracle/datafile/users01.dbf' as '/opt/oracle/datafile/users01.dbf';
alter database create datafile 4 as '/opt/oracle/datafile/users01.dbf';
alter database create datafile '/opt/oracle/datafile/users01.dbf' as new;

--创建数据文件
SQL> alter database create datafile 209 as new;

Database altered.

SQL> alter database create datafile 210 as new;

Database altered.

alter database create datafile 211 as new;

--删除数据文件


alter database datafile 209 offline drop;
alter database datafile 210 offline drop;

 

--恢复新建的数据文件(AIX6.1,11.2.0.3)

1.用增量恢复新建的文件
RMAN> run{
2> allocate channel cha1 type disk;
3> allocate channel cha2 type disk;
4> allocate channel cha3 type disk;
5> allocate channel cha4 type disk;
6> allocate channel cha5 type disk;
7> recover database until SEQUENCE 3610 thread 1;
8> release channel cha1;
9> release channel cha2;
10> release channel cha3;
11> release channel cha4;
12> release channel cha5;
13> }

using target database control file instead of recovery catalog
allocated channel: cha1
channel cha1: SID=42 device type=DISK

allocated channel: cha2
channel cha2: SID=80 device type=DISK

allocated channel: cha3
channel cha3: SID=119 device type=DISK

allocated channel: cha4
channel cha4: SID=158 device type=DISK

allocated channel: cha5
channel cha5: SID=197 device type=DISK

Starting recover at 2013-05-31 13:30:21
channel cha1: starting incremental datafile backup set restore
channel cha1: specifying datafile(s) to restore from backup set
destination for restore of datafile 00210: +DATA/sgerp5/datafile/erp2013.319.816874109
channel cha1: reading from backup piece /orabak/INCR1_SGERP5_20130528_1044_816566730
channel cha1: piece handle=/orabak/INCR1_SGERP5_20130528_1044_816566730 tag=TAG20130528T000524
channel cha1: restored backup piece 1
channel cha1: restore complete, elapsed time: 00:04:45

starting media recovery

archived log for thread 1 with sequence 3605 is already on disk as file /oraarch/ARC_ERP5_3605_802575121_1.log
archived log file name=/oraarch/ARC_ERP5_3605_802575121_1.log thread=1 sequence=3605
archived log file name=/oraarch/ARC_ERP5_3606_802575121_1.log thread=1 sequence=3606
archived log file name=/oraarch/ARC_ERP5_3607_802575121_1.log thread=1 sequence=3607
archived log file name=/oraarch/ARC_ERP5_3608_802575121_1.log thread=1 sequence=3608
archived log file name=/oraarch/ARC_ERP5_3609_802575121_1.log thread=1 sequence=3609
Oracle Error: 
ORA-01547: warning: RECOVER succeeded but OPEN RESETLOGS would get error below
ORA-01194: file 1 needs more recovery to be consistent
ORA-01110: data file 1: '+DATA/sgerp5/datafile/system.318.816829779'

media recovery complete, elapsed time: 00:03:38
Finished recover at 2013-05-31 13:38:55

released channel: cha1

released channel: cha2

released channel: cha3

released channel: cha4

released channel: cha5

RMAN>

 

2.用归档恢复新建的文件

SQL> recover database using backup controlfile;
ORA-00279: change 3244654888 generated at 05/31/2013 14:24:42 needed for thread
1
ORA-00289: suggestion : /oraarch/ARC_ERP5_3693_802575121_1.log
ORA-00280: change 3244654888 for thread 1 is in sequence #3693


Specify log: {=suggested | filename | AUTO | CANCEL}
/oraarch/ARC_ERP5_3693_802575121_1.log
ORA-10877: error signaled in parallel recovery slave


ORA-01112: media recovery not started


SQL> alter database create datafile 213 as new;

Database altered.

SQL> recover database using backup controlfile;
ORA-00279: change 3244693616 generated at 05/31/2013 14:27:23 needed for thread 1
ORA-00289: suggestion : /oraarch/ARC_ERP5_3693_802575121_1.log
ORA-00280: change 3244693616 for thread 1 is in sequence #3693


Specify log: {=suggested | filename | AUTO | CANCEL}
/oraarch/ARC_ERP5_3693_802575121_1.log
ORA-00279: change 3245185532 generated at 05/31/2013 15:03:44 needed for thread 1
ORA-00289: suggestion : /oraarch/ARC_ERP5_3694_802575121_1.log
ORA-00280: change 3245185532 for thread 1 is in sequence #3694
ORA-00278: log file '/oraarch/ARC_ERP5_3693_802575121_1.log' no longer needed
for this recovery


Specify log: {=suggested | filename | AUTO | CANCEL}

阅读(7853) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~