网络编程 | 站长之家 | 网页制作 | 图形图象 | 操作系统 | 冲浪宝典 | 软件教学 | 网络办公 | 邮件系统 | 网络安全 | 认证考试 | 系统进程
Firefox | IE | Maxthon | 迅雷 | 电驴 | BitComet | FlashGet | QQ | QQ空间 | Vista | 输入法 | Ghost | Word | Excel | wps | Powerpoint
asp | .net | php | jsp | Sql | c# | Ajax | xml | Dreamweaver | FrontPages | Javascript | css | photoshop | fireworks | Flash | Cad | Discuz!
当前位置 > 网站建设学院 > 网络编程 > 数据库 > Oracle教程
Tag:注入,存储过程,分页,安全,优化,xmlhttp,fso,jmail,application,session,防盗链,stream,无组件,组件,md5,乱码,缓存,加密,验证码,算法,cookies,ubb,正则表达式,水印,索引,日志,压缩,base64,url重写,上传,控件,Web.config,JDBC,函数,内存,PDF,迁移,结构,破解,编译,配置,进程,分词,IIS,Apache,Tomcat,phpmyadmin,Gzip,触发器,socket
数据库:数据库教程,数据库技巧,Oracle教程,MySQL教程,Sybase教程,Access教程,DB2教程,数据库安全,数据库文摘
本月文章推荐
.为何我的导出文件只有500K,导入时.
.轻松进行 Linux 打印.
.防范黑客攻击Oracle系统的八大常.
.如何在硬碟建置Linux系统之使用 .
.Oracle XML学习笔记-存储XML数据.
.ORACLE常用的SQL语法和数据对象.
.Oracle多个远程输入验证漏洞.
.在Windows下管理Oracle9i服务.
.Oracle 9i 数据库设计指引全集(.
.利用modplsql使用灵活的参数传递.
..Net与Oracle的数据库连接池(Co.
.在Adaptive Server Anywhere和Or.
.ORACLE SQL性能优化系列(九).
.增加或修改列时的规则.
.Oracle 9i新特性研究三(撤销段的.
.ORACLE 服务器的配置及优化.
.FAQ for the Oracle Intelligent.
.六则Oracle数据库系统使用经验.
.Oracle的左连接和右连接.
.SQL*PLUS常用命令列表.

ORA-01157问题解决

发表日期:2008-2-9



    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>
上一篇:Oracle9i初始化参数中文说明3 人气:555
下一篇:监控Oracle数据库的常用shell脚本 人气:760
浏览全部Oracle教程的内容 Dreamweaver插件下载 网页广告代码 祝你圣诞节快乐 2009年新年快乐