Тёмный

LEVEL0 & LEVEL1 RMAN Scripts 

Vismo Technologies
Подписаться 22 тыс.
Просмотров 229
50% 1

LEVEL0 & LEVEL1 RMAN Scripts
LEVEL0:
=======
DEVDB_SUN_L0.sh
export ORACLE_SID=DEVDB1
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/19.0.0.0/dbhome_1
export LD_LIBRARY_PATH=$ORACLE_HOME/lib
export CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib
export PATH=$PATH:$ORACLE_HOME/bin
rman target / log=/tmp/rman_0.log --EOF
run {
allocate channel ch1 device type disk;
allocate channel ch2 device type disk;
crosscheck backup;
delete noprompt expired backup;
crosscheck archivelog all;
delete noprompt expired archivelog all;
backup incremental level 0 database format='/u01/backup/DEVDB_LEVEL_0_backup_%d_%T_%U' plus archivelog format='/u01/backup/DEVDB_archivelog_backup_%d_%T_%U';
backup spfile format='/u01/backup/DEVDB_spfile_%d_%T_%U';
backup current controlfile format='/u01/backup/DEVDV_controlfile_%d_%T_%U';
release channel ch1;
release channel ch2;
}
quit;
EOF
LEVEL1:
=======
DEVDB_SUN_L1.sh
export ORACLE_SID=DEVDB1
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/19.0.0.0/dbhome_1
export LD_LIBRARY_PATH=$ORACLE_HOME/lib
export CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib
export PATH=$PATH:$ORACLE_HOME/bin
rman target / log=/tmp/rman_1.log --EOF
run
{
allocate channel ch1 device type disk;
allocate channel ch2 device type disk;
crosscheck backup;
delete noprompt expired backup;
crosscheck archivelog all;
delete noprompt expired archivelog all;
backup incremental level 1 database format='/u01/backup/DEVDB_LEVEL_1_backup_%d_%T_%U' plus archivelog format='/u01/backup/DEVDV_archivelog_backup_%d_%T_%U';
backup spfile format='/u01/backup/DEVDV_spfile_%d_%T_%U';
backup current controlfile format='/u01/backup/DEVDV_controlfile_%d_%T_%U';
release channel ch1;
release channel ch2;
}
quit;
EOF
The RMAN retention policy determines how long backups are kept for and how many copies are retained
• Video
RMAN- show all;
CONFIGURE RETENTION POLICY TO RECOVERY WINDOW 7 DAYS; (No of days of backups)
CONFIGURE RETENTION POLICY TO REDUNDANCY 7; (No of backups)
obsolete - Backup are outside of retention policy (RMAN will delete these obsolete backup, No need of any manual intervention)
expired - Backups which are within retention policy, but somebody has physically deleted from Backup / FRA location
RMAN Retention Policy
The RMAN retention policy determines how long backups are kept for and how many copies are retained.
The retention policy can be defined in terms of:
• REDUNDANCY - number of copies to retain
• RECOVERY WINDOW - number of days to retain backups
The retention policy is configured by the RETENTION POLICY parameter. The default value is:
CONFIGURE RETENTION POLICY TO REDUNDANCY 1;
To specify a recovery window of 1 day use:
CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 1 DAYS;
Backup files can be marked as expired or obsolete.
• Expired - RMAN has performed a crosscheck and the file cannot be found
• Obsolete - based on the retention policy the file is not needed for recovery
The backup retention policy only applies to full or level 0 datafile and control file backups.
The retention policy does not directly affect archived redo logs and incremental level 1 backups. These files become obsolete when no full backups exist that need them.
Datafile backup sets cannot be deleted until all datafile backups within the backup set are obsolete.
Obsolete backups can be identified using the REPORT OBSOLETE command and deleted using the DELETE OBSOLETE command.
The retention policy can also be set to NONE
RMAN- CONFIGURE RETENTION POLICY TO NONE;
To revert to the default value use:
RMAN- CONFIGURE RETENTION POLICY CLEAR;
#rac #database #asm #mallik034 #vismotechnologies #oracledba #oraclecarrers #oracleworld #training #onlinetraining #liveclasses #RMAN #Backup #recovery
Regards,
Mallikarjun / Vismo Technologies
WhatsApp: +91 9880616848 / +91 9036478079
Cell: +91 9880616848 / +91 9036478079
Email: mallikarjun.ramadurg@gmail.com / vismotechnologies@gmail.com / info@vismotechnologies.com

Опубликовано:

 

2 окт 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии    
Далее
Types of Standby Databases?
26:24
Просмотров 183
When Goalkeepers Get Bored 🤯 #3
00:27
Просмотров 1,1 млн
Modes of Standby Database?
13:14
Просмотров 148
How to Identify the RAC database?
8:28
Просмотров 215