Professional Documents
Culture Documents
SQL> startup
############################################
#############
--Changing the Fast Recovery Area to a New Location
ALTER SYSTEM SET DB_RECOVERY_FILE_DEST='/home/oracle/fast_rec_area' SCOPE=BOTH
SID='*';
$ ls -ltr
--to make a data file copy exempt from the retention policy for 180 days:
RMAN> CHANGE DATAFILECOPY '/home/oracle/backups/df_data_02.dbf' KEEP UNTIL TIME
'SYSDATE+180';
$ cp &file_name& /home/oracle/backups/users01.dbf
--To remove the catalog record for a backup or archived redo log that deleted from
the operating system with operating system commands
RMAN> LIST CONTROLFILECOPY '/home/oracle/backups/control01.ctl';
--Crosscheck the backups and copies to ensure that the logical records are
synchronized with the physical media
RMAN> CROSSCHECK BACKUP;
--Delete backups based on the objects backed up and the media or disk location
where the backup is stored
RMAN> DELETE BACKUP OF TABLESPACE PDB1:TBS_DATA DEVICE TYPE DISK;
--Delete archived redo logs from disk based on whether they are backed up on 3
times
RMAN> DELETE ARCHIVELOG ALL BACKED UP 3 TIMES TO DISK;