今天重启一套测试库,先shutdown immediate报错,提示文件1在备份,关闭不了。。第一反应是文件损坏了,需要介质恢复,但是相关的归档日志早已经被删掉了,恢复不了,于是一方面去找相关备份,一方面网上查询该问题,结果还真找着了,一句 alter database end backup; 解决了问题!!!原来是因为之前sap 的工具brtools发起的数据库备份,没有正常结束,导致数据文件scn被修改,停掉后正常启动了,真是到处都有坑呀。。
SQL> shutdown immediate ORA-01149: cannot shutdown - file 1 has online backup set ORA-01110: data file 1: ‘/oracle/RED/sapdata1/system_1/system.data1‘ SQL> shutdown immediate ORA-01149: cannot shutdown - file 1 has online backup set ORA-01110: data file 1: ‘/oracle/RED/sapdata1/system_1/system.data1‘ SQL> SQL> startup force ORACLE instance started. Total System Global Area 2902458368 bytes Fixed Size 2074088 bytes Variable Size 1459620376 bytes Database Buffers 1426063360 bytes Redo Buffers 14700544 bytes Database mounted. ORA-01113: file 1 needs media recovery ORA-01110: data file 1: ‘/oracle/RED/sapdata1/system_1/system.data1‘ SQL> select open_mode from v$database; OPEN_MODE ---------- MOUNTED SQL> SQL> SQL> alter database open; alter database open * ERROR at line 1: ORA-01113: file 1 needs media recovery ORA-01110: data file 1: ‘/oracle/RED/sapdata1/system_1/system.data1‘SQL> SQL> recover datafile 1 ORA-00279: change 1414625596 generated at 04/10/2016 02:00:45 needed for thread 1 ORA-00289: suggestion : /oracle/RED/oraarch/1_118503_615654930.dbf ORA-00280: change 1414625596 for thread 1 is in sequence #118503 Specify log: {<RET>=suggested | filename | AUTO | CANCEL} ORA-00308: cannot open archived log ‘/oracle/RED/oraarch/1_118503_615654930.dbf‘ ORA-27037: unable to obtain file status IBM AIX RISC System/6000 Error: 2: No such file or directory Additional information: 3 SQL> select file#,status from v$datafile; FILE# STATUS ---------- ------- 1 SYSTEM 2 ONLINE 3 ONLINE SQL> alter database end backup; --解决问题了 Database altered. SQL> alter database open; Database altered. SQL> select open_mode from v$database; OPEN_MODE ---------- READ WRITE
时间: 2024-09-28 16:45:58