在线精品99_中国九九盗摄偷拍偷看_91免费版在线观看_91.app_91高清视频在线_99热最新网站

Oracle表空间误删除导致startup启动时提示ORA

108次阅读
没有评论

共计 3934 个字符,预计需要花费 10 分钟才能阅读完成。

行业资讯    
数据库    
关系型数据库    
Oracle 表空间误删除导致 startup 启动时提示 ORA-01110 和 ORA-01157 错误怎么办

这篇文章主要讲解了“Oracle 表空间误删除导致 startup 启动时提示 ORA-01110 和 ORA-01157 错误怎么办”,文中的讲解内容简单清晰,易于学习与理解,下面请大家跟着丸趣 TV 小编的思路慢慢深入,一起来研究和学习“Oracle 表空间误删除导致 startup 启动时提示 ORA-01110 和 ORA-01157 错误怎么办”吧!

今天遇到一个比较神奇的问题,客户某套测试数据库断电重启了,重启时发现数据库提示 ORA-01157: cannot identify/lock data file 和 ORA-01110 的错误,经过检查发现是系统启动后未挂载存储,表空间都放在存储盘上,手工挂载存储后所有问题迎刃而解。当时没有记录问题,这里通过测试环境模拟重现问题。

制造实验数据

[oracle@XLJ181 ~]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.4.0 Production on Mon Dec 10 19:27:14 2018
Copyright (c) 1982, 2013, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SYS@cams  create tablespace test datafile  /home/oracle/test.dbf  size 100M;
Tablespace created.
SYS@cams  create user test identified by 123456 default tablespace test;
User created.
SYS@cams  grant connect,resource to test;
Grant succeeded.
TEST@cams  create table test(id number primary key,name varchar2(20));
Table created.
TEST@cams  insert into test values(1, bob 
1 row created.
TEST@cams  insert into test values(2, joe 
1 row created.
TEST@cams  select count(*) from test;
 COUNT(*)
----------
  2
TEST@cams  conn / as sysdba
Connected.
SYS@cams  shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SYS@cams  exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

模拟文件误删除

[oracle@XLJ181 ~]$ mv /home/oracle/test.dbf /home/oracle/test.dbf.bak

故障出现

启动数据库,发现数据文件不存在:

[oracle@XLJ181 ~]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.4.0 Production on Mon Dec 10 19:38:26 2018
Copyright (c) 1982, 2013, Oracle. All rights reserved.
Connected to an idle instance.
SYS@cams  startup;
ORACLE instance started.
Total System Global Area 5344731136 bytes
Fixed Size  2262656 bytes
Variable Size  1040189824 bytes
Database Buffers  4294967296 bytes
Redo Buffers  7311360 bytes
Database mounted.
ORA-01157: cannot identify/lock data file 63 - see DBWR trace file
ORA-01110: data file 63:  /home/oracle/test.dbf

查看 trace 文件:

Mon Dec 10 19:38:35 2018
ALTER DATABASE OPEN
Errors in file /u01/app/oracle/diag/rdbms/cams/cams/trace/cams_dbw0_21153.trc:
ORA-01157: cannot identify/lock data file 63 - see DBWR trace file
ORA-01110: data file 63:  /home/oracle/test.dbf 
ORA-27037: unable to obtain file status
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3
Errors in file /u01/app/oracle/diag/rdbms/cams/cams/trace/cams_ora_21175.trc:
ORA-01157: cannot identify/lock data file 63 - see DBWR trace file
ORA-01110: data file 63:  /home/oracle/test.dbf 
ORA-1157 signalled during: ALTER DATABASE OPEN...

查看 cams_ora_21175.trc 文件,报错信息如下:

DDE: Problem Key  ORA 1110  was flood controlled (0x1) (no incident)
ORA-01110: data file 63:  /home/oracle/test.dbf 
ORA-01157: cannot identify/lock data file 63 - see DBWR trace file
ORA-01110: data file 63:  /home/oracle/test.dbf

查看 cams_dbw0_21153.trc 文件,报错信息如下:

ORA-01157: cannot identify/lock data file 63 - see DBWR trace file
ORA-01110: data file 63:  /home/oracle/test.dbf 
ORA-27037: unable to obtain file status
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3

问题已经很明显了,就是找不到 data file 63:  /home/oracle/test.dbf。

针对该问题,我们应该怎么去处理呢?特别是测试环境,一般为了节约资源,不会开启归档,更不会有 RMAN 备份,那怎么让数据库跑起来,让数据损失降到最低呢?

常用解决方案:offline drop+recreate

SQL  shutdown immediate;
SQL  startup mount;
SQL  alter database datafile  /home/oracle/test.dbf  offline drop;
SQL  alter database open;
SQL  drop tablespace test including contents; -- 注意:执行之前检查是否还有其他文件属于该表空间
SQL  create tablespace test datafile  /home/oracle/test.dbf  size 100M;

因为是测试环境,想办法重建数据或者利用最近的逻辑备份或其他测试导入数据,这样能把数据损失降到最低。

如果删除的是核心系统的表空间,那么还不如重建表空间之后把相关数据清理之后重新导入一份。

感谢各位的阅读,以上就是“Oracle 表空间误删除导致 startup 启动时提示 ORA-01110 和 ORA-01157 错误怎么办”的内容了,经过本文的学习后,相信大家对 Oracle 表空间误删除导致 startup 启动时提示 ORA-01110 和 ORA-01157 错误怎么办这一问题有了更深刻的体会,具体使用情况还需要大家实践验证。这里是丸趣 TV,丸趣 TV 小编将为大家推送更多相关知识点的文章,欢迎关注!

正文完
 
丸趣
版权声明:本站原创文章,由 丸趣 2023-07-28发表,共计3934字。
转载说明:除特殊说明外本站除技术相关以外文章皆由网络搜集发布,转载请注明出处。
评论(没有评论)
主站蜘蛛池模板: 欧美一级视屏 | 日日摸夜夜添夜夜添欧美毛片小说 | 一级一黄在线观看视频免费 | 免费观看黄色网页 | 性按摩xxxx在线观看 | 97精品一区二区视频在线观看 | 国产成人高清亚洲一区91 | 特黄特黄 | 少妇被躁爽到高潮无码文 | 成人在线免费电影 | 亚洲激情久久 | 亚洲欧美日韩综合一区二区 | 欧美交换配乱吟粗大 | 免费一级视频在线播放 | 黄色在线免费观看网址 | 婷婷综合在线 | 亚洲欧美人成人让影院 | 99热久久最新地址获6取 | 天天摸天天碰色综合网 | 中文字幕+乱码+中文字幕无忧 | 亚洲色偷偷色噜噜狠狠99 | 日韩综合无码一区二区 | 极品成人影院 | 91精品成人福利在线播放 | 四虎影院紧急入口 | 一本一本久久a久久精品综合麻豆 | 九九九九九九精品免费 | 在厨房被c到高潮a毛片奶水 | 亚洲一区网站 | 成人在线免费播放 | 国产亚洲视频网站 | 四虎免费大片aⅴ入口 | 伊人色综合视频一区二区三区 | 日韩高清一区 | 国产成人免费高清激情视频 | 黄色一级性生活视频 | 亚洲人成网国产最新在线 | 成人免费手机在线看网站 | xxxxwww日本在线| 久久免费动漫品精老司机 | 午夜福利毛片 |