DB_RECOVERY_FILE_DEST | 高速リカバリ領域で使用する ディレクトリを指定 |
---|---|
DB_RECOVERY_FILE_DEST_SIZE | 高速リカバリ領域で使用する 最大サイズを指定 |
$ mkdir -p /home/oracle/flash_recovery_are $ sqlplus / as sysdba SQL> show parameter db_recovery NAME TYPE VALUE ------------------------------------ ----------- ------------------- db_recovery_file_dest string db_recovery_file_dest_size big integer 0 SQL> alter system set db_recovery_file_dest_size = 5G; System altered. SQL> alter system set 2 db_recovery_file_dest = '/home/oracle/flash_recovery_area'; System altered. SQL> show parameter db_recovery NAME TYPE VALUE ------------------------------------ ----------- ------------------------- db_recovery_file_dest string /home/oracle/flash_recove ry_area db_recovery_file_dest_size big integer 5G
SQL> show parameter log_archive NAME TYPE VALUE ------------------------------------ ----------- ------------------------------ log_archive_config string log_archive_dest string log_archive_dest_1 string log_archive_dest_10 string log_archive_dest_11 string ・・・ SQL> archive log list Database log mode Archive Mode Automatic archival Enabled Archive destination USE_DB_RECOVERY_FILE_DEST Oldest online log sequence 38 Next log sequence to archive 40 Current log sequence 40
$ ls -l /home/oracle/flash_recovery_area 合計 0 $ rman target / Recovery Manager: Release 12.1.0.2.0 - Production on Wed Apr 19 18:40:24 2017 Copyright (c) 1982, 2014, Oracle and/or its affiliates. All rights reserved. connected to target database: ORCL (DBID=1452128597) RMAN> backup tablespace system; Starting backup at 19-APR-17 using target database control file instead of recovery catalog allocated channel: ORA_DISK_1 channel ORA_DISK_1: SID=43 device type=DISK ・・・ RMAN> exit $ ls -lR /home/oracle/flash_recovery_area /home/oracle/flash_recovery_area: 合計 4 drwxr-x--- 4 oracle oinstall 4096 XX XX:XX 2017 ORCL /home/oracle/flash_recovery_area/ORCL: 合計 8 drwxr-x--- 3 oracle oinstall 4096 XX XX:XX 2017 autobackup drwxr-x--- 3 oracle oinstall 4096 XX XX:XX 2017 backupset /home/oracle/flash_recovery_area/ORCL/autobackup: 合計 4 drwxr-x--- 2 oracle oinstall 4096 XX XX:XX 2017 2017_XX_XX /home/oracle/flash_recovery_area/ORCL/autobackup/2017_XX_XX: 合計 17632 -rw-r----- 1 oracle oinstall 18055168 XX XX:XX 2017 o1_mf_s_941741085_dhgddfvr_.bkp /home/oracle/flash_recovery_area/ORCL/backupset: 合計 4 drwxr-x--- 2 oracle oinstall 4096 XX XX:XX 2017 2017_XX_XX /home/oracle/flash_recovery_area/ORCL/backupset/2017_XX_XX: 合計 682844 -rw-r----- 1 oracle oinstall 699228160 XX XX:XX 2017 o1_mf_nnndf_TAG2XX_dhgd4ljv_.bkp
SQL> show parameter log_archive_format NAME TYPE VALUE ------------------------------------ ----------- ------------------------------ log_archive_format string %t_%s_%r.dbf SQL> alter system switch logfile; SQL> !ls /home/oracle/flash_recovery_area/ORCL/archivelog/* o1_mf_1_1_dhgf1wg6_.arc
RMAN> show all;
RMAN configuration parameters for database with db_unique_name ORCL are:
CONFIGURE RETENTION POLICY TO REDUNDANCY 1; # default
・・・省略
RMAN> list backup;
specification does not match any backup in the repository
RMAN> list backup; specification does not match any backup in the repository RMAN> backup database; Starting backup at 20-APR-17 using channel ORA_DISK_1 channel ORA_DISK_1: starting full datafile backup set channel ORA_DISK_1: specifying datafile(s) in backup set input datafile file number=00001 name=/u01/app/oracle/oradata/orcl/system01.dbf input datafile file number=00003 name=/u01/app/oracle/oradata/orcl/sysaux01.dbf ・・・省略 Starting Control File and SPFILE Autobackup at 20-APR-17 piece handle=/home/oracle/flash_recovery_area/ORCL/autobackup/2017_04_20/ o1_mf_s_941822026_dhjvfv1g_.bkp comment=NONE Finished Control File and SPFILE Autobackup at 20-APR-17
RMAN> report obsolete;
RMAN retention policy will be applied to the command
RMAN retention policy is set to redundancy 1
no obsolete backups found
RMAN> backup database;
Starting backup at 20-APR-17
using channel ORA_DISK_1
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00001
name=/u01/app/oracle/oradata/orcl/system01.dbf
input datafile file number=00003
name=/u01/app/oracle/oradata/orcl/sysaux01.dbf
・・・省略
Starting Control File and SPFILE Autobackup at 20-APR-17
piece handle=/home/oracle/flash_recovery_area/ORCL/autobackup/2017_04_20/
o1_mf_s_XX_dhjvfv1g_.bkp comment=NONE
Finished Control File and SPFILE Autobackup at 20-APR-17
RMAN> report obsolete;
RMAN retention policy will be applied to the command
RMAN retention policy is set to redundancy 1
Report of obsolete backups and copies
Type Key Completion Time Filename/Handle
-------------------- ------ ---------------- --------------------
Backup Set 14 20-APR-17
Backup Piece 14 20-APR-17 /home/oracle/flash_recovery_area/ORCL
/backupset/2017_04_20/XX_TAG2017XXXk7_.bkp
Backup Set 15 20-APR-17
Backup Piece 15 20-APR-17 /home/oracle/flash_recovery_area/ORCL
/backupset/2017_04_20/o1_mf_XX_TAG201XX_XX_.bkp
Backup Set 16 20-APR-17
Backup Piece 16 20-APR-17 /home/oracle/flash_recovery_area/ORCL
/autobackup/2017_04_20/o1_XX_.bkp
RMAN> delete obsolete; RMAN retention policy will be applied to the command RMAN retention policy is set to redundancy 1 using channel ORA_DISK_1 Deleting the following obsolete backups and copies: Type Key Completion Time Filename/Handle ----------------- ------ ----------------- -------------------- Backup Set 14 20-APR-17 Backup Piece 14 20-APR-17 /home/oracle/flash_recovery_area/ORCL /backupset/2017_04_20/o1_mf_nnndf_TAGXX_XX_.bkp Backup Set 15 20-APR-17 Backup Piece 15 20-APR-17 /home/oracle/flash_recovery_area/ORCL /backupset/2017_04_20/o1_mf_XX_TAG201704XX_.bkp Backup Set 16 20-APR-17 Backup Piece 16 20-APR-17 /home/oracle/flash_recovery_area/ORCL /autobackup/2017_04_20/o1_mf_s_XX_XX_.bkp Do you really want to delete the above objects (enter YES or NO)? yes deleted backup piece backup piece handle=/home/oracle/flash_recovery_area/ORCL/backupset/2017_04_20/ o1_mf_nnndf_TAGXX_XX_.bkp RECID=14 STAMP=941821665 deleted backup piece backup piece handle=/home/oracle/flash_recovery_area/ORCL/XX/backupset/2017_04_20 /o1_mf_nnndf_TAG201704XX_XX_.bkp RECID=15 STAMP=941821971 deleted backup piece backup piece handle=/home/oracle/flash_recovery_area/ORCL/autobackup/2017_04_20/ o1_mf_s_XX_XX_.bkp RECID=16 STAMP=941822027 Deleted 3 objects RMAN> list backup; List of Backup Sets =================== BS Key Type LV Size Device Type Elapsed Time Completion Time ------- ---- -- ---------- ----------- ------------ --------------- 17 Full 1.17G DISK 00:01:07 20-APR-17 BP Key: 17 Status: AVAILABLE Compressed: NO Tag: TAG20170420T172019 Piece Name: /home/oracle/flash_recovery_area/ORCL/backupset/2017_04_20/ o1_mf_nnndf_TAG20170420T172019_dhjvt36n_.bkp List of Datafiles in backup set 17 File LV Type Ckp SCN Ckp Time Name ---- -- ---- ---------- --------- ---- 1 Full 2645012 20-APR-17 /u01/app/oracle/oradata/orcl/system01.dbf 3 Full 2645012 20-APR-17 /u01/app/oracle/oradata/orcl/sysaux01.dbf 4 Full 2645012 20-APR-17 /u01/app/oracle/oradata/orcl/undotbs01.dbf 6 Full 2645012 20-APR-17 /u01/app/oracle/oradata/orcl/users01.dbf BS Key Type LV Size Device Type Elapsed Time Completion Time ------- ---- -- ---------- ----------- ------------ --------------- 18 Full 660.31M DISK 00:00:41 20-APR-17 BP Key: 18 Status: AVAILABLE Compressed: NO Tag: TAG20170420T172019 Piece Name: /home/oracle/flash_recovery_area/ORCL/XX/backupset/2017_04_20/ o1_mf_nnndf_TAG20170420T172019_dhjvwgdl_.bkp List of Datafiles in backup set 18 Container ID: 2, PDB Name: PDB$SEED File LV Type Ckp SCN Ckp Time Name ---- -- ---- ---------- --------- ---- 5 Full 1739077 04-OCT-16 /u01/app/oracle/oradata/orcl/pdbseed/system01.dbf 7 Full 1739077 04-OCT-16 /u01/app/oracle/oradata/orcl/pdbseed/sysaux01.dbf BS Key Type LV Size Device Type Elapsed Time Completion Time ------- ---- -- ---------- ----------- ------------ --------------- 19 Full 17.20M DISK 00:00:00 20-APR-17 BP Key: 19 Status: AVAILABLE Compressed: NO Tag: TAG20170420T172219 Piece Name: /home/oracle/flash_recovery_area/ORCL/autobackup/2017_04_20 /o1_mf_s_941822539_dhjvxvvo_.bkp SPFILE Included: Modification time: 20-APR-17 SPFILE db_unique_name: ORCL Control File Included: Ckp SCN: 2645060 Ckp time: 20-APR-17