Change... keep (rman long-term backup)

Source: Internet
Author: User

Change... keep (rman long-term backup) is to determine when to mark the backup file as "obsolete" based on the change command. SQL> select * from v $ version; BANNER implements Oracle Database 11g Enterprise Edition Release 11.2.0.1.0-ProductionPL/SQL Release 11.2.0.1.0-ProductionCORE 11.2.0.1.0 ProductionTNS for 32-bit Windows: Version 11.2.0.1.0-ProductionNLSRTL Version 11.2.0.1.0-Product Ion RMAN> list backup. This indicates that it does not match any backup in the archive. RMAN> backup datafile 6; Start backup from month 1 to month 8 to month 13 using the channel ORA_DISK_1 channel ORA_DISK_1: starting all data file backup set channels ORA_DISK_1: specifying the data file in the backup set input data file: file number = 00006 name = E: \ RM_TAB.DBF channel ORA_DISK_1: starting segment 1 in March 13-13 ORA_DISK_1: Completed segment 1 in April 8-13 handle = D: \ BACKUP \ ORCL_159.BAK mark = TAG20130804T113826 comment = NONE channel ORA_DISK_1: the backup set has been completed. After the time: 00: 00: 03, the backup is completed. from month to month 13, the Control File and spfile a are started. Utobackup in the-13 segment handle = F: \ RMANBACKUP \ CONTROLFILE \ C-1318810635-20130804-03 comment = NONE to complete the Control File and SPFILE Autobackup in the month-13 RMAN> list backup; backup set list =============================== BS keyword Type LV Size Device Type completion time ------- ---- ------------ ----------- ------------ ---------- 135 full 5.85 m disk 00:00:02-13 BP Keyword: 134 status: AVAILABLE compressed: NO mark: TAG20130804T113826 segment name: D: \ BACKUP \ ORCL_159.BAK BACKUP Copy set 135 data file list file LV type Ckp SCN Ckp time name ---- ---------- ---- 6 Full 33821001663 04-8 month-13 E: \ RM_TAB.DBF BS keyword Type LV Size Device Type completion time ------- ----- ---- ------------ ----------- ------------ ---------- 136 Full 9.55 m disk 00:00:03 04-8 month-13 BP Keyword: 135 status: AVAILABLE compressed: NO flag: TAG20130804T113830 segment name: F: \ RMANBACKUP \ CONTROLFILE \ spfile contained in the C-1318810635-20130804-03: modified at:-13 included controls File: Ckp SCN: 33821001682 Ckp time:-13 RMAN> change backupset 135 keep forever; Use channel ORA_DISK_1RMAN-00571: ========================================================== ============================== RMAN-00569: ================ error message stack follows ============================ RMAN-00571: ========================================================== ============================== RMAN-03002: KEEP Command (on 11:41:41) failed RMAN-06522: The keep forever is not supported without directory recovery Option indicates that this operation must be performed when a directory is restored (because the directory is replaced by a control file, the backup metadata will be overwritten by the value of control_file_record_keep_time, therefore, these policies cannot be ensured.) RMAN> exit to restore the manager. C: \ Documents ents and Settings \ Administrator> rman target/catalog rm_user/rm_user; Recovery MANAGER: Release 11.2.0.1.0-Production on Sunday August 4 11:42:04 2013 Copyright (c) 1982,200 9, oracle and/or its affiliates. all rights reserved. connect to the target database: ORCL (DBID = 1318810635) connect to recover directory database RMAN> change backupset 135 keep forever; Start resync for all recovery directories to complete all resync allocated channels: ORA_DISK_1 channel ORA_DISK_1: SID = 34 device type = DISKRMAN-00571: ============ ========================================================== ========= RMAN-00569: ================ error message stack follows ============================ RMAN-00571: ========================================================== ============================== RMAN-03002: KEEP Command (on 11:42:31) failed RMAN-06004: Restoring directory database ORACLE error: RMAN-20215: backup set not foundRMAN-06159: Error looking backup set RMAN> resync catalog; starting resync in all recovery directories to complete all resync RMAN> list backup; backup set list =========================== BS keyword Type LV Size Device Type completion time ------- ----- ---- ------------ ----------- -------------- ------------ ---------- 2850 Full 5.85 m disk 00:00:02 04-8 month-13 BP Keyword: 2854 status: AVAILABLE compressed: NO mark: TAG20130804T113826 segment name: D: \ BACKUP \ ORCL_159.BAK BACKUP set 2850 data file list file LV type Ckp SCN Ckp time name ---- ------------ ---------- ---- 6 Full 33821001663 04-8 month-13 E: \ RM_TAB.DBF BS keyword Type LV Size Device Type completion time ------- ---- -- ---------- ----------- ---------- 2851 Full 9.55 m disk 00:00:03 04-8-13 BP Keyword: 2855 status: AVAILABLE compressed: NO mark: TAG20130804T113830 segment name: F: \ RMANBACKUP \ CONTROLFILE \ spfile contained in the C-1318810635-20130804-03: modified at:-13 included control file: Ckp SCN: 33821001682 Ckp time: the "BS keyword" of the same backup set in the control file and the recovery directory record is different from that in the month from month to month. However, there should be a ing relationship in oracle; RMAN> change backupset 2850 keep forever; Use the channel ORA_DISK_1 for backup Backup set keyword = 2850 RECID = 135 STAMP = 822569908 RMAN> backup database tag = 'back _ database '; start backup on March 13, using channel ORA_DISK_1 ORA_DISK_1: starting all data file backup set channels ORA_DISK_1: specifying the data file input data file in the backup set: file No. = 00001 name = E: \ ORACLE \ PRODUCT \ 10.2.0 \ ORADATA \ ORCL \ SYSTEM01.DBF input data file: File No. = 00003 name = E: \ ORACLE \ PRODUCT \ 10.2.0 \ ORADATA \ ORCL \ SYSAUX01.DBF enter the data file: file number = 00004 name = E: \ ORACLE \ PRODUCT \ 10.2.0 \ ORADATA \ ORCL \ USERS01.DB F input data file: File No. = 00002 name = E: \ ORACLE \ PRODUCT \ 10.2.0 \ ORADATA \ ORCL \ UNDOTBS01.DBF input data file: File No. = 00005 name = E: \ ORACLE \ PRODUCT \ 10.2.0 \ ORADATA \ ORCL \ EXAMPLE01.DBF input data file: file number = 00006 name = E: \ RM_TAB.DBF input data file: file number = 00007 name = E: \ RMAN. DBF channel ORA_DISK_1: Starting segment 1 from month-8 to month-13 ORA_DISK_1: Completed segment 1 from month-8 to month-13 handle segment = D: \ BACKUP \ ORCL_165.BAK flag = BACK_DATABASE annotation = NONE channel ORA_DISK_1: backup set completed. After Time: 00: 03: 05, BACKUP is completed, and Control Fi is started from month 0 to month 8 to month 13. Le and SPFILE Autobackup in the-13 segment handle = F: \ RMANBACKUP \ CONTROLFILE \ C-1318810635-20130804-06 comment = NONE to complete the Control File and SPFILE Autobackup in the month-13 RMAN> list backup; backup set list =============================== BS keyword Type LV Size Device Type completion time ------- ---- ------------ ----------- ------------ ---------- 2850 full 5.85 m disk 00:00:02-13 BP Keyword: 2854 status: AVAILABLE compressed: NO mark: TAG20130804T113826 segment name: D: \ BACK UP \ ORCL_159.BAK retention: BACKUP_LOGS until: FOREVER backup set 2850 data file list file LV type Ckp SCN Ckp time name ---- ------------ -------- ---- 6 Full 33821001663 04-8 month-13 E: \ RM_TAB.DBF BS keyword Type LV Size Device Type completion time ------- ----- ---- ------------ ----------- ------------ ---------- 2851 Full 9.55 m disk 00:00:03 04-8 month-13 BP Keyword: 2855 status: AVAILABLE compressed: NO tag: TAG20130804T113830 segment name: F: \ RMANBACKUP \ CONTROLFILE \ C-13188106 SPFILE contained in 35-20130804-03: modification time: control file included in month-13: Ckp SCN: 33821001682 Ckp time: 04-8 month-13 BS keyword Type LV Size Device Type completion time ------- ---- -- ---------- ----------- ------------ ---------- 3156 Full 1.53g disk 00:02:56 04-8 month-13 BP Keyword: 3159 status: AVAILABLE compressed: NO mark: BACK_DATABASE segment name: D: \ BACKUP \ ORCL_165.BAK BACKUP set 3156 data file list file LV type Ckp SCN Ckp time name ---- ------------ -------- ---- 1 Full 3382100 2940 month-13 E: \ ORACLE \ PRODUCT \ 10.2.0 \ ORADATA \ ORCL \ SYSTEM01.DBF 2 Full 33821002940 month-13 E: \ ORACLE \ PRODUCT \ 10.2.0 \ ORADATA \ ORCL \ UNDOTBS01.DBF 3 Full 33821002940 04-8 month-13 E: \ ORACLE \ PRODUCT \ 10.2.0 \ ORADATA \ ORCL \ SYSAUX01.DBF 4 Full 33821002940 04-8 month-13 E: \ ORACLE \ PRODUCT \ 10.2.0 \ ORADATA \ ORCL \ USERS01.DBF 5 Full 33821002940 month-13 E: \ ORACLE \ PRODUCT \ 10.2.0 \ ORADATA \ ORCL \ EXAMPLE01.DBF 6 Full 338210 02940 04-8 month-13 E: \ RM_TAB.DBF 7 Full 33821002940 04-8 month-13 E: \ RMAN. DBF then operates without catalog (in fact, I just want to give it a try to see if it has been updated in catalog without catalog) C: \ Documents ents and Settings \ Administrator> rman target/recovery Manager: Release 11.2.0.1.0-Production on Sunday August 4 12:24:17 2013 Copyright (c) 1982,200 9, Oracle and/or its affiliates. all rights reserved. connect to the target database: ORCL (DBID = 1318810635) because the backup set in the control file corresponds to the backup set in the recovery directory between 135 and 2850, saving the length. 135 RMAN> change backupset 135 nokeep is used for backup operations; the reserved attribute of the backup Using the channel ORA_DISK_1 is deleted. The backup set keyword = 135 RECID = 135 STAMP = 822569908 RMAN> list backup; backup set list =============================== BS keyword Type LV Size Device Type completion time ------- ---- ------------ ----------- ------------ ---------- 135 full 5.85 m disk 00:00:02-13 BP Keyword: 134 status: AVAILABLE compressed: NO mark: TAG20130804T113826 segment name: D: \ BACKUP \ ORCL_159.BAK BACKUP set 135 data file list file LV type Ckp SCN Ckp Time name ---- ---------- ---- 6 Full 33821001663 04-8 month-13 E: \ RM_TAB.DBF BS keyword Type LV Size Device Type completion time ------- ---- ------------ ----------- ------------ ---------- 141 Full 1.53g disk 00:02:56 04-8 month-13 BP Keyword: 140 status: AVAILABLE compressed: NO flag: BACK_DATABASE segment name: D: \ BACKUP \ ORCL_165.BAK BACKUP set 141 data file list file LV type Ckp SCN Ckp time name ---- ------------ -------- ---- 1 Full 33821002940 Month-13 E: \ ORACLE \ PRODUCT \ 10.2.0 \ ORADATA \ ORCL \ SYSTEM01.DBF 2 Full 33821002940 month-13 E: \ ORACLE \ PRODUCT \ 10.2.0 \ ORADATA \ ORCL \ UNDOTBS01.DBF 3 Full 33821002940 04-8 month-13 E: \ ORACLE \ PRODUCT \ 10.2.0 \ ORADATA \ ORCL \ SYSAUX01.DBF 4 Full 33821002940 04-8 month-13 E: \ ORACLE \ PRODUCT \ 10.2.0 \ ORADATA \ ORCL \ USERS01.DBF 5 Full 33821002940 month-13 E: \ ORACLE \ PRODUCT \ 10.2.0 \ ORADATA \ ORCL \ EXAMPLE01.DBF 6 Full 3382100294 0 04-8 months-13 E: \ RM_TAB.DBF 7 Full 33821002940 04-8 months-13 E: \ RMAN. DBF goes through change... nokeep operation indicates that 135 (2850 in catalog) has no "retained: BACKUP_LOGS until: FOREVER" this information; to see if it has been marked as "obsolete" RMAN> report obsolete; replacing the recovery directory with the target database control file RMAN retention policy will be applied to this command to set the RMAN retention policy to redundancy 1 obsolete backup and copy report type keyword completion time file name/handle -------------------------------------------- ------------------ backup set 135 month-8 month-13 backup segment 134 month-13 month-13 D: \ BACKUP \ ORCL_159.BAK OK, marked as obsolete Backup set; at this time, let's go to catalog to see what the situation is: RMAN> list backup; backup set list =============================== BS keyword Type LV Size Device Type completion time ------- ---- ------------ ----------- ------------ ---------- 2850 full 5.85 m disk 00:00:02-13 BP Keyword: 2854 status: AVAILABLE compressed: NO mark: TAG20130804T113826 segment name: D: \ BACKUP \ ORCL_159.BAK BACKUP set 2850 data file list file LV type Ckp SCN Ckp time name ---- ------------ -------- ---- 6 Full 33821001663 04-8 month-13 E: \ RM_TAB.DBF BS keyword Type LV Size Device Type completion time ------- ---- ------------ ----------- ------------ ---------- 3156 Full 1.53g disk 00:02:56 04-8 month-13 BP Keyword: 3159 status: AVAILABLE compressed: NO mark: BACK_DATABASE segment name: D: \ BACKUP \ ORCL_165.BAK BACKUP set 3156 data file list file LV type Ckp SCN Ckp time name ---- ------------ -------- ---- 1 Full 33821002940 04-8 month-13 E: \ ORACLE \ PRODUCT \ 10.2.0 \ ORADATA \ ORCL \ SYSTEM01.DBF 2 Full 33821 002940 month-13 E: \ ORACLE \ PRODUCT \ 10.2.0 \ ORADATA \ ORCL \ UNDOTBS01.DBF 3 Full 33821002940 month-13 month-13 E: \ ORACLE \ PRODUCT \ 10.2.0 \ ORADATA \ ORCL \ SYSAUX01.DBF 4 Full 33821002940 04-8 month-13 E: \ ORACLE \ PRODUCT \ 10.2.0 \ ORADATA \ ORCL \ USERS01.DBF 5 Full 33821002940 04-8 month-13 E: \ ORACLE \ PRODUCT \ 10.2.0 \ ORADATA \ ORCL \ EXAMPLE01.DBF 6 Full 33821002940 month-13 E: \ RM_TAB.DBF 7 Full 33821002940 month-8 month-13 E: \ RMAN. dbf rman> r Eport obsolete; the RMAN retention policy applies to this command to set the RMAN retention policy to redundant 1 obsolete backup and copy report type keyword completion time file name/handle -------------------- ------------------ ---------------- backup set 2850 04-8 month-13 backup fragment 2854 month-13 D: \ BACKUP \ ORCL_159.BAK indicates that it is synchronized with the non-catalog file. Since it is so timely, does it mean that something similar to a "Trigger" is information between the synchronization control file and the recovery directory? In fact, when certain operations such as backup and delete are executed, internal mechanisms will automatically synchronize; there is an ocp question to examine this knowledge point Q513. You have med the RMAN database backup having abackupset key number 231 with the keep forever option. after some days, youwant to change the status of the database backup and you issued the followingcommand: RMAN> change backupset 231 NOKEEP; What is the implication of this command? A. the backup is deleted. b. the backup is marked unavailable. c. the backup overrides the backup retention policy. d. the backup becomes eligible fordeletion according to the existing retention policy Answer: D

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.