本篇文章是 ORACLE 恢复 rm 的数据文件 的续,在 ORACLE 恢复 rm 的数据文件 文章发布之后得倒网友 柚子身上依 的提示说:12c之后move 数据文件可以在线进行了,不需要 offline 表空间了,这次在这里测试如下,确实是可以的。
alter database move datafile 7 to '/oradata/ORCL/users01_07.dbf'
复制
对应的 alert 日志如下:
2022-12-23T20:27:05.186647+08:00 alter database move datafile 7 to '/oradata/ORCL/users01_07.dbf' 2022-12-23T20:27:05.189702+08:00 Moving datafile /oradata/ORCL/users01.dbf (7) to /oradata/ORCL/users01_07.dbf Move operation committed for file /oradata/ORCL/users01_07.dbf
复制
本次继续测试rm 数据文件,既然12c之后可以直接move 数据文件了,那如果库没关闭的时候的时候,我直接move 文件是否可以呢。
这里我又重新将数据文件重新rm掉之后,进入一些批量插入的操作。
2022-12-23T20:29:09.331084+08:00 Errors in file /u01/app/oracle/diag/rdbms/orcl/orcl/trace/orcl_ckpt_1994.trc: ORA-01242: data file suffered media failure: database in NOARCHIVELOG mode ORA-01116: error in opening database file 5 ORA-01110: data file 5: '/oradata/ORCL/tbs01.dbf' ORA-27041: unable to open file Linux-x86_64 Error: 2: No such file or directory Additional information: 3 2022-12-23T20:29:09.337885+08:00 Errors in file /u01/app/oracle/diag/rdbms/orcl/orcl/trace/orcl_ckpt_1994.trc: ORA-01242: data file suffered media failure: database in NOARCHIVELOG mode ORA-01116: error in opening database file 5 ORA-01110: data file 5: '/oradata/ORCL/tbs01.dbf' ORA-27041: unable to open file Linux-x86_64 Error: 2: No such file or directory Additional information: 3 Errors in file /u01/app/oracle/diag/rdbms/orcl/orcl/trace/orcl_ckpt_1994.trc (incident=14561): ORA-1242 [] [] [] [] [] [] [] [] [] [] [] [] Incident details in: /u01/app/oracle/diag/rdbms/orcl/orcl/incident/incdir_14561/orcl_ckpt_1994_i14561.trc 2022-12-23T20:29:09.532784+08:00 Errors in file /u01/app/oracle/diag/rdbms/orcl/orcl/trace/orcl_mz00_6960.trc: ORA-01110: data file 5: '/oradata/ORCL/tbs01.dbf' ORA-01565: error in identifying file '/oradata/ORCL/tbs01.dbf' ORA-27037: unable to obtain file status Linux-x86_64 Error: 2: No such file or directory Additional information: 7 2022-12-23T20:29:10.507875+08:00 CKPT (ospid: 1994): terminating the instance due to ORA error 1242 2022-12-23T20:29:10.533727+08:00 System state dump requested by (instance=1, osid=1994 (CKPT)), summary=[abnormal instance termination]. System State dumped to trace file /u01/app/oracle/diag/rdbms/orcl/orcl/trace/orcl_diag_1967.trc 2022-12-23T20:29:11.242017+08:00 Dumping diagnostic data in directory=[cdmp_20221223202910], requested by (instance=1, osid=1994 (CKPT)), summary=[abnormal instance termination]. 2022-12-23T20:29:12.333703+08:00 Instance terminated by CKPT, pid = 1994 2022-12-23T20:30:49.120156+08:00 Starting ORACLE instance (normal) (OS id: 7337)
复制
在批量插入数据的时候,问题出现了,数据库竟然宕机了。。这在上次测试的rm掉数据文件之后,并批量插入数据文件之后,数据库可以正常运行,并且能够select出来数据不同的是,这次数据库就直接挂了。。通过上面的alert 日志可以清晰的看到
以下是 ora-1242 的报错说明:
[oracle@dsmart:/u01/app/oracle/diag/rdbms/orcl/orcl/trace]$ oerr ora 1242 01242, 00000, "data file suffered media failure: database in NOARCHIVELOG mode" // *Cause: The database is in NOARCHIVELOG mode and a database file was // detected as inaccessible due to media failure. // *Action: Restore accessibility to the file mentioned in the error stack // and restart the instance. [oracle@dsmart:/u01/app/oracle/diag/rdbms/orcl/orcl/trace]$
复制
数据处于非归档模式,且数据文件无法访问,数据库就直接宕了,但是上次确实是可以的,可能上次是我手工进行过切换归档,这次没有手工切换,但是不确定是不是这个原因,等有时间再测试。本次续的目的是主要是要表达如下:当发现数据文件被误删除之后,第一时间停止数据库的写入操作,可以将表空间只读等,防止数据库异常宕机,只要数据异常宕机就无法通过内存具柄的方式将数据文件重新复制回去。
「喜欢这篇文章,您的关注和赞赏是给作者最好的鼓励」
关注作者
【版权声明】本文为墨天轮用户原创内容,转载时必须标注文章的来源(墨天轮),文章链接,文章作者等基本信息,否则作者和墨天轮有权追究责任。如果您发现墨天轮中有涉嫌抄袭或者侵权的内容,欢迎发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。
评论
相关阅读
Oracle RAC 一键安装翻车?手把手教你如何排错!
Lucifer三思而后行
565次阅读
2025-04-15 17:24:06
【纯干货】Oracle 19C RU 19.27 发布,如何快速升级和安装?
Lucifer三思而后行
494次阅读
2025-04-18 14:18:38
Oracle SQL 执行计划分析与优化指南
Digital Observer
465次阅读
2025-04-01 11:08:44
XTTS跨版本迁移升级方案(11g to 19c RAC for Linux)
zwtian
456次阅读
2025-04-08 09:12:48
墨天轮个人数说知识点合集
JiekeXu
456次阅读
2025-04-01 15:56:03
【ORACLE】记录一些ORACLE的merge into语句的BUG
DarkAthena
443次阅读
2025-04-22 00:20:37
Oracle数据库一键巡检并生成HTML结果,免费脚本速来下载!
陈举超
431次阅读
2025-04-20 10:07:02
【ORACLE】你以为的真的是你以为的么?--ORA-38104: Columns referenced in the ON Clause cannot be updated
DarkAthena
418次阅读
2025-04-22 00:13:51
Oracle 19c RAC更换IP实战,运维必看!
szrsu
404次阅读
2025-04-08 23:57:08
【活动】分享你的压箱底干货文档,三篇解锁进阶奖励!
墨天轮编辑部
375次阅读
2025-04-17 17:02:24
TA的专栏
ORACLE、MySQL、PostgreSQL对比
收录3篇内容
TDE
收录4篇内容
热门文章
DG Broker 遇到 ORA-12545: Connect failed because target host or object does not exist
2023-02-09 3096浏览
MySQL ERROR 1045 (28000): Access denied for user <user>@<hostname> 问题汇总
2024-03-21 2850浏览
ORACLE RAC 到单机 DG Broker 配置与切换
2023-02-08 2835浏览
MySQL 登录报 ERROR 1045 (28000) 错误的问题汇总
2023-04-10 2532浏览
ORACLE 12c 手动安装 Spatial 选件
2023-01-15 2403浏览
最新文章
ORACLE lsnrctl reload 1521 会发生什么
2024-11-08 70浏览
Centos 6 单机 ORACLE 11g 修改 hostname OEM 无法正常运行问题处理
2024-09-15 66浏览
ORACLE 19c using dbca to duplicate a Physical Standby database
2024-09-15 209浏览
ORACLE、MySQL、PostgreSQL 客户端 sqlplus,mysql,psql 常用命令对比(三)
2024-08-01 739浏览
MySQL ERROR 1045 (28000): Access denied for user <user>@<hostname> 问题汇总
2024-03-21 2850浏览