如何轻松取消Excel中的分页提升数据展示效果
1735
2022-05-28
背景:
客户的数据库,之前一直是通过商用备份软件,备份到外置的磁带库内的,因为一些原因,磁带设备要淘汰,然后干脆利落地把磁带库下电搬走;
在此之前有一台备份服务器专门备份此数据库服务器,数据备份到磁带库设备里,后来,在数据库端没有做任何动作的情况下,备份服务器被拆除,在数据库服务器上的备份客户端也被卸载;
因此,rman无法再联系到sbt通道,也意味着list backup里的所有信息均无效;
现在想把list backup的历史备份记录清除掉(delete backup),却一直报错。
问题:
拆卸老磁带库简单粗暴,没有考虑历史备份的数据问题,历史备份已不可用;所以需要手动清理rman里的历史备份记录;
希望以不破坏数据库的正常运行为前提,也不考虑以前的历史备份情况下,清除历史备份信息;
简单来说,就是使list backup命令的结果为空即可;
-- 在RMAN里删除历史备份信息时报错,无法删除,使用以下命令均不行:
RMAN> delete backup;
RMAN> delete backupset;
RMAN> delete noprompt backup;
RMAN> delete obsolete;
RMAN> delete noprompt obsolete;
报错信息:
-- 在执行清理操作时报错如下:
RMAN> delete obsolete;
RMAN retention policy will be applied to the command
RMAN retention policy is set to redundancy 1
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of delete command at 10/23/2015 18:04:47
ORA-19554: error allocating device, device type: SBT_TAPE, device name:
ORA-27211: Failed to load Media Management Library
Additional information: 2
问题排查:
-- 清理历史备份:
RMAN> crosscheck backup;
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of crosscheck command at 10/26/2015 09:26:45
ORA-19554: error allocating device, device type: SBT_TAPE, device name:
ORA-27211: Failed to load Media Management Library
Additional information: 2
-- 清理历史归档:
RMAN> crosscheck archivelog all;
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=192 device type=DISK
validation succeeded for archived log
archived log file name=/oracle/archivelog/orcl/1_10_893527443.dbf RECID=15 STAMP=893887221
validation succeeded for archived log
archived log file name=/oracle/archivelog/orcl/1_11_893527443.dbf RECID=16 STAMP=893970058
validation succeeded for archived log
archived log file name=/oracle/archivelog/orcl/1_12_893527443.dbf RECID=17 STAMP=894034825
Crosschecked 3 objects
RMAN> delete backup of archivelog all;
released channel: ORA_DISK_1
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of delete command at 10/26/2015 09:27:21
ORA-19554: error allocating device, device type: SBT_TAPE, device name:
ORA-27211: Failed to load Media Management Library
Additional information: 2
-- 同样报错,提示SBT_TAPE通道不可用;
因为原有通道已经不存在,所以只能再分配一个虚假的磁带通道:
allocate channel for maintenance device type sbt
parms 'SBT_LIBRARY=oracle.disksbt,ENV=(BACKUP_DIR=/tmp)';
-- 然后再执行:
crosscheck backup;
delete backup;
-- 命令成功,最终结果如下:
RMAN> list backupset;
specification does not match any backup in the repository
RMAN> list backup;
specification does not match any backup in the repository
在清理掉不可用备份之后,重建磁盘存储池,修改备份脚本,使用磁盘通道备份,过程不再赘述;
问题解决!
数据库
版权声明:本文内容由网络用户投稿,版权归原作者所有,本站不拥有其著作权,亦不承担相应法律责任。如果您发现本站中有涉嫌抄袭或描述失实的内容,请联系我们jiasou666@gmail.com 处理,核实后本网站将在24小时内删除侵权内容。