查询

RMAN> list backup;

using target database control file instead of recovery catalog

List of Backup Sets
=================== BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
Full 9.33M DISK :: -MAY-
BP Key: Status: AVAILABLE Compressed: NO Tag: TAG20150529T135312
Piece Name: /home/oracle/backup//ZGW_cntrl_42_1_42
Control File Included: Ckp SCN: Ckp time: -MAY- BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
Full 592.95M DISK :: -MAY-
BP Key: Status: AVAILABLE Compressed: NO Tag: TAG20150529T135134
Piece Name: /home/oracle/backup//ZGW_20150529_18q85g77_1_1
List of Datafiles in backup set
File LV Type Ckp SCN Ckp Time Name
---- -- ---- ---------- --------- ----
Full -MAY- /opt/oracle/oradata/zgw/system01.dbf
Full -MAY- /opt/oracle/oradata/zgw/users01.dbf BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
Full .00K DISK :: -MAY-
BP Key: Status: AVAILABLE Compressed: NO Tag: TAG20150529T135318
Piece Name: /home/oracle/backup//%_spfile_1bq85gae_1_1.bak
SPFILE Included: Modification time: -MAY-
SPFILE db_unique_name: ZGW BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
Full 398.51M DISK :: -MAY-
BP Key: Status: AVAILABLE Compressed: NO Tag: TAG20150529T135134
Piece Name: /home/oracle/backup//ZGW_20150529_19q85g78_1_1
List of Datafiles in backup set
File LV Type Ckp SCN Ckp Time Name
---- -- ---- ---------- --------- ----
Full -MAY- /opt/oracle/oradata/zgw/sysaux01.dbf
Full -MAY- /opt/oracle/oradata/zgw/undotbs01.dbf BS Key Size Device Type Elapsed Time Completion Time
------- ---------- ----------- ------------ ---------------
1.50M DISK :: -MAY-
BP Key: Status: AVAILABLE Compressed: NO Tag: TAG20150529T135320
Piece Name: /home/oracle/backup//ZGW_arc_880984400_44 List of Archived Logs in backup set
Thrd Seq Low SCN Low Time Next SCN Next Time
---- ------- ---------- --------- ---------- ---------
-MAY- -MAY- BS Key Size Device Type Elapsed Time Completion Time
------- ---------- ----------- ------------ ---------------
.50K DISK :: -MAY-
BP Key: Status: AVAILABLE Compressed: NO Tag: TAG20150529T135320
Piece Name: /home/oracle/backup//ZGW_arc_880984401_45 List of Archived Logs in backup set
Thrd Seq Low SCN Low Time Next SCN Next Time
---- ------- ---------- --------- ---------- ---------
-MAY- -MAY-

指定备份片序号删除

RMAN> delete backupset ,;

allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID= device type=DISK List of Backup Pieces
BP Key BS Key Pc# Cp# Status Device Type Piece Name
------- ------- --- --- ----------- ----------- ----------
AVAILABLE DISK /home/oracle/backup//ZGW_cntrl_42_1_42
AVAILABLE DISK /home/oracle/backup//ZGW_20150529_18q85g77_1_1 Do you really want to delete the above objects (enter YES or NO)? y
deleted backup piece
backup piece handle=/home/oracle/backup//ZGW_cntrl_42_1_42 RECID= STAMP=
deleted backup piece
backup piece handle=/home/oracle/backup//ZGW_20150529_18q85g77_1_1 RECID= STAMP=
Deleted objects

操作系统命令删除后

[oracle@Oracle11_2 ]$ ls
backupall_20150529135121.log %_spfile_1bq85gae_1_1.bak ZGW_20150529_19q85g78_1_1 ZGW_arc_880984400_44 ZGW_arc_880984401_45
[oracle@Oracle11_2 ]$ rm ZGW_*
[oracle@Oracle11_2 ]$ ls
backupall_20150529135121.log %_spfile_1bq85gae_1_1.bak
[oracle@Oracle11_2 ]$

查询

RMAN> list backup;

List of Backup Sets
=================== BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
Full .00K DISK :: -MAY-
BP Key: Status: AVAILABLE Compressed: NO Tag: TAG20150529T135318
Piece Name: /home/oracle/backup//%_spfile_1bq85gae_1_1.bak
SPFILE Included: Modification time: -MAY-
SPFILE db_unique_name: ZGW BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
Full 398.51M DISK :: -MAY-
BP Key: Status: AVAILABLE Compressed: NO Tag: TAG20150529T135134
Piece Name: /home/oracle/backup//ZGW_20150529_19q85g78_1_1
List of Datafiles in backup set
File LV Type Ckp SCN Ckp Time Name
---- -- ---- ---------- --------- ----
Full -MAY- /opt/oracle/oradata/zgw/sysaux01.dbf
Full -MAY- /opt/oracle/oradata/zgw/undotbs01.dbf BS Key Size Device Type Elapsed Time Completion Time
------- ---------- ----------- ------------ ---------------
1.50M DISK :: -MAY-
BP Key: Status: AVAILABLE Compressed: NO Tag: TAG20150529T135320
Piece Name: /home/oracle/backup//ZGW_arc_880984400_44 List of Archived Logs in backup set
Thrd Seq Low SCN Low Time Next SCN Next Time
---- ------- ---------- --------- ---------- ---------
-MAY- -MAY- BS Key Size Device Type Elapsed Time Completion Time
------- ---------- ----------- ------------ ---------------
.50K DISK :: -MAY-
BP Key: Status: AVAILABLE Compressed: NO Tag: TAG20150529T135320
Piece Name: /home/oracle/backup//ZGW_arc_880984401_45 List of Archived Logs in backup set
Thrd Seq Low SCN Low Time Next SCN Next Time
---- ------- ---------- --------- ---------- ---------
-MAY- -MAY-

检查并删除

RMAN> crosscheck backup; --检查备份物理文件状态

using channel ORA_DISK_1
crosschecked backup piece: found to be 'AVAILABLE'
backup piece handle=/home/oracle/backup//%_spfile_1bq85gae_1_1.bak RECID= STAMP=
crosschecked backup piece: found to be 'EXPIRED'
backup piece handle=/home/oracle/backup//ZGW_20150529_19q85g78_1_1 RECID= STAMP=
crosschecked backup piece: found to be 'EXPIRED'
backup piece handle=/home/oracle/backup//ZGW_arc_880984400_44 RECID= STAMP=
crosschecked backup piece: found to be 'EXPIRED'
backup piece handle=/home/oracle/backup//ZGW_arc_880984401_45 RECID= STAMP=
Crosschecked objects RMAN> list expired backup; --查看检查结果 List of Backup Sets
=================== BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
Full 398.51M DISK :: -MAY-
BP Key: Status: EXPIRED Compressed: NO Tag: TAG20150529T135134
Piece Name: /home/oracle/backup//ZGW_20150529_19q85g78_1_1
List of Datafiles in backup set
File LV Type Ckp SCN Ckp Time Name
---- -- ---- ---------- --------- ----
Full -MAY- /opt/oracle/oradata/zgw/sysaux01.dbf
Full -MAY- /opt/oracle/oradata/zgw/undotbs01.dbf BS Key Size Device Type Elapsed Time Completion Time
------- ---------- ----------- ------------ ---------------
1.50M DISK :: -MAY-
BP Key: Status: EXPIRED Compressed: NO Tag: TAG20150529T135320
Piece Name: /home/oracle/backup//ZGW_arc_880984400_44 List of Archived Logs in backup set
Thrd Seq Low SCN Low Time Next SCN Next Time
---- ------- ---------- --------- ---------- ---------
-MAY- -MAY- BS Key Size Device Type Elapsed Time Completion Time
------- ---------- ----------- ------------ ---------------
.50K DISK :: -MAY-
BP Key: Status: EXPIRED Compressed: NO Tag: TAG20150529T135320
Piece Name: /home/oracle/backup//ZGW_arc_880984401_45 List of Archived Logs in backup set
Thrd Seq Low SCN Low Time Next SCN Next Time
---- ------- ---------- --------- ---------- ---------
-MAY- -MAY- RMAN> delete expired backup; --删除状态为expired的备份,expired是指物理文件不存在的备份集,obsolete指过期的备份集 using channel ORA_DISK_1 List of Backup Pieces
BP Key BS Key Pc# Cp# Status Device Type Piece Name
------- ------- --- --- ----------- ----------- ----------
EXPIRED DISK /home/oracle/backup//ZGW_20150529_19q85g78_1_1
EXPIRED DISK /home/oracle/backup//ZGW_arc_880984400_44
EXPIRED DISK /home/oracle/backup//ZGW_arc_880984401_45 Do you really want to delete the above objects (enter YES or NO)? y
deleted backup piece
backup piece handle=/home/oracle/backup//ZGW_20150529_19q85g78_1_1 RECID= STAMP=
deleted backup piece
backup piece handle=/home/oracle/backup//ZGW_arc_880984400_44 RECID= STAMP=
deleted backup piece
backup piece handle=/home/oracle/backup//ZGW_arc_880984401_45 RECID= STAMP=
Deleted EXPIRED objects
delete expired backup 与 delete obsolete 比较。
RMAN> list backup;

List of Backup Sets
=================== BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
Full .00K DISK :: -MAY-
BP Key: Status: AVAILABLE Compressed: NO Tag: TAG20150529T135318
Piece Name: /home/oracle/backup//%_spfile_1bq85gae_1_1.bak
SPFILE Included: Modification time: -MAY-
SPFILE db_unique_name: ZGW RMAN> crosscheck backup; using channel ORA_DISK_1
crosschecked backup piece: found to be 'EXPIRED'
backup piece handle=/home/oracle/backup//%_spfile_1bq85gae_1_1.bak RECID= STAMP=
Crosschecked objects RMAN> delete obsolete; --只能删除过期备份 RMAN retention policy will be applied to the command
RMAN retention policy is set to recovery window of days
using channel ORA_DISK_1
no obsolete backups found RMAN> delete expired backup; --只能删除物理不存在的备份记录 using channel ORA_DISK_1 List of Backup Pieces
BP Key BS Key Pc# Cp# Status Device Type Piece Name
------- ------- --- --- ----------- ----------- ----------
EXPIRED DISK /home/oracle/backup//%_spfile_1bq85gae_1_1.bak Do you really want to delete the above objects (enter YES or NO)? y
deleted backup piece
backup piece handle=/home/oracle/backup//%_spfile_1bq85gae_1_1.bak RECID= STAMP=
Deleted EXPIRED objects

手动删除RMAN备份的方法的更多相关文章

  1. 手动删除SVCH0ST.EXE的方法

        最近几天在办公室的计算机上又发现了一种病毒,在进程管理器中多出了两个进程:SVCH0ST.EXE.IEXPLORE.EXE,经一番查看揭开了它们的真面目,现将清除这种病毒的方法总结如下: 病毒 ...

  2. 手动删除portal中托管服务。

    在portal中将server作为托管联合服务器,然后发布了托管服务.若中间取消了托管联合服务器,再重新连接,那么会出现之前的托管服务无法删除的现象. 下文为怎样手动删除这些服务的方法,(不过貌似之后 ...

  3. 无法删除DLL文件解决方法(转)

    手动解决dll文件无法删除的终极方法 手动解决dll文件无法删除的终极方法 相信大家都遇见过:在删除一些软件的时候弹出某某文件正在运行或磁盘写保护不能删除这样的报错提示吧.而常常删除不掉的都一些后缀为 ...

  4. 【转】RMAN删除过期备份或非过期备份

    (一)删除备份--DELETE命令用于删除RMAN备份记录及相应的物理文件.当使用RMAN执行备份操作时,会在RMAN资料库(RMAN Repository)中生成RMAN备份记录,默认情况下RMAN ...

  5. Oracle RMAN 备份及不完全恢复(删除archievelog)

    RMAN备份命令 backup Database format='/home/oracle/backup/bak_full_%U_%T' tag='bak_full'; sql 'alter syst ...

  6. RMAN备份演练初级篇

    前面我们已经知道了如何进入rman,以及rman的一些基本命令,相信大家定会觉着rman操作的简单,事实也确实如此,但万不要因此小视rman的强大,简单往往意味着灵活,灵活对于那些有心人则意味着主动权 ...

  7. Oracle RMAN备份恢复指导书

    目 录 1 目的与范围... 1 2 术语和定义... 1 3 角色和职责... 2 4 使用RMAN备份数据库... 2 4.1.1 检查数据库模式... 2 4.1.2 连接到target数据库. ...

  8. RAC 之 RMAN 备份

    这篇主要介绍的是RAC 环境下的RMAN 备份. 关于Oracle 备份与恢复的一些理论知识参考我的Blog:       Oracle 备份 与 恢复 概述 http://blog.csdn.net ...

  9. RMAN 备份详解

    一.数据库备份与RMAN备份的概念 1.数据库完全备份:按归档模式分为归档和非归档 归档模式 打开状态,属于非一致性备份        关闭状态,可以分为一致性和非一致性 非归档模式 打开状态,非一致 ...

随机推荐

  1. effective stl读书笔记 & stl里面提供的算法 & emplace & ostream_iterator

    加锁和解锁,也可以在构造函数和析构函数里面,自动调用. 相等和等价的关系:等价是用在排序的时候,跟less函数有关. vector,deque,string 要用erase-remove组合:而关联容 ...

  2. FragmentTransaction的commit和commitAllowingStateLoss的差别

    1.什么是FragmentTransaction? 使用Fragment时.能够通过用户交互来运行一些动作.比方添加.移除.替换等. 全部这些改变构成一个集合,这个集合被叫做一个transaction ...

  3. android 获取蓝牙已连接设备

    蓝牙如果手动配对并已连接,获取连接的设备: 1.检测连接状态: int a2dp = bluetoothAdapter.getProfileConnectionState(BluetoothProfi ...

  4. elasticsearch index 之 create index(-)

    从本篇开始,就进入了Index的核心代码部分.这里首先分析一下索引的创建过程.elasticsearch中的索引是多个分片的集合,它只是逻辑上的索引,并不具备实际的索引功能,所有对数据的操作最终还是由 ...

  5. jquery插件库http://www.jq22.com/

    http://www.jq22.com/ http://www.jq22.com/jquery/%E5%8A%A0%E8%BD%BD http://www.jq22.com/jquery/%E5%BC ...

  6. 利用日志文件恢复MYSQL数据库

    利用日志文件恢复MYSQL数据库 650) this.width=650;" onclick='window.open("http://blog.51cto.com/viewpic ...

  7. Android 通过OnScrollListener来监听RecyclerView的位置

    最近做一个漫画app,在阅读漫画界面需要通过获取recyclerView的位置来实时更新界面上的图片进度(比如1/9), 查阅资料得知了可以通过LayoutManager来获取recyclerView ...

  8. js实现 导航移入移出效果

    <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8&quo ...

  9. Vue 国家省市三级联动

    在网上查阅一下,基本上是省市区三级联动,国家省市的就只能自己动手了. 样式就根据自己的需要去调整了. JSON数组太长,就折叠放在了后面. 效果图: <!DOCTYPE html> < ...

  10. (JavaScript基础向)日常小发现:forEach等函数的第二个参数的用法

    forEach函数用得平时用得比较多,但是从来没想到forEach函数还有第二个参数. 这里是菜鸟教程对forEach函数的详细说明:forEach的详细说明. 如上图,forEach函数有第二个参数 ...