Get the App
SLTechnology News&Howtos  ›  Database  › 

RMAN of Oracle Learning (10) RMAN maintenance

Shulou Source: shulou.com Published: 2022-06-01 12:35:06 11月04日 Update

We have done so many backups before, how can I query what I have done through RMAN? RMAN provides us with the LIST command. The LIST command displays information about backup sets, proxy copy, and mirror copy.

RMAN > list;RMAN-00571: = = RMAN-00569: = ERROR MESSAGE STACK FOLLOWS = RMAN-00571: = = RMAN-00558: error encountered while parsing input commandsRMAN-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 column: file

Based on the error message, we can know which parameters can be followed by the list command.

For example, list what backups were made in the database.

RMAN > LIST BACKUP

What mirrored copy has been done by the database?

RMAN > list copy;specification does not match any datafile copy in the repositoryspecification does not match any control file copy in the repositoryspecification does not match any archived log in the repository

Anyway, the list command tells us what has been done.

REPORT command

RMAN > report;RMAN-00571: = = RMAN-00569: = ERROR MESSAGE STACK FOLLOWS = RMAN-00571: = = RMAN-00558: error encountered while parsing input commandsRMAN-01009: syntax error: found ";": expecting one of: "device, need, obsolete, schema, unrecoverable" RMAN-01007: at line 2 column 1 file: standard input

Report need tells us what else needs to be done.

Report obsolete tells us which ones are abandoned.

DELETE delete command

RMAN > delete2 >; RMAN-00571: = = RMAN-00569: = ERROR MESSAGE STACK FOLLOWS = RMAN-00571: = = RMAN-00558: error encountered while parsing input commandsRMAN-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 a specific backup set:

DELETE BACKUPSET 102

Delete an expired backup without confirmation:

DELETE NOPROMPT EXPIRED BACKUP OF TABLESPACE users

Delete all backup, copy, and archive redo log files according to the configured retention policy:

DELETE OBSOLETE

CROSSCHECK command

Verify that backup sets, copy, and other files in RMAN repository exist on the operating system. If it does not exist, the file is marked EXPIRED

RMAN > crosscheck;RMAN-00571: = = RMAN-00569: = ERROR MESSAGE STACK FOLLOWS = RMAN-00571: = = RMAN-00558: error encountered while parsing input commandsRMAN-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

Tags: Commands backups files information data databases mirrors operating systems copies parameters logs policies systems agents queries configurations verification learning Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Linux vpn MySQL OPPO Reno Shulou Tech Info