zoukankan      html  css  js  c++  java
  • 【Oracle】ORA-01157: cannot identify/lock data file 201

    今天数据库在查询数据的时候显示了这个错误:

    ORA-01157: cannot identify/lock data file 201 - see DBWR trace file
    ORA-01110: data file 201: '/u01/app/oracle/oradata/ORA11GR2/temp01.dbf'
    ---查看临时表空间
    SYS@GOOD> select FILE_NAME, TABLESPACE_NAME from dba_temp_files;
    select FILE_NAME, TABLESPACE_NAME from dba_temp_files
                                           *
    ERROR at line 1:
    ORA-01157: cannot identify/lock data file 201 - see DBWR trace file
    ORA-01110: data file 201: '/u01/app/oracle/oradata/ORA11GR2/temp01.dbf'

    很明显这是我的临时表空间数据文件丢失了,导致不能查看数据文件

    解决办法:

    ---删除文件
    SYS@GOOD> alter database tempfile '/u01/app/oracle/oradata/ORA11GR2/temp01.dbf'drop;
    
    Database altered.
    ---重建文件
    SYS@GOOD> alter tablespace temp add tempfile'/u01/app/oracle/oradata/GOOD/temp01.dbf'size 100M;
    
    Tablespace altered.
    
    ---验证文件
    SYS@GOOD> select file_name,tablespace_name from dba_temp_files;
    
    FILE_NAME                                       TABLESPACE_NAME
    ----------------------------------------------  -------
    /u01/app/oracle/oradata/GOOD/temp01.dbf         TEMP
    
  • 相关阅读:
    webIDE 第二篇博文
    前端第一天
    记昨天
    入职第四天
    入职第二天
    linux常用命令,自己总结
    一切从头开始
    在服务器上搭建SVN
    Dynamic CRM 365学习历程--JS
    Dynamic CRM 365学习历程--有关CRM的学习过程种需要注意的事项
  • 原文地址:https://www.cnblogs.com/NextAction/p/7366678.html
Copyright © 2011-2022 走看看