Oracle database 10g falshback knowledge
1. Knowledge reserve 1) when the media is damaged (such as the loss of data files), any flash back method is useless and can only perform standard backup, restoration, and recovery. 2. SCN record method [SQL] SQL> variable x_scn number; SQL> execute: x_scn: = dbms_flashback.get_system_change_number; SQL> print x_scn; or [SQL] SQL> select current_scn, flashback_on from v $ database; 1) if the current SCN is set to A, the expected historical SCN is B, and B is used as the returned form. If it is not the expected result, you can use A as the SCN node of the flashback table to flash back again, and the initial state is obtained. 2) The SCN value used for table flash back is included in the flash back, that is, the selected SCN and all data before the SCN are restored. 3. The flashback reply area is 3.1, and the default storage is 1. 7 types of files stored in the flash_recovery_area area by default.) the default location for disk BACKUP (backup as copy); B) the default location for archiving logs (ARCHIVE LOG, not recommended, should be placed in another location AS soon AS possible, because once the flash back area is full, archive will stop, leading to DML stop); c) RMAN backup (full backup); d) automatic backup of control files (set in RMAN); e) reusable control files; f) redo log copies; g) flash back log files (only here); 2) if the flash back reply area is full, it will affect RMAN backup and FLASHBACKDATABASE. 3) ORACLE recommends that the reply area be large enough. 4) because the space itself is limited (no matter how large the space is), it is recommended to regularly use a) [SQL] RMAN> delete obsolete; // delete a backup that is no longer needed by RMAN. SQL> select space_limit/1024/1024 as limit_MB, space_used/1024/1024 as used_MB, space_reclaimable/1024/1024 as reclaimable_MB, number_of_filesfrom v $ recovery_file_dest; explain -------------------- ------------ --------------- 3852 3634.82275 2152.38379 39 [SQL] RMAN> delete obsolete; SQL> select space_limit/1024/1024 as limit_MB, space_used/1024/1024 as used_MB, s Pace_reclaimable/1024/1024 as reclaimable_MB, number_of_filesfrom v $ recovery_file_dest; choose ---------------------- ----------------- 3852 1482.43896 0 13 B) [SQL] RMAN> backup... Delete input; // delete unnecessary files after backup. 3.2 view [SQL] SQL> select name, space_limit/1024/1024 as limit_MB, space_used/1024/1024 as used_MB, space_reclaimable/1024/1024 as reclaimable_MB, number_of_files from v $ recovery_file_dest; NAME LIMIT_MB USED_MB RECLAIMABLE_MB NUMBER_OF_FILES certificate ------------- ------------ ------------------ -----------------/u01/app/oracle/flash_recovery_area 3852 3634.82275 2152.383 79 39 3.3 backup [SQL] RMAN> BACKUP recovery area; // The backup RECOVERY AREA command can be followed by delete all input to release disk space. The BACKUP recovery area command can only be used to back up data to tape, otherwise the error RMAN-06603 Starting backupat 27-JUL-13 using targetdatabase control file instead of recovery catalog allocatedchannel: ORA_DISK_1 channelORA_DISK_1: SID = 781 device type = DISK RMAN-00571: ================================================================ RMAN-00569: ======= error message stack follows === RMAN-0057 1: ================================================================ RMAN-03002: failure of backup command at 07/27/2013 16:11:42 RMAN-06603: TODESTINATION option must be specified with recovery area, recovery files orDB_RECOVERY_FILE_DEST on disk device backup includes: 1) Complete and Incremental backup set 2) ing copies of data files and archive log files 3) automatic backup of control files 4) archive log backup does not include 1) flash back log (If backup is required, you must disable the database) 2) current Control File 3) online redo log (never backed up) [SQL] RMAN> backup recovery files; // It can only be backed up to tape; otherwise, an error is reported. Back up all the reply files, whether in the flash back area or not, with a larger range than the first statement. Starting backupat 27-JUL-13 using channelORA_DISK_1 RMAN-00571: ================================================================ RMAN-00569: ==== error message stack follows ========= RMAN-00571: ================================================================ RMAN-03002: failure of backup command at 07/27/2013 16:21:09 RMAN-06603: to destination option must be specified with recovery area, recovery files or DB_RECOVERY_FILE_DEST on disk device