First, we connect to the node where the database is located with ssh.
After loading the database’s profile, we connect to RMAN with the command below.
1 | rman target / |
You can read the following articles to load profiles and connect to RMAN.
“How To Connect To Oracle With sqlplus“,
“How To Create .profile File To Connect The Oracle“
The following command displays all rman configurations.
1 | show all; |
We change the backup retention with the following command.
1 | CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 7 DAYS; |
Then, with the following command, we do the necessary checks to delete metadata information in the control file that has metadata information but has not a backup file in RMAN.
1 | crosscheck backup; |
The following command also deletes metadata information detected by crosscheck from the control file.
1 | delete expired backupset; |
Then we delete all backups that can be deleted with the following command.
1 | delete obsolete device type disk; |