[20171208]強制刪除歸檔日誌檔案.txt

lfree發表於2017-12-08

[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部落格 ” ,連結:http://blog.itpub.net/267265/viewspace-2148449/,如需轉載,請註明出處,否則將追究法律責任。

相關文章