ORA-01157问题解决
2024-07-21 02:09:45
供稿:网友
ora-01157问题怎么解决?
环境:redhat 9 + oracle 817
问题:昨天突然掉电之后数据库启动之后就提示这个错误。数据是非归档模式,而且这个数据文件还有用。怎么恢复。
[[email protected] 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 <default>
maxdata 20480
numwidth 10
charwidth 80
longwidth 80
datewidth 9
labwidth 32
compatibility native
retries infinite
server output off
autoprint off
fetchrows infinite
appinfo off (usertext : oracle server manager)
svrmgr> startup
ora-01081: cannot start already-running oracle - shut it down first
svrmgr> shutdown immediate
ora-01109: database not open
database dismounted.
oracle instance shut down.
svrmgr> startup
oracle instance started.
total system global area 73109664 bytes
fixed size 73888 bytes
variable size 56086528 bytes
database buffers 16777216 bytes
redo buffers 172032 bytes
database mounted.
ora-01157: cannot identify/lock data file 10 - see dbwr trace file
ora-01110: data file 10: '/home/oracle/dwbx_wmstat.dbf'
svrmgr>
[[email protected] oracle]$ pwd
/home/oracle
[[email protected] oracle]$ ll *.dbf
-rwxrwxrwx 1 oracle dba 209723392 nov 29 11:47 iwbx_wmindx.dbf
-rwxrwxrwx 1 oracle dba 104865792 dec 1 09:35 test.dbf
[[email protected] oracle]$
数据库是否归档模式?
在mount状态:
归档的话:
sql>alter database datafile 'i:/oradata/examora/test01.dbf' offline;
非归档的话:
sql>alter database datafile 'i:/oradata/examora/test01.dbf' offline drop;
然后在
sql>alter database open;
[[email protected] root]$ cd /home/oracle
[[email protected] oracle]$ ll *.dbf
-rwxrwxrwx 1 oracle dba 209723392 nov 29 11:47 iwbx_wmindx.dbf
-rwxrwxrwx 1 oracle dba 104865792 dec 1 09:35 test.dbf
[[email protected] oracle]$ exit
exit
svrmgr> select sysdate from dual;
sysdate
---------
01-dec-04
1 row selected.
svrmgr> alter database open
2> ;
alter database open
*
ora-01157: cannot identify/lock data file 10 - see dbwr trace file
ora-01110: data file 10: '/home/oracle/dwbx_wmstat.dbf'
svrmgr> alter database datafile '/home/oracle/dwbx_wmstat.dbf' offline drop;
statement processed.
svrmgr> alter database open;
statement processed.
svrmgr>