记一次坑爹的ORA-01152&ORA-01110错误
最近做RMAN还原时遇到了一次非常坑爹的ORA-01152&ORA-01110错误。遇到的具体错误信息如下所示:
RMAN> alter database open resetlogs;
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of alter db command at 11/08/2017 18:56:25
ORA-01152: file 1 was not restored from a sufficiently old backup
ORA-01110: data file 1: '/u01/oradata/SCM2/system01.dbf '
刚开始不清楚为什么出现这个错误,各种折腾都没有彻底解决。后面仔细检查自己的脚本时,然来是自己的粗心把自己坑了,泪流满面啊!!
run {
sql'alter session set nls_date_format="yyyy-mm-dd hh24:mi:ss"';
set until time '2017-11-08 03:30:00';
set newname for datafile 1 to "/u01/oradata/SCM2/system01.dbf ";
set newname for datafile 2 to "/u01/oradata/SCM2/undotbs01.dbf ";
set newname for datafile 3 to "/u04/oradata/SCM2/undotbs02.dbf ";
set newname for datafile 4 to "/u01/oradata/SCM2/sysaux01.dbf ";
set newname for datafile 5 to "/u01/oradata/SCM2/users01.dbf ";
…………………………………………………………………………………………………
…………………………………………………………………………………………………………
restore database;
switch datafile all;
restore database;
}
注意上面红色部分,本来应该是recover database命令,结果由于粗心弄成了restore database,而且由于上面命令一大串,一直没有关注命令细节。老是在纠结出错信息。真是坑爹,粗心害死人!
推荐阅读
-
记一次在node.js中使用crypto的createCipheriv方法进行加密时所遇到的坑
-
详细记一次Docker部署服务的爬坑历程
-
记一次webpack3升级webpack4的踩坑经历
-
记一次坑爹的ORA-01152&ORA-01110错误
-
记一次FTP下载踩坑的故(shi)事(gu)
-
记一次学习PHP中的错误
-
记一次python3.7环境安装dlib模块遇到的坑
-
记一次部署项目踩过的坑
-
记一次数据库迁移遇到的坑
-
【记录一次坑经历】axios使用x-www-form-urlencoded 服务器报400(错误的请求。 )(后端.Net MVC5 WebApi OAuth,前端Electron-Vue)