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---  
40数据库是否归档模式?   
41在mount状态:   
42  
43归档的话:   
44SQL&gt;alter database datafile 'I:\ORADATA\EXAMORA\TEST01.DBF' offline;   
45非归档的话:   
46SQL&gt;alter database datafile 'I:\ORADATA\EXAMORA\TEST01.DBF' offline drop;   
47  
48然后在   
49SQL&gt;alter database open;   
50  
51  
52[oracle@ccdevsvr root]$ cd /home/oracle   
53[oracle@ccdevsvr oracle]$ ll *.dbf   
54-rwxrwxrwx 1 oracle dba 209723392 Nov 29 11:47 iwbx_wmindx.dbf   
55-rwxrwxrwx 1 oracle dba 104865792 Dec 1 09:35 test.dbf   
56[oracle@ccdevsvr oracle]$ exit   
57exit   
58SVRMGR&gt; select sysdate from dual;   
59SYSDATE   
60\---------   
6101-DEC-04   
621 row selected. 
63
64SVRMGR&gt; alter database open   
652&gt; ;   
66alter database open   
67*   
68ORA-01157: cannot identify/lock data file 10 - see DBWR trace file   
69ORA-01110: data file 10: '/home/oracle/dwbx_wmstat.dbf'   
70SVRMGR&gt; alter database datafile '/home/oracle/dwbx_wmstat.dbf' offline drop;   
71Statement processed.   
72SVRMGR&gt; alter database open;   
73Statement processed.   
74SVRMGR&gt;</default>
Published At
Categories with 数据库类
comments powered by Disqus