ORA-01157问题解决


ORA-01157问题怎么解决?

环境:redhat 9 + oracle 817
问题:昨天突然掉电之后数据库启动之后就提示这个错误。数据是非归档模式,而且这个数据文件还有用。怎么恢复。

[oracle@ccdevsvr root]$ svrmgrl

Oracle Server Manager Release 3.1.7.0.0 - Production

Copyright (c) 1997, 1999, Oracle Corporation. All Rights Reserved.

Oracle8i Enterprise Edition Release 8.1.7.4.0 - Production
With the Partitioning option
JServer Release 8.1.7.4.0 - Production

SVRMGR> connect system/manager as sysdba
Connected.
SVRMGR> show
Instance local
Spool OFF
Timing OFF
Termout ON
Echo OFF
Stoponerror OFF
Autorecovery OFF
Logsource

 1<default>   
 2Maxdata 20480   
 3Numwidth 10   
 4Charwidth 80   
 5Longwidth 80   
 6Datewidth 9   
 7Labwidth 32   
 8Compatibility NATIVE   
 9Retries infinite   
10Server Output OFF   
11Autoprint OFF   
12Fetchrows infinite   
13Appinfo OFF (USERTEXT : Oracle Server Manager)   
14SVRMGR&gt; startup   
15ORA-01081: cannot start already-running ORACLE - shut it down first   
16SVRMGR&gt; shutdown immediate   
17ORA-01109: database not open   
18Database dismounted.   
19ORACLE instance shut down.   
20SVRMGR&gt; startup   
21ORACLE instance started.   
22Total System Global Area 73109664 bytes   
23Fixed Size 73888 bytes   
24Variable Size 56086528 bytes   
25Database Buffers 16777216 bytes   
26Redo Buffers 172032 bytes   
27Database mounted.   
28ORA-01157: cannot identify/lock data file 10 - see DBWR trace file   
29ORA-01110: data file 10: '/home/oracle/dwbx_wmstat.dbf'   
30SVRMGR&gt;   
31  
32[oracle@ccdevsvr oracle]$ pwd   
33/home/oracle   
34[oracle@ccdevsvr oracle]$ ll *.dbf   
35-rwxrwxrwx 1 oracle dba 209723392 Nov 29 11:47 iwbx_wmindx.dbf   
36-rwxrwxrwx 1 oracle dba 104865792 Dec 1 09:35 test.dbf   
37[oracle@ccdevsvr oracle]$   
38数据库是否归档模式?   
39在mount状态:   
40  
41归档的话:   
42SQL&gt;alter database datafile 'I:\ORADATA\EXAMORA\TEST01.DBF' offline;   
43非归档的话:   
44SQL&gt;alter database datafile 'I:\ORADATA\EXAMORA\TEST01.DBF' offline drop;   
45  
46然后在   
47SQL&gt;alter database open;   
48  
49[oracle@ccdevsvr root]$ cd /home/oracle   
50[oracle@ccdevsvr oracle]$ ll *.dbf   
51-rwxrwxrwx 1 oracle dba 209723392 Nov 29 11:47 iwbx_wmindx.dbf   
52-rwxrwxrwx 1 oracle dba 104865792 Dec 1 09:35 test.dbf   
53[oracle@ccdevsvr oracle]$ exit   
54exit   
55SVRMGR&gt; select sysdate from dual;   
56SYSDATE   
57\---------   
5801-DEC-04   
591 row selected.   
60  
61SVRMGR&gt; alter database open   
622&gt; ;   
63alter database open   
64*   
65ORA-01157: cannot identify/lock data file 10 - see DBWR trace file   
66ORA-01110: data file 10: '/home/oracle/dwbx_wmstat.dbf'   
67SVRMGR&gt; alter database datafile '/home/oracle/dwbx_wmstat.dbf' offline drop;   
68Statement processed.   
69SVRMGR&gt; alter database open;   
70Statement processed.   
71SVRMGR&gt;</default>
Published At
Categories with 数据库类
comments powered by Disqus