In the RMAN backup script, we added the option to delete the archive log, but in some cases, we still need to deploy the script to delete the archive log. For example
In the RMAN backup script, we added the option to delete the archive log, but in some cases, we still need to deploy the script to delete the archive log. For example, in the Data Guard environment
I. Theoretical knowledge of RMAN
Differences between RMAN Catalog and Nocatalog
RMAN series (I)-RMAN Architecture Overview
RMAN series (II)-RMAN settings and Configuration
RMAN series (III)-Media Management Problems
RMAN series (iv) ---- RMAN backup
RMAN series (V)-RMAN restoration and Restoration
RMAN series (6) ---- RMAN advanced recovery
RMAN series (7)-RMAN Maintenance
RMAN series (8) ---- RMAN List and report commands
RMAN series (9) ---- tune the performance of RMAN backup and recovery operations
Linux platform RMAN full backup and Incremental Backup shell script
II.RMANEnvironment Configuration
2.1Modify control file automatic backup
You can use the following command to viewRMANDefault parameter configuration:
RMAN> show all;
Configure retention policy to redundancy 1; # default
Configure backup optimization off; # default
Configure default device type to disk;
Configure controlfile autobackup off;# Default
Configure controlfile autobackup format for device type disk to '% F'; # default
Configure device type disk parallelism 1 backup type to backupset; # default
Configure datafile backup copies for device type disk to 1; # default
Configure archivelog backup copies for device type disk to 1; # default
Configure channel 1 device type disk format 'f:/backup/orcl _ % U. Bak ';
Configure maxsetsize to unlimited; # default
Configure encryption for database off; # default
Configure encryption algorithm 'aes128 '; # default
Configure compression algorithm 'basic 'as of release 'default' OPTIMIZE FOR LOA
D true; # default
Configure archivelog deletion policy to none; # default
Configure snapshot controlfile name to 'd:/APP/ADMINISTRATOR/PRODUCT/11.2.0/DBHO
ME_1/DATABASE/SNCFORCL. ORA '; # default
RMAN> configure controlfile autobackup on;
Configure controlfile autobackup off;
Configure controlfile autobackup on;
The newRMANConfiguration parameters
After it is changed to automatic, the backup control files andSpfileFile.
RepairChange the parallelism parameter to 2. The default value of this parameter is 1.
For example, configure device type disk parallelism 2 backup type to backupset;
Explanation of this parameter on the official website:
Configures the number of automatic channels of the specified device type allocated for RMAN jobs. By default, PARALLELISM is set to 1.
Suppose you set PARALLELISM for disk backups to 2 (see ). if you set the default device type as disk, then RMAN allocates two disk channels when you run backup database at the RMAN prompt. RMAN always allocates the number of channels set by PARALLELISM, although it may use only a subset of these channels.
Note:If you configureNManually numbered channels, then the PARALLELISM setting can be greater than or lessN. For example, you can manually number 10 automatic channels and configure PARALLELISM to 2 or 12.
To change the parallelism for a device typeN, Run a new configure device type... PARALLELISMNCommand. For example, you can change configure PARALLELISM to 3 for sbt and then change it to 2 as follows:
. Com/docs/cd/E11882_01/backup.112/e000043/rcmsynta010.htm # RCMRF113
2.2Modify the time when the control file is saved
Otherwise, Database Backup may exist on the backup media, but the control file does not have backup records related to the backup. In this case, these earlier files cannot be recovered.
SQL>Select name, value from v $ parameter where name = 'control _ file_record_keep_time ';
NAME VALUE
-------------------------------------------------------------------------------
Control_file_record_keep_time 7
SQL>Alter system set control_file_record_keep_time = 20;
The system has been changed.
SQL>Show parameter control_file_record_keep_time
NAME TYPE VALUE
-----------------------------------------------------------------------------
Control_file_record_keep_time integer 20
2.3Configure the default backup storage policy
The backup policy affects recovery. If there are few backup sets, the recovery capability is also limited. If there are more backup sets, it will also occupy a large amount of space. Therefore, you need to set an appropriate cycle based on the disk space size and recovery needs.2Methods:
2.3.1PassRecovery window
For example:Configure retention policy to recovery window of 7 days;
2.3.2PassRedundancy
For example:Configure retention policy to redundancy 5;
Its default value is1Copies.
Report obsolete;
Delete noprompt obsolete;
Crosscheck backup;
Delete noprompt expired backup;
Configure retention policy clear;
2.3.4No save policy is applied.
Configure retention policy to none;
2.4Deploy backup script
ReferenceBlog:
2.5Delete the script for archiving logs
Summary,DBAComplete and effective backup is very important. It can restore our data at critical times or reduce data loss. Therefore, we must make a backup policy for the production database. Backup over everything!