In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-09 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
1. First, set up automatic backup of control files.
2. Automatic recovery script, using the following command
Restore controlfile from autobackup
This command will find the latest control file to restore, here is a test to verify.
Back up data files multiple times to generate multiple control file backups. Then carry on the restore operation, find the control file that was recently backed up to restore, we can also control the deletion of the file according to the time. The operation process is as follows:
RMAN > show all;RMAN configuration parameters for database with db_unique_name ORCL are:CONFIGURE RETENTION POLICY TO REDUNDANCY 1; # defaultCONFIGURE BACKUP OPTIMIZATION ON;CONFIGURE DEFAULT DEVICE TYPE TO DISK; # defaultCONFIGURE CONTROLFILE AUTOBACKUP ON;CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO'% defaultCONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO; # defaultCONFIGURE DEVICE TYPE DISK PARALLELISM 1 BACKUP TYPE TO BACKUPSET; # defaultCONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # defaultCONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # defaultCONFIGURE MAXSETSIZE TO UNLIMITED; # defaultCONFIGURE ENCRYPTION FOR DATABASE OFF; # defaultCONFIGURE ENCRYPTION ALGORITHM 'AES128' # defaultCONFIGURE COMPRESSION ALGORITHM 'BASIC' AS OF RELEASE' DEFAULT' OPTIMIZE FOR LOAD TRUE; # defaultCONFIGURE ARCHIVELOG DELETION POLICY TO NONE; # defaultCONFIGURE SNAPSHOT CONTROLFILE NAME TO'/ u01 sysdate-1/10'; # defaultRMAN > delete backup of controlfile completed before 'sysdate-1/10' Using channel ORA_DISK_1List of Backup PiecesBP Key BS Key Pc# Cp# Status Device Type Piece Name--22 11 AVAILABLE DISK / u01/app/oracle/product/11.2.0/dbhome_1/ Dbs/c-1515642676-20180927-004 4 11 AVAILABLE DISK / u01/app/oracle/product/11.2.0/dbhome_1/dbs/c-1515642676-20180927-01Do you really want to delete the above objects (enter YES or NO)? NoRMAN > RMAN > list backup of controlfile List of Backup Sets=BS Key Type LV Size Device Type Elapsed Time Completion Time-2 Full 17.70M DISK 00:00:02 27-SEP-2018 11: 08:08 BP Key: 2 Status: AVAILABLE Compressed: NO Tag: TAG20180927 × × 10806 Piece Name: / u01/app/oracle/product/11.2.0/dbhome_1/dbs/c-1515642676-20180927-00 Control File Included: Ckp SCN: 794221 Ckp time: 27-SEP-2018 11:08:06BS Key Type LV Size Device Type Elapsed Time Completion Time- -4 Full 17.70m DISK 00:00:05 27-SEP-2018 11:09:18 BP Key: 4 Status: AVAILABLE Compressed: NO Tag: TAG20180927 × × 10913 Piece Name: / u01/app/oracle/product/11.2.0/dbhome_1 / dbs/c-1515642676-20180927-01 Control File Included: Ckp SCN: 794259 Ckp time: 27-SEP-2018 11:09:13BS Key Type LV Size Device Type Elapsed Time Completion Time- -6 Full 17.70m DISK 00:00:01 27-SEP-2018 14:13:46 BP Key: 6 Status: AVAILABLE Compressed: NO Tag: TAG20180927 × × × 41345 Piece Name: / u01/app/oracle/product/11.2.0/dbhome_1/dbs/c-1515642676-20180927-02 Control File Included: Ckp SCN: 801298 Ckp time: 27-SEP-2018 14:13:45BS Key Type LV Size Device Type Elapsed Time Completion Time-8 Full 17.70M DISK 00:00:01 27-SEP-2018 14:15:02 BP Key: 8 Status: AVAILABLE Compressed : NO Tag: TAG20180927 × × × 41501 Piece Name: / u01/app/oracle/product/11.2.0/dbhome_1/dbs/c-1515642676-20180927-03 Control File Included: Ckp SCN: 801359 Ckp time: 27-SEP-2018 14:15:01BS Key Type LV Size Device Type Elapsed Time Completion Time- -- 10 Full 17.70m DISK 00:00:01 27-SEP-2018 14:16:06 BP Key: 10 Status: AVAILABLE Compressed: NO Tag: TAG20180927 × × × 41605 Piece Name: / u01/app/oracle/product/11.2.0/dbhome_1/dbs/c-1515642676-20180927-04 Control File Included: Ckp SCN : 801655 Ckp time: 27-SEP-2018 14:16:05BS Key Type LV Size Device Type Elapsed Time Completion Time-12 Full 17.70M DISK 00 : 00:01 27-SEP-2018 14:16:27 BP Key: 12 Status: AVAILABLE Compressed: NO Tag: TAG20180927 × × 41626 Piece Name: / u01/app/oracle/product/11.2.0/dbhome_1/dbs/c-1515642676-20180927-05 Control File Included: Ckp SCN: 801678 Ckp time: 27-SEP-2018 14:16:26RMAN > restore controlfile to'/ tmp/control01.clt' from autobackup Starting restore at 27-SEP-2018 14:28:50using channel ORA_DISK_1channel ORA_DISK_1: looking for AUTOBACKUP on day: 20180927channel ORA_DISK_1: AUTOBACKUP found: Cmur1515642676-20180927-05channel ORA_DISK_1: restoring control file from AUTOBACKUP Cmur15642676-20180927-05channel ORA_DISK_1: control file restore from AUTOBACKUP completeFinished restore at 27-SEP-2018 14:28:53RMAN >
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.