Oracle-31-backup and recovery

Keywords: Database

First, let's look at a parameter that affects the recovery time of the database

SYS@ orcl>show parameter mttr

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
fast_start_mttr_target               integer     0

This parameter affects the time we use for recovery. If this value is set, the database will ensure that the recovery time will not exceed the set value (that is, the frequency of memory dirty data written to the log file will be adjusted according to the speed of writing dirty blocks measured by the database itself)

Let's take a look at the storage path of archive logs

SYS@ orcl>show parameter recovery

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
db_recovery_file_dest                string      +FLASH
db_recovery_file_dest_size           big integer 15882M
recovery_parallelism                 integer     0

View usage of flashback area

SYS@ orcl>col name for a20
SYS@ orcl>col space_limit for 99999999999
SYS@ orcl>select * from v$recovery_file_dest;

NAME                  SPACE_LIMIT SPACE_USED SPACE_RECLAIMABLE NUMBER_OF_FILES
-------------------- ------------ ---------- ----------------- ---------------
+FLASH                16653484032  171966464                 0               4

Elapsed: 00:00:00.01

It can also be changed to MB display

SYS@ orcl>select name,SPACE_LIMIT/1048576,SPACE_USED/1048576 from v$recovery_file_dest;

NAME                 SPACE_LIMIT/1048576 SPACE_USED/1048576
-------------------- ------------------- ------------------
+FLASH                             15882                164

Elapsed: 00:00:00.03

The flash back area can also store the image of key database files

SYS@ orcl>select * from v$controlfile;

STATUS  NAME                                               IS_ BLOCK_SIZE FILE_SIZE_BLKS
------- -------------------------------------------------- --- ---------- --------------
        +DATA/orcl/controlfile/current.260.982157551       NO       16384            594
        +FLASH/orcl/controlfile/current.256.982157551      YES      16384            594

Elapsed: 00:00:00.00
SYS@ orcl>select * from v$log;

    GROUP#    THREAD#  SEQUENCE#      BYTES  BLOCKSIZE    MEMBERS ARC STATUS           FIRST_CHANGE# FIRST_TIME
---------- ---------- ---------- ---------- ---------- ---------- --- ---------------- ------------- ------------------
NEXT_CHANGE# NEXT_TIME
------------ ------------------
         1          1         10   52428800        512          2 NO  CURRENT                1110841 23-JUL-18
  2.8147E+14

         2          1          8   52428800        512          2 NO  INACTIVE               1095134 23-JUL-18
     1103706 23-JUL-18

         3          1          9   52428800        512          2 NO  INACTIVE               1103706 23-JUL-18
     1110841 23-JUL-18


Elapsed: 00:00:00.02
SYS@ orcl>select * from v$logfile;

    GROUP# STATUS  TYPE    MEMBER                                             IS_
---------- ------- ------- -------------------------------------------------- ---
         3         ONLINE  +DATA/orcl/onlinelog/group_3.263.982157555         NO
         3         ONLINE  +FLASH/orcl/onlinelog/group_3.259.982157557        YES
         2         ONLINE  +DATA/orcl/onlinelog/group_2.262.982157553         NO
         2         ONLINE  +FLASH/orcl/onlinelog/group_2.258.982157555        YES
         1         ONLINE  +DATA/orcl/onlinelog/group_1.261.982157551         NO
         1         ONLINE  +FLASH/orcl/onlinelog/group_1.257.982157553        YES

6 rows selected.

Elapsed: 00:00:00.01
SYS@ orcl>archive log list
Database log mode              No Archive Mode
Automatic archival             Disabled
Archive destination            USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence     8
Current log sequence           10
SYS@ orcl>

 

Posted by wpsd2006 on Fri, 31 Jan 2020 09:08:31 -0800