今天遇到Oracle啓動報ORA-01157和ORA-01110的錯誤linux
sql>startup mount;sql
sql>alter database open;數據庫
RA-01157: 沒法標識/鎖定數據文件 10 - 請參閱 DBWR 跟蹤文件ORA-01110: 數據文件 10: 'D:\ORACLE\ORADATA\ORCL\USERS02.DBF'ide
解決過程以下:spa
1. startup mountorm
2. alter database openget
ORA-01157: cannot identify/lock data file 10 - see DBWR trace fileit
ORA-01110: data file 12: '/oradata/orcldata/sacproduce02.dbf'class
3. cd /oradatafile
4. cd orcldata
報錯信息爲不能進行讀寫操做,哈哈。找到緣由了,掛載的硬盤不能進行讀寫操做了。要打開數據庫,只能將該文件進行離線操做了。
5. archive log list
歸檔模式下
alter database datafile '/oradata/orcldata/sacproduce02.dbf' offline
非歸檔模式下
alter database datafile '/oradata/orcldata/sacproduce02.dbf'offline drop
6. 到此,數據庫就能夠open了。可是文件中還有須要的數據,接下來就是掛載硬盤,online數據文件,open數據庫。
alter database datafile '/oradata/orcldata/sacproduce02.dbf' online;
ORA-01113: file 12 needs media recovery
ORA-01110: data file 12: '/oradata/orcldata/sacproduce02.dbf'
recover datafile '/oradata/orcldata/sacproduce02.dbf'
alter database datafile '/oradata/orcldata/sacproduce02.dbf' online;
alter database open;
OK,問題解決^_^