ORA-01157問題解決

來源:互聯網
上載者:User
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                       <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> 

[oracle@ccdevsvr oracle]$ pwd
/home/oracle
[oracle@ccdevsvr 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
[oracle@ccdevsvr 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;

[oracle@ccdevsvr root]$ cd /home/oracle
[oracle@ccdevsvr 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
[oracle@ccdevsvr 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>

作者Blog:http://blog.csdn.net/kb/相關文章

tomcat5.5 的串連池配置
hibernate 初學
建立交叉報表(oracle)
輸出oracle 對象源碼
ORA-01157問題解決

 

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.