Chinaunix首页 | 论坛 | 博客
  • 博客访问: 569686
  • 博文数量: 302
  • 博客积分: 10010
  • 博客等级: 上将
  • 技术积分: 4765
  • 用 户 组: 普通用户
  • 注册时间: 2008-07-15 23:10
文章分类

全部博文(302)

文章存档

2011年(1)

2008年(301)

我的朋友

分类: 服务器与存储

2008-07-31 23:51:22

5.7号在给表空间增加数据文件时,没注意系统给文件多加了一个.dbf扩展名,成了.dbf.dbf文件,看着不爽对此文件进行了脱机。又另增加了一个数据文件。当时考虑直接把.dbf.dbf的那个文件给脱机 drop,网上一查9i不能drop,此时发现不能进行联机,此已经是9号,归档日志文件已经rman自动备份后进行了删除,此文即是对此恢复的一个记录。生产系统,做之前一定要做好备份,万事不能心存侥幸。
此事,再次提醒自己一点要小心,细心再细心。
 
telnet (acdb2.xxx.cn)
AIX Version 5
(C) Copyrights by IBM and by others 1982, 2004.
login: root
root's Password:
*******************************************************************************
*                                                                             *
*                                                                             *
*  Welcome to AIX Version 5.2!                                                *
*                                                                             *
*                                                                             *
*  Please see the README file in /usr/lpp/bos for information pertinent to    *
*  this release of the AIX Operating System.                                  *
*                                                                             *
*                                                                             *
*******************************************************************************
Last unsuccessful login: Fri May  9 14:17:06 2008 on /dev/pts/2 from 10.0.101.230
Last login: Fri May  9 15:14:26 2008 on /dev/pts/1 from 10.0.101.230
# bash
cdbash-2.05a# su - oracle
[YOU HAVE NEW MAIL]
[acdb2][/home/oracle]$echo $ORACLE_HOME
/arpsa/OraHome1
[acdb2][/home/oracle]$bash   
bash-2.05a$ rman
Recovery Manager: Release 9.2.0.4.0 - 64bit Production
Copyright (c) 1995, 2002, Oracle Corporation.  All rights reserved.
RMAN> connect target;
connected to target database: ORAARP (DBID=1195582038)
RMAN> run {
2> allocate channel ch00 type 'SBT_TAPE';
3> recover datafile '/arpdata1/oradata/oraarp/T_PAY1.dbf.dbf';
4> release channel ch00;
5> }
using target database controlfile instead of recovery catalog
allocated channel: ch00
channel ch00: sid=13 devtype=SBT_TAPE
channel ch00: VERITAS NetBackup for Oracle - Release 5.0GA (2004111820)
Starting recover at 09-MAY-08
starting media recovery
channel ch00: starting archive log restore to default destination
channel ch00: restoring archive log
archive log thread=1 sequence=24414
channel ch00: restoring archive log
archive log thread=1 sequence=24415
channel ch00: restoring archive log
archive log thread=1 sequence=24416
channel ch00: restoring archive log
archive log thread=1 sequence=24417
channel ch00: restoring archive log
archive log thread=1 sequence=24418
channel ch00: restoring archive log
archive log thread=1 sequence=24419
channel ch00: restoring archive log
archive log thread=1 sequence=24420
channel ch00: restoring archive log
archive log thread=1 sequence=24421
channel ch00: restoring archive log
archive log thread=1 sequence=24422
channel ch00: restoring archive log
archive log thread=1 sequence=24423
channel ch00: restoring archive log
archive log thread=1 sequence=24424
channel ch00: restoring archive log
archive log thread=1 sequence=24425
channel ch00: restoring archive log
archive log thread=1 sequence=24426
channel ch00: restoring archive log
archive log thread=1 sequence=24427
channel ch00: restoring archive log
archive log thread=1 sequence=24428
channel ch00: restoring archive log
archive log thread=1 sequence=24429
channel ch00: restored backup piece 1
piece handle=al_3948_1_654128333 tag=TAG20080507T220838 params=NULL
channel ch00: restore complete
archive log filename=/arpdata/oradata/oraarp/archive/1_24414.dbf thread=1 sequence=24414
media recovery complete
channel ch00: starting archive log restore to default destination
channel ch00: restoring archive log
archive log thread=1 sequence=24430
channel ch00: restoring archive log
archive log thread=1 sequence=24431
channel ch00: restoring archive log
archive log thread=1 sequence=24432
channel ch00: restoring archive log
archive log thread=1 sequence=24433
channel ch00: restoring archive log
archive log thread=1 sequence=24434
channel ch00: restoring archive log
archive log thread=1 sequence=24435
channel ch00: restoring archive log
archive log thread=1 sequence=24436
channel ch00: restoring archive log
archive log thread=1 sequence=24437
channel ch00: restoring archive log
archive log thread=1 sequence=24438
channel ch00: restoring archive log
archive log thread=1 sequence=24439
channel ch00: restoring archive log
archive log thread=1 sequence=24440
channel ch00: restoring archive log
archive log thread=1 sequence=24441
channel ch00: restoring archive log
archive log thread=1 sequence=24442
channel ch00: restoring archive log
archive log thread=1 sequence=24443
channel ch00: restoring archive log
archive log thread=1 sequence=24444
channel ch00: restoring archive log
archive log thread=1 sequence=24445
channel ch00: restoring archive log
archive log thread=1 sequence=24446
channel ch00: restored backup piece 1
piece handle=al_3949_1_654214132 tag=TAG20080508T220849 params=NULL
channel ch00: restore complete
channel ch00: starting archive log restore to default destination
channel ch00: restoring archive log
archive log thread=1 sequence=24447
channel ch00: restoring archive log
archive log thread=1 sequence=24448
channel ch00: restoring archive log
archive log thread=1 sequence=24449
channel ch00: restoring archive log
archive log thread=1 sequence=24450
channel ch00: restoring archive log
archive log thread=1 sequence=24451
channel ch00: restoring archive log
archive log thread=1 sequence=24452
channel ch00: restoring archive log
archive log thread=1 sequence=24453
channel ch00: restoring archive log
archive log thread=1 sequence=24454
channel ch00: restoring archive log
archive log thread=1 sequence=24455
channel ch00: restoring archive log
archive log thread=1 sequence=24456
channel ch00: restoring archive log
archive log thread=1 sequence=24457
channel ch00: restored backup piece 1
piece handle=al_3969_1_654289754 tag=TAG20080509T190912 params=NULL
channel ch00: restore complete
channel ch00: starting archive log restore to default destination
channel ch00: restoring archive log
archive log thread=1 sequence=24458
channel ch00: restoring archive log
archive log thread=1 sequence=24459
channel ch00: restoring archive log
archive log thread=1 sequence=24460
channel ch00: restoring archive log
archive log thread=1 sequence=24461
channel ch00: restoring archive log
archive log thread=1 sequence=24462
channel ch00: restoring archive log
archive log thread=1 sequence=24463
channel ch00: restoring archive log
archive log thread=1 sequence=24464
channel ch00: restoring archive log
archive log thread=1 sequence=24465
channel ch00: restoring archive log
archive log thread=1 sequence=24466
channel ch00: restoring archive log
archive log thread=1 sequence=24467
channel ch00: restoring archive log
archive log thread=1 sequence=24468
channel ch00: restored backup piece 1
piece handle=al_3970_1_654289832 tag=TAG20080509T190912 params=NULL
channel ch00: restore complete
Finished recover at 09-MAY-08
released channel: ch00
RMAN>
 
 
----------------------------------------------------
由于9i无法drop,只好把文件联机后改名继续用了 :->,此是记录。
 
bash-2.05a$ sqlplus /nolog
SQL*Plus: Release 9.2.0.4.0 - Production on Fri May 9 20:48:28 2008
Copyright (c) 1982, 2002, Oracle Corporation.  All rights reserved.
SQL> conn /as sysdba
Connected.
SQL> alter database rename file '/arpdata1/oradata/oraarp/T_PAY1.dbf.dbf' to '/arpdata1/oradata/oraarp/T_PAY2.dbf';
alter database rename file '/arpdata1/oradata/oraarp/T_PAY1.dbf.dbf' to '/arpdata1/oradata/oraarp/T_PAY2.dbf'
*
ERROR at line 1:
ORA-01511: error in renaming log/data files
ORA-01141: error renaming data file 92 - new file
'/arpdata1/oradata/oraarp/T_PAY2.dbf' not found
ORA-01110: data file 92: '/arpdata1/oradata/oraarp/T_PAY1.dbf.dbf'
ORA-27037: unable to obtain file status
IBM AIX RISC System/6000 Error: 2: No such file or directory
Additional information: 3

SQL> !
$ cp /arpdata1/oradata/oraarp/T_PAY1.dbf.dbf /arpdata1/oradata/oraarp/T_PAY2.dbf   
$ exit
SQL> alter database rename file '/arpdata1/oradata/oraarp/T_PAY1.dbf.dbf' to '/arpdata1/oradata/oraarp/T_PAY2.dbf';
Database altered.
SQL> !
$ cd /arpdata1/oradata/oraarp/
$ ls
T_EG5.dbf         T_INSTANCE25.dbf  T_INSTANCE30.dbf  T_INSTANCE35.dbf  T_PAY2.dbf        temp05.dbf        users10.dbf
T_INSTANCE21.dbf  T_INSTANCE26.dbf  T_INSTANCE31.dbf  T_INSTANCE36.dbf  archive           users06.dbf       users11.dbf
T_INSTANCE22.dbf  T_INSTANCE27.dbf  T_INSTANCE32.dbf  T_INSTANCE37.dbf  t_eg3.dbf         users07.dbf       users12.dbf
T_INSTANCE23.dbf  T_INSTANCE28.dbf  T_INSTANCE33.dbf  T_PAY1.dbf        t_eg4.dbf         users08.dbf       users13.dbf
T_INSTANCE24.dbf  T_INSTANCE29.dbf  T_INSTANCE34.dbf  T_PAY1.dbf.dbf    temp04.dbf        users09.dbf       users14.dbf
$ ll
total 137757712
-rw-r-----   1 oracle   dba      1073750016 May  9 19:46 T_EG5.dbf
-rw-r-----   1 oracle   dba      15250497536 May  9 19:46 T_INSTANCE21.dbf
-rw-r-----   1 oracle   dba      2147491840 May  9 19:09 T_INSTANCE22.dbf
-rw-r-----   1 oracle   dba      2147491840 May  9 19:44 T_INSTANCE23.dbf
-rw-r-----   1 oracle   dba      2147491840 May  9 19:09 T_INSTANCE24.dbf
-rw-r-----   1 oracle   dba      2147491840 May  9 19:36 T_INSTANCE25.dbf
-rw-r-----   1 oracle   dba      2147491840 May  9 19:09 T_INSTANCE26.dbf
-rw-r-----   1 oracle   dba      2147491840 May  9 19:36 T_INSTANCE27.dbf
-rw-r-----   1 oracle   dba      2147491840 May  9 19:35 T_INSTANCE28.dbf
-rw-r-----   1 oracle   dba      2147491840 May  9 19:27 T_INSTANCE29.dbf
-rw-r-----   1 oracle   dba      2147491840 May  9 19:44 T_INSTANCE30.dbf
-rw-r-----   1 oracle   dba      2147491840 May  9 19:53 T_INSTANCE31.dbf
-rw-r-----   1 oracle   dba      2147491840 May  9 19:51 T_INSTANCE32.dbf
-rw-r-----   1 oracle   dba      2147491840 May  9 19:51 T_INSTANCE33.dbf
-rw-r-----   1 oracle   dba      2147491840 May  9 19:09 T_INSTANCE34.dbf
-rw-r-----   1 oracle   dba      2147491840 May  9 19:09 T_INSTANCE35.dbf
-rw-r-----   1 oracle   dba      2147491840 May  9 19:09 T_INSTANCE36.dbf
-rw-r-----   1 oracle   dba      1946165248 May  9 19:09 T_INSTANCE37.dbf
-rw-r-----   1 oracle   dba       314580992 May  9 19:09 T_PAY1.dbf
-rw-r-----   1 oracle   dba       314580992 May  9 20:25 T_PAY1.dbf.dbf
-rw-r-----   1 oracle   dba       314580992 May  9 20:50 T_PAY2.dbf
drwxr-xr-x   2 oracle   dba            4096 May  9 20:43 archive
-rw-r-----   1 oracle   dba       536879104 May  9 19:09 t_eg3.dbf
-rw-r-----   1 oracle   dba       536879104 May  9 19:45 t_eg4.dbf
-rw-r-----   1 oracle   dba      2097160192 Jun  6 2007  temp04.dbf
-rw-r-----   1 oracle   dba      2097160192 Nov 12 15:07 temp05.dbf
-rw-r-----   1 oracle   dba      3101696000 May  9 19:09 users06.dbf
-rw-r-----   1 oracle   dba      2147491840 May  9 19:47 users07.dbf
-rw-r-----   1 oracle   dba      2147491840 May  9 19:09 users08.dbf
-rw-r-----   1 oracle   dba      1073750016 May  9 19:45 users09.dbf
-rw-r-----   1 oracle   dba      1073750016 May  9 19:09 users10.dbf
-rw-r-----   1 oracle   dba      1073750016 May  9 19:09 users11.dbf
-rw-r-----   1 oracle   dba      1073750016 May  9 19:09 users12.dbf
-rw-r-----   1 oracle   dba      1073750016 May  9 19:09 users13.dbf
-rw-r-----   1 oracle   dba      1073750016 May  9 19:09 users14.dbf
$ exit
SQL> alter database open;
阅读(640) | 评论(0) | 转发(1) |
给主人留下些什么吧!~~