中国IT动力,最新最全的IT技术教程
最新100篇 | 推荐100篇 | 专题100篇 | 排行榜 | 搜索 | 在线API文档
首 页 | 程序开发 | 操作系统 | 软件应用 | 图形图象 | 网络应用 | 精文荟萃 | 教育认证 | 硬件维护 | 未整理篇 | 站长教程
ASP JS PHP工程 ASP.NET 网站建设 UML J2EESUN .NET VC VB VFP 网络维护 数据库 DB2 SQL2000 Oracle Mysql
服务器 Win2000 Office C DreamWeaver FireWorks Flash PhotoShop 上网宝典 CorelDraw 协议大全 网络安全 微软认证
硬件维护  CPU  主板  硬盘  内存  显卡  显示器  键盘鼠标  声卡音箱  打印机  机箱电源  BIOS  网卡  C#  Java  Delphi  vs.net2005
  当前位置:> 程序开发 > 数据库开发 > 数据库综合
ORA-01157问题解决
作者:未知 时间:2004-12-01 12:12 出处:Blog 责编:chinaitpower
              摘要:暂无
 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>

关闭本页
 
首页 | 投资与合作 | 服务条款 | 隐私政策 | 收藏本站 | 设为首页 | 新用户注册 | 免责声明 | 使用帮助
Copyright ©2005-2008 chinaitpower.com All rights reserved. www.chinaitpower.com 版权所有