ORA-01157: cannot identify/lock data file 6 - see DBWR trace file ORA-01110: 解决方法

查看数据库的启动状态

SQL> select open_mode from v$database;

OPEN_MODE
----------------------------------------
MOUNTED

 

出现ORA-01157错误之后数据库只能启动到mount阶段,因为丢失了数据文件解决方法如下:

先将错误文件脱机

SQL>alter database datafile 6 offline drop;

Database altered.

此时我们可以将数据库正常启动

SQL>alter database open;

Database altered.

SQL>select ts#,file#,name from v$datafile;

TS# FILE# NAME
---------- ---------- --------------------------------------------------
0 1 /u01/app/oracle/oradata/ORCL/system01.dbf
1 2 /u01/app/oracle/oradata/ORCL/undotbs01.dbf
2 3 /u01/app/oracle/oradata/ORCL/sysaux01.dbf
4 4 /u01/app/oracle/oradata/ORCL/users01.dbf
6 5 /u01/app/oracle/oradata/ORCL/example01.dbf
8 6 /u01/app/oracle/oradata/ORCL/tyger01.dbf

红色标注的时出现问题的文件,找到tablespace的名字对应删除然后重启数据库即可

SQL>select tablespace_name,status from dba_tablespaces;

TABLESPACE_NAME           STATUS
------------------------------ ---------
SYSTEM                              ONLINE
UNDOTBS1                         ONLINE
SYSAUX                              ONLINE
TEMP                                  ONLINE
USERS                                ONLINE
EXAMPLE                            ONLINE
TYGER                                ONLINE

SQL>drop tablespace tyger including contents and datafiles;

Tablespace dropped.

到此删除完成。重启数据库

SQL>shutdown immediate

Database closed.
Database dismounted.
ORACLE instance shut down.

SQL>startup

ORACLE instance started.
Total System Global Area 285212672 bytes
Fixed Size 1218992 bytes
Variable Size 130025040 bytes
Database Buffers 150994944 bytes
Redo Buffers 2973696 bytes
Database mounted.
Database opened.

问题是不是解决了呢。

时间: 2024-08-08 22:09:42

ORA-01157: cannot identify/lock data file 6 - see DBWR trace file ORA-01110: 解决方法的相关文章

ORA-01157报错"cannot identify/lock data file"解决

sqlplus以管理员方式接入数据库,启动时出现报错,如下: > sqlplus "/as sysdba" SQL> startup ...... ORA-01157: cannot identify/lock data file 8 - see DBWR trace file ORA-01110: data file 8: '/tmp/test.dbf' 查看数据库日志文件alert_$ORACLE_SID.log,存在对应报错信息: Errors in file ...

ASP.NET MV3 部署网站 报"Could not load file or assembly ' System.Web.Helpers “ 错的解决方法

转自:http://www.cnblogs.com/taven/archive/2011/08/14/2138077.html 国内很多网站空间都只支持.NET 2.0 和 .NET 3.0 3.5,很少有空间商支持.NET 4的,即使有个别支持.NET 4,但是不支持MVC的默认路由访问形式. Go Daddy 的主机支持,并且费用很低,系统为 Win 2008 R2 64位,10GB网站空间,网站并发最便宜的也支持100个,PHP支持5.2和5.3,.NET支持 ASP.NET v1.0/2

rac ORA-001157 数据文件误创 本地盘 共享存储 ASM cannot identify/lock data file

误将数据文件创建在本地盘而不是共享存储 错误原因: 不是共享存储中的数据文件,其他实例不能访问 解决思路和办法: 把本地的数据文件移到共享存储中. 步骤; 1. offline 表空间或数据文件 2. 复制数据文件 3. 重命名数据文件 4. 恢复数据文件(表空间不用) 5. online 表空间或数据文件 复制方案 1. RMAN copy datafile 2. dbms_file_transfer.copy_file 3. ASMCMD cp 详细步骤: 一: alter tablespa

class file for org.springframework.context.ConfigurableApplicationContext not found 解决方法

(来自StackOverflow,GitHub) 问题原因:maven库缓存崩溃 解决方法: 1.使用命令行进入项目路径(pom.xml所在路径),执行mvn dependency:purge-local-repository 2.如果方法一还是不行,删除本地库中的~/.m2/repository/org/springframework文件夹,再执行mvn package 原文地址:https://www.cnblogs.com/somethingintheway/p/8480190.html

git提交过程中遇到的 index.lock 问题导致无法提交的解决方法

在提交代码的过程中,可能会遇到下面的问题: fatal: Unable to create 'C:/programLists/zzw-q1/.git/index.lock': File exists. If no other git process is currently running, this probably means a git process crashed in this repository earlier. Make sure no other git process is

【翻译自mos文章】 在错误的从os级别remove掉 trace file 之后,怎么找到该trace file的内容?

在错误的从os级别remove掉 trace file 之后,怎么找到该trace file的内容? 參考原文: How to Find the Content of Trace File Generated for an Oracle Process after Removing the Trace File by Mistake at OS Level (Doc ID 805083.1) 适用于: Oracle Database - Enterprise Edition - Version

解决:xxx is not in the sudoers file.This incident will be reported.的解决方法

Linux中普通用户用sudo执行命令时报"xxx is not in the sudoers file.This incident will be reported"错误,解决方法就是在/etc/sudoers文件里给该用户添加权限.如下: 1.切换到root用户下  方法为直接在命令行输入:su,然后输入密码(即你的登录密码,且密码默认不可见). 2./etc/sudoers文件默认是只读的,对root来说也是,因此需先添加sudoers文件的写权限,命令是: 即执行操作:chmo

对路径“bin\MySql.Data.xml”的访问被拒绝的解决方法

刚刚从tfs上链接好路径,下载好项目代码之后,清空解决方案后,可能遇到这样的问题.(从项目某文件复制某文件xml类型的时候权限不够,被拒绝) 无法将文件"E:\NetWorkPace\Permission\packages\EntityFramework.6.1.1\lib\net45\MySql.Data.xml"复制到"bin\MySql.Data.xml".对路径"bin\MySql.Data.xml"的访问被拒绝. 解决方法: 你应该是清

mysql启动时报错:Starting MySQL... ERROR! The server quit without updating PID file (/opt/mysql/data/mysql.pid) 的解决方法

出现问题的可能性 1.可能是/opt/mysql/data/数据目录mysql用户没有权限(修改数据目录的权限) 解决方法 :给予权限,执行  "chown -R mysql.mysql /opt/mysql/data"  然后重新启动mysqld 2.可能进程里已经存在mysql进程 解决方法:用命令“ps -ef|grep mysqld”查看是否有mysqld进程,如果有使用“kill -9  进程号”杀死,然后重新启动mysqld! 3.可能是第二次在机器上安装mysql,有残余