您好,登錄后才能下訂單哦!
我們前面做了那么多的備份,我如何能通過RMAN查詢到我所做過的操作呢?RMAN為我們提供了LIST命令。LIST命令可以顯示備份集、代理copy、鏡像copy的信息。
RMAN> list; RMAN-00571: =========================================================== RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS =============== RMAN-00571: =========================================================== RMAN-00558: error encountered while parsing input commands RMAN-01009: syntax error: found ";": expecting one of: "all, archivelog, backed, backuppiece, backupset, backup, completed, controlfilecopy, copy, datafilecopy, db_unique_name, device, expired, failure, foreign, global, incarnation, like, proxy, recoverable, restore, script, tag" RMAN-01007: at line 1 column 5 file: standard input
我們根據報錯信息,可以知道list命令后面可以跟哪些參數。
比如列舉出數據庫做了哪些備份。
RMAN> LIST BACKUP;
數據庫做了哪些鏡像copy
RMAN> list copy; specification does not match any datafile copy in the repository specification does not match any control file copy in the repository specification does not match any archived log in the repository
總之list命令告訴我們已經做了什么。
REPORT命令
RMAN> report; RMAN-00571: =========================================================== RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS =============== RMAN-00571: =========================================================== RMAN-00558: error encountered while parsing input commands RMAN-01009: syntax error: found ";": expecting one of: "device, need, obsolete, schema, unrecoverable" RMAN-01007: at line 2 column 1 file: standard input
report need 告訴我們還需要做什么。
report obsolete 告訴我們哪些是廢棄的。
DELETE 刪除命令
RMAN> delete 2> ; RMAN-00571: =========================================================== RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS =============== RMAN-00571: =========================================================== RMAN-00558: error encountered while parsing input commands RMAN-01009: syntax error: found ";": expecting one of: "archivelog, backuppiece, backupset, backup, controlfilecopy, copy, datafilecopy, expired, force, foreign, global, noprompt, obsolete, proxy, script" RMAN-01007: at line 2 column 1 file: standard input
刪除特定備份集:
DELETE BACKUPSET 102;
不經確認而刪除過期備份:
DELETE NOPROMPT EXPIRED BACKUP OF TABLESPACE users;
根據已配置的保留策略刪除所有備份、副本和歸檔重做日志文件:
DELETE OBSOLETE;
CROSSCHECK命令
驗證RMAN repository中的備份集、copy等文件在操作系統上是否存在。如果不存在,則該文件標示為EXPIRED;
RMAN> crosscheck; RMAN-00571: =========================================================== RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS =============== RMAN-00571: =========================================================== RMAN-00558: error encountered while parsing input commands RMAN-01009: syntax error: found ";": expecting one of: "archivelog, backuppiece, backupset, backup, controlfilecopy, copy, datafilecopy, foreign, proxy" RMAN-01007: at line 1 column 11 file: standard input
免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。