ITPub博客

首页 > 数据库 > Oracle > [20171208]强制删除归档日志文件.txt

[20171208]强制删除归档日志文件.txt

原创 Oracle 作者:lfree 时间:2017-12-08 11:15:43 0 删除 编辑

[20171208]强制删除归档日志文件.txt

--//测试环境,产生日志太多,想强制删除.

RMAN> delete archivelog all ;

released channel: ORA_DISK_1
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=106 device type=DISK
RMAN-08137: WARNING: archived log not deleted, needed for standby or upstream capture process
archived log file name=/u01/app/oracle/archivelog/book/1_790_896605872.dbf thread=1 sequence=790
RMAN-08137: WARNING: archived log not deleted, needed for standby or upstream capture process
archived log file name=/u01/app/oracle/archivelog/book/1_791_896605872.dbf thread=1 sequence=791
RMAN-08137: WARNING: archived log not deleted, needed for standby or upstream capture process

--//提示:RMAN-08137: WARNING: archived log not deleted, needed for standby or upstream capture process

$ oerr rman 08137
8137, 3, "WARNING: archived log not deleted, needed for standby or upstream capture process"
// *Cause: An archived log that should have been deleted was not as it was
//         required by upstream capture process or Data Guard.
//         The next message identifies the archived log.
// *Action: This is an informational message. The archived log can be
//          deleted after it is no longer needed.  See the
//          documentation for Data Guard to alter the set of active
//          Data Guard destinations.  See the documentation for
//          Streams to alter the set of active streams.


--//dataguard 备库已经停用很久了.要强制删除归档日志:

RMAN> delete archivelog all force ;

RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-00558: error encountered while parsing input commands
RMAN-01009: syntax error: found "force": expecting one of: "backed, completed, device, for, like, tag, ;"
RMAN-01007: at line 2 column 23 file: standard input

RMAN> delete
2>
3>

RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-00558: error encountered while parsing input commands
RMAN-01009: syntax error: found "end-of-file": expecting one of: "archivelog, backuppiece, backupset, backup, controlfilecopy, copy, datafilecopy, expired, force, foreign, global, noprompt, obsolete, proxy, script"
RMAN-01007: at line 3 column 1 file: standard input

--//提示看force要写前面...

RMAN> delete force archivelog all;

released channel: ORA_DISK_1
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=106 device type=DISK
List of Archived Log Copies for database with db_unique_name BOOK
=====================================================================

Key     Thrd Seq     S Low Time
------- ---- ------- - -------------------
1330    1    790     A 2017-11-13 09:48:53
        Name: /u01/app/oracle/archivelog/book/1_790_896605872.dbf

...
1497    1    957     A 2017-12-07 13:44:31
        Name: /u01/app/oracle/archivelog/book/1_957_896605872.dbf

Do you really want to delete the above objects (enter YES or NO)? YES

--//我经常习惯性写后面.做一个笔记.

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/267265/viewspace-2148449/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论
熟悉oracle相关技术,擅长sql优化,rman备份与恢复,熟悉linux shell编程。

注册时间:2008-01-03

  • 博文量
    4006
  • 访问量
    7969372