求救:数据库恢复

imfjl 2005-05-13 10:30:04
1.启动数据库出错
SQL> startup
ORACLE instance started.

Total System Global Area 336356520 bytes
Fixed Size 279720 bytes
Variable Size 268435456 bytes
Database Buffers 67108864 bytes
Redo Buffers 532480 bytes
Database mounted.
ORA-01589: must use RESETLOGS or NORESETLOGS option for database open
2.若以noresetlogs打开数据库
SQL> ALTER DATABASE OPEN NORESETLOGS;
ALTER DATABASE OPEN NORESETLOGS
*
ERROR at line 1:
ORA-01588: must use RESETLOGS option for database open
3.以resetlogs打开数据库
SQL> alter database open RESETLOGS;
alter database open RESETLOGS
*
ERROR at line 1:
ORA-01194: file 1 needs more recovery to be consistent
ORA-01110: data file 1: '/home/oracle/software/oradata/ORA1/system01.dbf'
3.恢复数据库
SQL> recover database until cancel
ORA-00283: recovery session canceled due to errors
ORA-01610: recovery using the BACKUP CONTROLFILE option must be done
4.再尝试恢复
SQL> recover database using backup controlfile until cancel;
ORA-00279: change 2039722618 generated at 03/30/2005 11:58:32 needed for thread
1
ORA-00289: suggestion : /home/oracle/software/dbs/arch1_19264.dbf
ORA-00280: change 2039722618 for thread 1 is in sequence #19264

Specify log: {<RET>=suggested | filename | AUTO | CANCEL}

ORA-00308: cannot open archived log '/home/oracle/software/dbs/arch1_19264.dbf'
ORA-27037: unable to obtain file status
Linux Error: 2: No such file or directory
Additional information: 3


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: '/home/oracle/software/oradata/ORA1/system01.dbf'
5.打开数据库
SQL> alter database open resetlogs;
alter database open resetlogs
*
ERROR at line 1:
ORA-01194: file 1 needs more recovery to be consistent
ORA-01110: data file 1: '/home/oracle/software/oradata/ORA1/system01.dbf'
------------------------------------------------------------------------------
现在我应该怎么办啊??急盼答复
...全文
264 8 打赏 收藏 转发到动态 举报
写回复
用AI写文章
8 条回复
切换为时间正序
请发表友善的回复…
发表回复
skytears 2005-05-15
  • 打赏
  • 举报
回复
会不会磁盘空间不够
Dr_Jones 2005-05-15
  • 打赏
  • 举报
回复
http://www.cnoug.org/viewthread.php?tid=50419
看一下他的恢复实例吧
ojaoja 2005-05-15
  • 打赏
  • 举报
回复
采用过去的备份和归档日志恢复过程:
将所有备份的数据文件替换原有数据文件(注意只是数据文件,而且最好把损坏的数据库进行一次冷备);
然后进行recover database ;
再打开数据库看看。

如果可能请详细说明最近一次的备份情况,这样才能决定能否恢复。
imfjl 2005-05-15
  • 打赏
  • 举报
回复
我根据http://community.csdn.net/Expert/topic/3266/3266957.xml?temp=.4995996和http://dev.csdn.net/article/19/19867.shtm的说法设置_allow_resetlogs_corruption=TRUE之后,打开数据库的时候出错:
SQL> startup
ORACLE instance started.

Total System Global Area 336356520 bytes
Fixed Size 279720 bytes
Variable Size 268435456 bytes
Database Buffers 67108864 bytes
Redo Buffers 532480 bytes
Database mounted.
ORA-03113: end-of-file on communication channel

查看alter.log:
Sun May 15 10:03:57 2005
Starting ORACLE instance (normal)
Sun May 15 10:03:57 2005
WARNING: EINVAL creating segment of size 0x0000000015083000
fix shm parameters in /etc/system or equivalent
LICENSE_MAX_SESSION = 0
LICENSE_SESSIONS_WARNING = 0
LICENSE_MAX_USERS = 0
Starting up ORACLE RDBMS Version: 9.0.1.0.0.
System parameters with non-default values:
processes = 150
timed_statistics = TRUE
shared_pool_size = 117440512
large_pool_size = 1048576
java_pool_size = 117440512
resource_manager_plan = SYSTEM_PLAN
control_files = /home/oracle/oradata/ORA1/control01.ctl, /home/orac
le/oradata/ORA1/control02.ctl, /home/oracle/oradata/ORA1/control03.ctl
db_block_size = 8192
db_cache_size = 67108864
compatible = 9.0.0
fast_start_mttr_target = 300
undo_management = AUTO
undo_tablespace = UNDOTBS
remote_login_passwordfile= EXCLUSIVE
db_domain =
instance_name = ORA1
dispatchers = (PROTOCOL=TCP)(SER=MODOSE), (PROTOCOL=TCP)(PRE=orac
le.aurora.server.GiopServer), (PROTOCOL=TCP)(PRE=oracle.aurora.server.SGiopServe
r)
background_dump_dest = /home/oracle/admin/ORA1/bdump
user_dump_dest = /home/oracle/admin/ORA1/udump
core_dump_dest = /home/oracle/admin/ORA1/cdump
sort_area_size = 524288
db_name = ORA1
open_cursors = 300
PMON started with pid=2
DBW0 started with pid=3
LGWR started with pid=4
CKPT started with pid=5
SMON started with pid=6
RECO started with pid=7
Sun May 15 10:03:57 2005
starting up 1 shared server(s) ...
starting up 1 dispatcher(s) for network address '(ADDRESS=(PARTIAL=YES)(PROTOCOL
=TCP))'...
starting up 1 dispatcher(s) for network address '(ADDRESS=(PARTIAL=YES)(PROTOCOL
=TCP))'...
starting up 1 dispatcher(s) for network address '(ADDRESS=(PARTIAL=YES)(PROTOCOL
=TCP))'...
Sun May 15 10:03:58 2005
ALTER DATABASE MOUNT
Sun May 15 10:04:05 2005
Successful mount of redo thread 1, with mount id 1035197393.
Sun May 15 10:04:05 2005
Database mounted in Exclusive Mode.
Completed: ALTER DATABASE MOUNT
Sun May 15 10:04:05 2005
ALTER DATABASE OPEN
Sun May 15 10:04:05 2005
Beginning crash recovery of 1 threads
Sun May 15 10:04:05 2005
Started first pass scan
Sun May 15 10:04:05 2005
Completed first pass scan
Sun May 15 10:04:05 2005
Started recovery at
Thread 1: logseq 4, block 2, scn 0.2065353611
Recovery of Online Redo Log: Thread 1 Group 1 Seq 4 Reading mem 0
Mem# 0 errs 0: /home/oracle/oradata/ORA1/redo01.log
Sun May 15 10:04:05 2005
Ended recovery at
Thread 1: logseq 4, block 3, scn 0.2065373612
0 data blocks read, 0 data blocks written, 1 redo blocks read
Crash recovery completed successfully
Sun May 15 10:04:06 2005
Thread 1 advanced to log sequence 5
Thread 1 opened at log sequence 5
Current log# 2 seq# 5 mem# 0: /home/oracle/oradata/ORA1/redo02.log
Successful open of redo thread 1.
Sun May 15 10:04:07 2005
SMON: enabling cache recovery
Sun May 15 10:04:07 2005
Errors in file /home/oracle/admin/ORA1/udump/ora_8793.trc:
ORA-00600: internal error code, arguments: [2662], [0], [2065373617], [0], [2146
059884], [8388617], [], []
Sun May 15 10:04:07 2005
Errors in file /home/oracle/admin/ORA1/udump/ora_8793.trc:
ORA-00600: internal error code, arguments: [2662], [0], [2065373617], [0], [2146
059884], [8388617], [], []
Sun May 15 10:04:07 2005
Error 600 happened during db open, shutting down database
USER: terminating instance due to error 600
Instance terminated by USER, pid = 8793
ORA-1092 signalled during: ALTER DATABASE OPEN...
Sun May 15 10:09:08 2005
USER: terminating instance due to error 1092
Instance terminated by USER, pid = 8793
Sun May 15 10:09:08 2005
Errors in file /home/oracle/admin/ORA1/udump/ora_8793.trc:
ORA-27302: failure occurred at: skgpwreset1
ORA-27303: additional information: invalid shared ctx
ORA-01092: ORACLE instance terminated. Disconnection forced
ORA-00600: internal error code, arguments: [2662], [0], [2065373617], [0], [2146
059884], [8388617], [], []
难道没办法救了吗?神啊,帮帮我吧......
imfjl 2005-05-15
  • 打赏
  • 举报
回复
应该不是磁盘空间不够。查看ora_8793.trc文件,如下:
A223080 00000000 16000000 2D043518 0435181F [.........5.-..5.]
A223090 3518282D 18192002 1A2E0435 2E043518 [-(.5. ..5....5..]
A2230A0 1833181B 0235182E 00182220 00000010 [..3...5. "......]
A2230B0 00000000 00000000 00000000 00000000 [................]
Repeat 12 times
A223180 00000000 18160000 1F2D0435 2D043518 [........5.-..5.-]
A223190 02351828 35181920 181A2E04 1B2E0435 [(.5. ..5....5...]
A2231A0 2E183318 20023518 02351822 00183220 [.3...5. ".5. 2..]
A2231B0 00000010 00000000 00000000 00000000 [................]
A2231C0 00000000 00000000 00000000 00000000 [................]
Repeat 11 times
A223280 00000000 00000000 [........]
kditph * kditph_p [A223288, A22328C) = 00000000
kobjn ugaqxob_p [A22328C, A223290) = 00000000
xctug xctpg_p [A223290, A223294) = 00000023
stpdef stsustp_p [A223294, A2232C4) = 00080000 00080000 00000002 00000001 ...
Dump of memory from 0xA2232A4 to 0xA2232C4
A2232A0 00002000 00000010 0000000E [. ..........]
A2232B0 00006000 00000002 00000002 00001FBC [.`..............]
A2232C0 000002A6 [....]
ktcbb * kpotx_p [A2232C4, A2232C8) = 00000000
ub2 kpots_p [A2232C8, A2232CC) = 00000000
ub1 ugasc_p [A2232C8, A2232CC) = 00000000
kpotcuc * kpotcug_p [A2232CC, A2232D0) = 00000000
OCIEnv * kpkiu_envhp_p [A2232D0, A2232D4) = 0A227244
Dump of memory from 0xA227244 to 0xA227284
A227240 F8E9DACB 00000101 0A22147C [........|.".]
A227250 0A227244 00000010 00000000 00000000 [Dr".............]
A227260 00000000 00000000 00000000 00000000 [................]
A227270 00000000 00000000 00000000 0A22771C [.............w".]
A227280 0A1FEC9C [....]
kpuuc kpkiu_p [A2232D4, A223374) = 00000000 00000000 00000000 00000000 ...
Dump of memory from 0xA2232E4 to 0xA223374
A2232E0 00000000 00000000 00000000 [............]
A2232F0 00000000 00000000 00000000 00000000 [................]
Repeat 5 times
A223350 00000002 00000002 00000002 00000000 [................]
A223360 00000000 00000000 00000000 00000000 [................]
A223370 00000000 [....]
kpggug_t kpkiuga_p [A223374, A22337C) = 0A222D70 0A222D8A
OCISvcCtx * kpnu_lsvchp_p [A22337C, A223380) = 00000000
OCISession * kpnu_lusrhp_p [A223380, A223384) = 00000000
OCIServer * kpnu_lsrvhp_p [A223384, A223388) = 00000000
sb2 opixind_p [A223388, A22338C) = 00000000
ub2 opixaln_p [A223388, A22338C) = 00000000
ub2 opixrcd_p [A22338C, A223390) = 00000000
kgghst * kwqic_p [A223390, A223394) = 0A224FC0
Dump of memory from 0xA224FC0 to 0xA225000
A224FC0 0A21BA28 00000003 00000000 40000000 [(.!............@]
A224FD0 40400000 08896BF0 08896C20 00000000 [..@@.k.. l......]
A224FE0 00000000 00000000 000001E4 08896B50 [............Pk..]
A224FF0 08896B70 00000000 0000003D 0A224FB4 [pk......=....O".]
ub1 * kwqit_p [A223394, A223398) = 00000000
ub1 * kwqin_p [A223398, A22339C) = 00000000
ub1 kwqiz_p [A22339C, A2233A0) = 00000000
ub4 kwqis_p [A2233A0, A2233A4) = 00000000
ub4 kwqil_p [A2233A4, A2233A8) = 00000000
kwqpoidnd * kwqpo_p [A2233A8, A2233AC) = 00000000
kwqpsctx * kwqps_p [A2233AC, A2233B0) = 00000000
kwqprctx * kwqpr_p [A2233B0, A2233B4) = 00000000
kgghst * kwqma_p [A2233B4, A2233B8) = 0A224F7C
Dump of memory from 0xA224F7C to 0xA224FBC
A224F70 0A224F64 [dO".]
A224F80 00000003 00000000 40000000 40400000 [...........@..@@]
A224F90 088B64F0 088B6570 00000000 00000000 [.d..pe..........]
A224FA0 00000000 00000068 088B6690 088B66D0 [....h....f...f..]
A224FB0 00000000 00000045 0A224F70 [....E...pO".]
kwqjw * kwqjwh_p [A2233B8, A2233BC) = 00000000
knceug * kncem_p [A2233BC, A2233C0) = 00000000
ub1 kkziu_p [A2233C0, A2233C4) = 00000009
knst * knstu_p [A2233C4, A2233C8) = 00000000
hogxdef* hogcu_p [A2233C8, A2233CC) = 00000000
qmf_ctxp qmffs_p [A2233CC, A2233D0) = 00000000
qmruga * qmrug_p [A2233D0, A2233D4) = 00000000
qsmguga * qsmgu_p [A2233D4, A2233D8) = 00000000
ub4 ksmugmg2 [A2233D8, A2233DC) = 0000CDCD
KSTDUMP: In-memory trace dump
TIME:SEQ# ORAPID SID EVENT OP DATA
========================================================================
FD2F911D:00000000 149 0 10280 1 0x00000095
FD2F911D:00000001 2 0 10280 1 0x00000002
FD2F911D:00000002 3 0 10280 1 0x00000003
FD2F911D:00000003 4 0 10280 1 0x00000004
FD2F911D:00000004 5 0 10280 1 0x00000005
FD2F911D:00000005 6 0 10280 1 0x00000006
FD2F911D:00000006 7 0 10280 1 0x00000007
FD2F911D:00000007 8 0 10280 1 0x00000008
FD2F911D:00000008 9 0 10280 1 0x00000009
FD2F911D:00000009 10 0 10280 1 0x0000000A
FD2F911D:0000000A 11 0 10280 1 0x0000000B
FD2F914D:0000000B 12 0 10280 1 0x0000000C
FD2F914D:0000000C 12 0 10280 1 0x0000000C
FD2F914D:0000000D 12 0 10280 1 0x0000000C
FD2F914D:0000000E 12 0 10280 1 0x0000000C
KSTDUMP: End of in-memory trace dump
ORA-00600: internal error code, arguments: [2662], [0], [2065453629], [0], [2146
059884], [8388617], [], []
ORA-27302: failure occurred at: skgpwreset1
ORA-27303: additional information: invalid shared ctx
ORA-01092: ORACLE instance terminated. Disconnection forced
ORA-00600: internal error code, arguments: [2662], [0], [2065453629], [0], [2146
059884], [8388617], [], []
imfjl 2005-05-14
  • 打赏
  • 举报
回复
谢谢你们的回复。我试过了LGQDUCKY(飘) 的方法,也是不行。我发现出错信息:
SQL> recover database using backup controlfile until time '2005-05-10:00:00:00'
ORA-00279: change 2039722618 generated at 03/30/2005 11:58:32 needed for thread
1
ORA-00289: suggestion : /home/oracle/software/dbs/arch1_19264.dbf
ORA-00280: change 2039722618 for thread 1 is in sequence #19264
Specify log: {<RET>=suggested | filename | AUTO | CANCEL}

它要我指定log file。如果我按回车的话,就出现

ORA-00308: cannot open archived log '/home/oracle/software/dbs/arch1_19264.dbf'
ORA-27037: unable to obtain file status
Linux Error: 2: No such file or directory
Additional information: 3

是不是我要自己手动加上log file呢?如果加呢?谢谢!
LGQDUCKY 2005-05-13
  • 打赏
  • 举报
回复
既然有归档,那你归档前做过数据库冷备份没有,现在是SYSTEM系统表空间出了问题,


你可以尝试

sql>recover database until time 'yyyy-mm-dd:hh:mm:ss'--出问题前的时间


如果你使用recover database until cancel你要知道什么时候cancel才行。
EverythingMaster 2005-05-13
  • 打赏
  • 举报
回复
系统表空间坏了........
如果你有原来的数据文件的物理备份,再加上归档日志,就可以恢复;
但是现在你好像只有归档日志,没有数据文件的物理备份,好像........没戏了......

不知道有没有高手能够搞定?

17,377

社区成员

发帖
与我相关
我的任务
社区描述
Oracle 基础和管理
社区管理员
  • 基础和管理社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧