How to Delete Archivelog Using RMAN in Oracle

How to Delete Archivelog Using RMAN in Oracle

Recovery Manager (RMAN) is an Oracle Database client that performs backup and recovery tasks on your databases and automates administration of your backup strategies.

If you want to delete archivelog from FRA(ASM Storage -Flash Revovery Area) or filesystem to free space, you can use the following commands:

Start the RMAN executable at the operating system command line while connecting to a target database and, possibly, to a recovery catalog, as in the following examples:

% rman TARGET /       # operating system authentication
% rman TARGET [email protected] NOCATALOG  # RMAN prompts for SYS password
% rman TARGET / CATALOG [email protected] # RMAN prompts for rco password
set NLS_DATE_FORMAT=YYYYMMDD HH24:MI:SS

Archivelog List Commands:

list archivelog all;
list copy of archivelog until time ‘SYSDATE-1‘;
list copy of archivelog from time ‘SYSDATE-1‘;
list copy of archivelog from time ‘SYSDATE-1‘ until time ‘SYSDATE-2‘;
list copy of archivelog from sequence 1000;
list copy of archivelog until sequence 1500;
list copy of archivelog from sequence 1000 until sequence 1500;

Archivelog Delete Commands:

delete archivelog all;
delete archivelog until time ‘SYSDATE-1‘;
delete archivelog from time ‘SYSDATE-1‘;
delete archivelog from time ‘SYSDATE-1‘ until time ‘SYSDATE-2‘;
delete archivelog from sequence 1000;
delete archivelog until sequence 1500;
delete archivelog from sequence 1000 until sequence 1500;

Note : Use noprompt to avoid being prompted for each file

delete noprompt archivelog until time ‘SYSDATE-1‘;

原文地址:https://www.cnblogs.com/chendian0/p/11369314.html

时间: 2024-10-12 15:19:45

How to Delete Archivelog Using RMAN in Oracle的相关文章

delete archivelog all 无法彻底删除归档日志?

最近在因归档日志暴增,使用delete archivelog all貌似无法清除所有的归档日志,到底是什么原因呢? [python] view plain copy print? 1.演示环境 SQL> select * from v$version where rownum<2; BANNER ---------------------------------------------------------------- Oracle Database 10g Release 10.2.0.

rman备份oracle数据库

备份需求和rman备份 oracle数据库的备份相关问答: 1)备份时数据库处于何种状态? 备份时数据库处于OPEN状态,这样数据库可以正常工作. 2)备份的数据备份在什么地方? 备份在本地磁盘. 3)备份的存储空间如何? linux系统下可以用linux的系统命令df -lh来查看磁盘空间. 4)应以什么方式备份? 应以rman的增量(差量)备份,这样备份和恢复都比较简单,所占用的空间比较小. 查看数据库是否为归档状态: SQL>archive log list 更改数据库的归档模式:数据库由

Linux平台下使用rman进行oracle数据库迁移

    实验目的:将oracle数据库从一台机器迁移到另外的一台机器(同为linux平台),设置为不同的路径,不同的实例名 源端: ORACLE_BASE=/u01/app/oracle ORACLE_HOME=/u01/app/oracle/product/10.2.0/db_1 ORACLE_SID=test 数据文件位置:/oradata/test 目标端: ORACLE_BASE=/u02/app/oracle ORACLE_HOME=/u02/app/oracle/product/10

IMP/EXP,数据泵,SQL*Loader ,rman,oracle数据库备份

IMP/EXP,数据泵,SQL*Loader ,rman 数据库的逻辑备份和恢复:exp和imp1.导库:导出和导入整个数据库2.导表空间:导出和导入表空间3.导表用户:导出和导入用户中所有对象4.导表:导出和导入表或表分区 (1)commit=y 插入并提交,频繁提交会影响数据库效率.提交数据库过大时可以添加.(2)ignore=y/n 该参数表示忽略创建错误,并继续执行.(3)full=y 是否完全导入. 1.导出导入表备份测试表:create tables emp_test as sele

Use emcli to delete obsolete agent targets in Oracle EM Cloud Control 12c

[[email protected] ~]$ cd /oem/oms/oms/bin 登录到oms中 [[email protected] bin]$ ./emcli login -username=sysman Enter password : Login successful 同步信息 [[email protected] bin]$ ./emcli sync Synchronized successfully 获取当前该主机mwtest02的agent所关联的targets [[email

【oracle案例】RMAN-08138

1.1.1. RMAN-08138 日期:2014-05-21 14:36 环境:测试环境 [情景描述] 在测试机上,使用RMAN来删除归档日志文件的时候,提示WARNING警告,并且归档日志无法删除. [报错信息] RMAN> delete archivelog all completed before 'sysdate'; released channel: ORA_DISK_1 allocated channel: ORA_DISK_1 channel ORA_DISK_1: SID=12

[转]Oracle DB 使用RMAN创建备份2

归档备份:概念 归档备份:概念 如果需要在指定时间内保留联机备份,RMAN 通常会假定用户可能需要在自执行该备份以来到现在之间的任意时间执行时间点恢复.为了满足这一要求,RMAN 会在此时段内保留归档日志.但是,可能仅需要在指定的时间(如两年)内保留特定备份(并使其保持一致和可恢复).用户不打算恢复到自执行该备份以后的某一时间点,只是希望能够正好恢复到执行该备份的确切时间.此外,用户还需要维护保留策略以使备份区井然有序,因此无法使备份恢复到两年前.为了满足保留数据的商业或法律要求,通常需要这么做

Oracle RMAN备份与还原注意事项

1 备份文件管理 如果要删除之前的备份,不要手动去目录下删除,应该在rman命令模式下使用删除命令,否则虽然在磁盘上把物理备份文件删除了,但是使用备份查看命令会一直看到已经删除的备份文件 list backup; 查看当前系统有哪些可用的备份文件 list backupset summary; 查看备份文件的概要信息 crosscheck backup; 更新rman备份信息,如果有损坏的不可用的,或者手动删除的物理备份文件都可以通过此命令查看ex delete expired backup;

-Oracle 11gR2通过RMAN克隆数据库

Oracle Study之--Oracle 11gR2通过RMAN克隆数据库 Purpose of Database Duplication A duplicate database is useful for a variety of purposes, most of which involve testing. You can perform the following tasks in a duplicate database: Test backup and recovery proc