我們前面做了那么多的備份,我如何能通過(guò)RMAN查詢到我所做過(guò)的操作呢?RMAN為我們提供了LIST命令。LIST命令可以顯示備份集、代理copy、鏡像copy的信息。
我們提供的服務(wù)有:成都網(wǎng)站設(shè)計(jì)、成都網(wǎng)站建設(shè)、微信公眾號(hào)開(kāi)發(fā)、網(wǎng)站優(yōu)化、網(wǎng)站認(rèn)證、源匯ssl等。為近千家企事業(yè)單位解決了網(wǎng)站和推廣的問(wèn)題。提供周到的售前咨詢和貼心的售后服務(wù),是有科學(xué)管理、有技術(shù)的源匯網(wǎng)站制作公司
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
我們根據(jù)報(bào)錯(cuò)信息,可以知道list命令后面可以跟哪些參數(shù)。
比如列舉出數(shù)據(jù)庫(kù)做了哪些備份。
RMAN> LIST BACKUP;
數(shù)據(jù)庫(kù)做了哪些鏡像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命令告訴我們已經(jīng)做了什么。
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;
不經(jīng)確認(rèn)而刪除過(guò)期備份:
DELETE NOPROMPT EXPIRED BACKUP OF TABLESPACE users;
根據(jù)已配置的保留策略刪除所有備份、副本和歸檔重做日志文件:
DELETE OBSOLETE;
CROSSCHECK命令
驗(yàn)證RMAN repository中的備份集、copy等文件在操作系統(tǒng)上是否存在。如果不存在,則該文件標(biāo)示為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