controlfile作为RMAN的repository时,对 keep time 的测试

简介:

4月2日,首先查看系统状况:

 

SQL> show parameter control 

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
control_file_record_keep_time        integer     2
control_files                        string      /u01/app/oracle/oradata/orcl/c
                                                 ontrol01.ctl, /u01/app/oracle/
                                                 flash_recovery_area/orcl/contr
                                                 ol02.ctl
control_management_pack_access       string      DIAGNOSTIC+TUNING
SQL>

 

 

*********************************************************************

此时,查看备份状态:

[oracle@localhost ~]$ rman target /

Recovery Manager: Release 11.2.0.1.0 - Production on Wed Apr 2 08:29:05 2014

Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.

connected to target database: ORCL (DBID=1369869147)

RMAN> show all;

using target database control file instead of recovery catalog
RMAN configuration parameters for database with db_unique_name ORCL are:
CONFIGURE RETENTION POLICY TO REDUNDANCY 1; # default
CONFIGURE BACKUP OPTIMIZATION OFF; # default
CONFIGURE DEFAULT DEVICE TYPE TO DISK; # default
CONFIGURE CONTROLFILE AUTOBACKUP OFF; # default
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '%F'; # default
CONFIGURE DEVICE TYPE DISK PARALLELISM 1 BACKUP TYPE TO BACKUPSET; # default
CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE MAXSETSIZE TO UNLIMITED; # default
CONFIGURE ENCRYPTION FOR DATABASE OFF; # default
CONFIGURE ENCRYPTION ALGORITHM 'AES128'; # default
CONFIGURE COMPRESSION ALGORITHM 'BASIC' AS OF RELEASE 'DEFAULT' OPTIMIZE FOR LOAD TRUE ; # default
CONFIGURE ARCHIVELOG DELETION POLICY TO NONE; # default
CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/u01/app/oracle/product/11.2.0/dbhome_1/dbs/snapcf_orcl.f'; # default

RMAN> configure retention policy to recovery window of 1 days;

new RMAN configuration parameters:
CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 1 DAYS;
new RMAN configuration parameters are successfully stored

RMAN> list backup;


List of Backup Sets
===================

BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
3       Full    1.05G      DISK        00:02:01     01-APR-14      
        BP Key: 3   Status: AVAILABLE  Compressed: NO  Tag: TAG20140401T172802
        Piece Name: /u01/app/oracle/flash_recovery_area/ORCL/backupset/2014_04_01/o1_mf_nnndf_TAG20140401T172802_9mo1o2g2_.bkp
  List of Datafiles in backup set 3
  File LV Type Ckp SCN    Ckp Time  Name
  ---- -- ---- ---------- --------- ----
  1       Full 1002637    01-APR-14 /u01/app/oracle/oradata/orcl/system01.dbf
  2       Full 1002637    01-APR-14 /u01/app/oracle/oradata/orcl/sysaux01.dbf
  3       Full 1002637    01-APR-14 /u01/app/oracle/oradata/orcl/undotbs01.dbf
  4       Full 1002637    01-APR-14 /u01/app/oracle/oradata/orcl/users01.dbf
  5       Full 1002637    01-APR-14 /u01/app/oracle/oradata/orcl/example01.dbf

BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
4       Full    9.36M      DISK        00:00:05     01-APR-14      
        BP Key: 4   Status: AVAILABLE  Compressed: NO  Tag: TAG20140401T172802
        Piece Name: /u01/app/oracle/flash_recovery_area/ORCL/backupset/2014_04_01/o1_mf_ncsnf_TAG20140401T172802_9mo1s2ky_.bkp
  SPFILE Included: Modification time: 01-APR-14
  SPFILE db_unique_name: ORCL
  Control File Included: Ckp SCN: 1002728      Ckp time: 01-APR-14

 

再看RMAN的设定变化:

再看RMAN的设定:

RMAN> show all;

RMAN configuration parameters for database with db_unique_name ORCL are:
CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 1 DAYS;
CONFIGURE BACKUP OPTIMIZATION OFF; # default
CONFIGURE DEFAULT DEVICE TYPE TO DISK; # default
CONFIGURE CONTROLFILE AUTOBACKUP OFF; # default
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '%F'; # default
CONFIGURE DEVICE TYPE DISK PARALLELISM 1 BACKUP TYPE TO BACKUPSET; # default
CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE MAXSETSIZE TO UNLIMITED; # default
CONFIGURE ENCRYPTION FOR DATABASE OFF; # default
CONFIGURE ENCRYPTION ALGORITHM 'AES128'; # default
CONFIGURE COMPRESSION ALGORITHM 'BASIC' AS OF RELEASE 'DEFAULT' OPTIMIZE FOR LOAD TRUE ; # default
CONFIGURE ARCHIVELOG DELETION POLICY TO NONE; # default
CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/u01/app/oracle/product/11.2.0/dbhome_1/dbs/snapcf_orcl.f'; # default

RMAN>

 

在4月2日执行backup后再看:

RMAN> backup database;

Starting backup at 02-APR-14
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=29 device type=DISK
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=00002 name=/u01/app/oracle/oradata/orcl/sysaux01.dbf
input datafile file number=00005 name=/u01/app/oracle/oradata/orcl/example01.dbf
input datafile file number=00003 name=/u01/app/oracle/oradata/orcl/undotbs01.dbf
input datafile file number=00004 name=/u01/app/oracle/oradata/orcl/users01.dbf
channel ORA_DISK_1: starting piece 1 at 02-APR-14
channel ORA_DISK_1: finished piece 1 at 02-APR-14
piece handle=/u01/app/oracle/flash_recovery_area/ORCL/backupset/2014_04_02/o1_mf_nnndf_TAG20140402T083021_9mppjxh1_.bkp tag=TAG20140402T083021 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:01:45
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
including current control file in backup set
including current SPFILE in backup set
channel ORA_DISK_1: starting piece 1 at 02-APR-14
channel ORA_DISK_1: finished piece 1 at 02-APR-14
piece handle=/u01/app/oracle/flash_recovery_area/ORCL/backupset/2014_04_02/o1_mf_ncsnf_TAG20140402T083021_9mppn7g5_.bkp tag=TAG20140402T083021 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
Finished backup at 02-APR-14

RMAN> list backup;


List of Backup Sets
===================


BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
3       Full    1.05G      DISK        00:02:01     01-APR-14      
        BP Key: 3   Status: AVAILABLE  Compressed: NO  Tag: TAG20140401T172802
        Piece Name: /u01/app/oracle/flash_recovery_area/ORCL/backupset/2014_04_01/o1_mf_nnndf_TAG20140401T172802_9mo1o2g2_.bkp
  List of Datafiles in backup set 3
  File LV Type Ckp SCN    Ckp Time  Name
  ---- -- ---- ---------- --------- ----
  1       Full 1002637    01-APR-14 /u01/app/oracle/oradata/orcl/system01.dbf
  2       Full 1002637    01-APR-14 /u01/app/oracle/oradata/orcl/sysaux01.dbf
  3       Full 1002637    01-APR-14 /u01/app/oracle/oradata/orcl/undotbs01.dbf
  4       Full 1002637    01-APR-14 /u01/app/oracle/oradata/orcl/users01.dbf
  5       Full 1002637    01-APR-14 /u01/app/oracle/oradata/orcl/example01.dbf

BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
4       Full    9.36M      DISK        00:00:05     01-APR-14      
        BP Key: 4   Status: AVAILABLE  Compressed: NO  Tag: TAG20140401T172802
        Piece Name: /u01/app/oracle/flash_recovery_area/ORCL/backupset/2014_04_01/o1_mf_ncsnf_TAG20140401T172802_9mo1s2ky_.bkp
  SPFILE Included: Modification time: 01-APR-14
  SPFILE db_unique_name: ORCL
  Control File Included: Ckp SCN: 1002728      Ckp time: 01-APR-14

BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
5       Full    1.00G      DISK        00:01:37     02-APR-14      
        BP Key: 5   Status: AVAILABLE  Compressed: NO  Tag: TAG20140402T083021
        Piece Name: /u01/app/oracle/flash_recovery_area/ORCL/backupset/2014_04_02/o1_mf_nnndf_TAG20140402T083021_9mppjxh1_.bkp
  List of Datafiles in backup set 5
  File LV Type Ckp SCN    Ckp Time  Name
  ---- -- ---- ---------- --------- ----
  1       Full 1008677    02-APR-14 /u01/app/oracle/oradata/orcl/system01.dbf
  2       Full 1008677    02-APR-14 /u01/app/oracle/oradata/orcl/sysaux01.dbf
  3       Full 1008677    02-APR-14 /u01/app/oracle/oradata/orcl/undotbs01.dbf
  4       Full 1008677    02-APR-14 /u01/app/oracle/oradata/orcl/users01.dbf
  5       Full 1008677    02-APR-14 /u01/app/oracle/oradata/orcl/example01.dbf

BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
6       Full    9.36M      DISK        00:00:02     02-APR-14      
        BP Key: 6   Status: AVAILABLE  Compressed: NO  Tag: TAG20140402T083021
        Piece Name: /u01/app/oracle/flash_recovery_area/ORCL/backupset/2014_04_02/o1_mf_ncsnf_TAG20140402T083021_9mppn7g5_.bkp
  SPFILE Included: Modification time: 02-APR-14
  SPFILE db_unique_name: ORCL
  Control File Included: Ckp SCN: 1008751      Ckp time: 02-APR-14

RMAN> quit

******************************************************************
4月3日再进行backup:
[oracle@localhost ~]$ date
Thu Apr  3 08:56:15 CST 2014

Recovery Manager complete.
[oracle@localhost ~]$ rman target /

Recovery Manager: Release 11.2.0.1.0 - Production on Thu Apr 3 08:56:25 2014

Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.

connected to target database: ORCL (DBID=1369869147)

RMAN> list backup;

using target database control file instead of recovery catalog

List of Backup Sets
===================


BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
3       Full    1.05G      DISK        00:02:01     01-APR-14      
        BP Key: 3   Status: AVAILABLE  Compressed: NO  Tag: TAG20140401T172802
        Piece Name: /u01/app/oracle/flash_recovery_area/ORCL/backupset/2014_04_01/o1_mf_nnndf_TAG20140401T172802_9mo1o2g2_.bkp
  List of Datafiles in backup set 3
  File LV Type Ckp SCN    Ckp Time  Name
  ---- -- ---- ---------- --------- ----
  1       Full 1002637    01-APR-14 /u01/app/oracle/oradata/orcl/system01.dbf
  2       Full 1002637    01-APR-14 /u01/app/oracle/oradata/orcl/sysaux01.dbf
  3       Full 1002637    01-APR-14 /u01/app/oracle/oradata/orcl/undotbs01.dbf
  4       Full 1002637    01-APR-14 /u01/app/oracle/oradata/orcl/users01.dbf
  5       Full 1002637    01-APR-14 /u01/app/oracle/oradata/orcl/example01.dbf

BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
4       Full    9.36M      DISK        00:00:05     01-APR-14      
        BP Key: 4   Status: AVAILABLE  Compressed: NO  Tag: TAG20140401T172802
        Piece Name: /u01/app/oracle/flash_recovery_area/ORCL/backupset/2014_04_01/o1_mf_ncsnf_TAG20140401T172802_9mo1s2ky_.bkp
  SPFILE Included: Modification time: 01-APR-14
  SPFILE db_unique_name: ORCL
  Control File Included: Ckp SCN: 1002728      Ckp time: 01-APR-14

BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
5       Full    1.00G      DISK        00:01:37     02-APR-14      
        BP Key: 5   Status: AVAILABLE  Compressed: NO  Tag: TAG20140402T083021
        Piece Name: /u01/app/oracle/flash_recovery_area/ORCL/backupset/2014_04_02/o1_mf_nnndf_TAG20140402T083021_9mppjxh1_.bkp
  List of Datafiles in backup set 5
  File LV Type Ckp SCN    Ckp Time  Name
  ---- -- ---- ---------- --------- ----
  1       Full 1008677    02-APR-14 /u01/app/oracle/oradata/orcl/system01.dbf
  2       Full 1008677    02-APR-14 /u01/app/oracle/oradata/orcl/sysaux01.dbf
  3       Full 1008677    02-APR-14 /u01/app/oracle/oradata/orcl/undotbs01.dbf
  4       Full 1008677    02-APR-14 /u01/app/oracle/oradata/orcl/users01.dbf
  5       Full 1008677    02-APR-14 /u01/app/oracle/oradata/orcl/example01.dbf

BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
6       Full    9.36M      DISK        00:00:02     02-APR-14      
        BP Key: 6   Status: AVAILABLE  Compressed: NO  Tag: TAG20140402T083021
        Piece Name: /u01/app/oracle/flash_recovery_area/ORCL/backupset/2014_04_02/o1_mf_ncsnf_TAG20140402T083021_9mppn7g5_.bkp
  SPFILE Included: Modification time: 02-APR-14
  SPFILE db_unique_name: ORCL
  Control File Included: Ckp SCN: 1008751      Ckp time: 02-APR-14

RMAN> show all;

RMAN configuration parameters for database with db_unique_name ORCL are:
CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 1 DAYS;
CONFIGURE BACKUP OPTIMIZATION OFF; # default
CONFIGURE DEFAULT DEVICE TYPE TO DISK; # default
CONFIGURE CONTROLFILE AUTOBACKUP OFF; # default
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '%F'; # default
CONFIGURE DEVICE TYPE DISK PARALLELISM 1 BACKUP TYPE TO BACKUPSET; # default
CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE MAXSETSIZE TO UNLIMITED; # default
CONFIGURE ENCRYPTION FOR DATABASE OFF; # default
CONFIGURE ENCRYPTION ALGORITHM 'AES128'; # default
CONFIGURE COMPRESSION ALGORITHM 'BASIC' AS OF RELEASE 'DEFAULT' OPTIMIZE FOR LOAD TRUE ; # default
CONFIGURE ARCHIVELOG DELETION POLICY TO NONE; # default
CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/u01/app/oracle/product/11.2.0/dbhome_1/dbs/snapcf_orcl.f'; # default

RMAN> backup database;

Starting backup at 03-APR-14
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=39 device type=DISK
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=00002 name=/u01/app/oracle/oradata/orcl/sysaux01.dbf
input datafile file number=00005 name=/u01/app/oracle/oradata/orcl/example01.dbf
input datafile file number=00003 name=/u01/app/oracle/oradata/orcl/undotbs01.dbf
input datafile file number=00004 name=/u01/app/oracle/oradata/orcl/users01.dbf
channel ORA_DISK_1: starting piece 1 at 03-APR-14
channel ORA_DISK_1: finished piece 1 at 03-APR-14
piece handle=/u01/app/oracle/flash_recovery_area/ORCL/backupset/2014_04_03/o1_mf_nnndf_TAG20140403T085740_9msdjf1h_.bkp tag=TAG20140403T085740 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:02:25
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
including current control file in backup set
including current SPFILE in backup set
channel ORA_DISK_1: starting piece 1 at 03-APR-14
channel ORA_DISK_1: finished piece 1 at 03-APR-14
piece handle=/u01/app/oracle/flash_recovery_area/ORCL/backupset/2014_04_03/o1_mf_ncsnf_TAG20140403T085740_9msdnrft_.bkp tag=TAG20140403T085740 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:03
Finished backup at 03-APR-14

RMAN> list backup;


List of Backup Sets
===================


BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
3       Full    1.05G      DISK        00:02:01     01-APR-14      
        BP Key: 3   Status: AVAILABLE  Compressed: NO  Tag: TAG20140401T172802
        Piece Name: /u01/app/oracle/flash_recovery_area/ORCL/backupset/2014_04_01/o1_mf_nnndf_TAG20140401T172802_9mo1o2g2_.bkp
  List of Datafiles in backup set 3
  File LV Type Ckp SCN    Ckp Time  Name
  ---- -- ---- ---------- --------- ----
  1       Full 1002637    01-APR-14 /u01/app/oracle/oradata/orcl/system01.dbf
  2       Full 1002637    01-APR-14 /u01/app/oracle/oradata/orcl/sysaux01.dbf
  3       Full 1002637    01-APR-14 /u01/app/oracle/oradata/orcl/undotbs01.dbf
  4       Full 1002637    01-APR-14 /u01/app/oracle/oradata/orcl/users01.dbf
  5       Full 1002637    01-APR-14 /u01/app/oracle/oradata/orcl/example01.dbf

BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
4       Full    9.36M      DISK        00:00:05     01-APR-14      
        BP Key: 4   Status: AVAILABLE  Compressed: NO  Tag: TAG20140401T172802
        Piece Name: /u01/app/oracle/flash_recovery_area/ORCL/backupset/2014_04_01/o1_mf_ncsnf_TAG20140401T172802_9mo1s2ky_.bkp
  SPFILE Included: Modification time: 01-APR-14
  SPFILE db_unique_name: ORCL
  Control File Included: Ckp SCN: 1002728      Ckp time: 01-APR-14

BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
5       Full    1.00G      DISK        00:01:37     02-APR-14      
        BP Key: 5   Status: AVAILABLE  Compressed: NO  Tag: TAG20140402T083021
        Piece Name: /u01/app/oracle/flash_recovery_area/ORCL/backupset/2014_04_02/o1_mf_nnndf_TAG20140402T083021_9mppjxh1_.bkp
  List of Datafiles in backup set 5
  File LV Type Ckp SCN    Ckp Time  Name
  ---- -- ---- ---------- --------- ----
  1       Full 1008677    02-APR-14 /u01/app/oracle/oradata/orcl/system01.dbf
  2       Full 1008677    02-APR-14 /u01/app/oracle/oradata/orcl/sysaux01.dbf
  3       Full 1008677    02-APR-14 /u01/app/oracle/oradata/orcl/undotbs01.dbf
  4       Full 1008677    02-APR-14 /u01/app/oracle/oradata/orcl/users01.dbf
  5       Full 1008677    02-APR-14 /u01/app/oracle/oradata/orcl/example01.dbf

BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
6       Full    9.36M      DISK        00:00:02     02-APR-14      
        BP Key: 6   Status: AVAILABLE  Compressed: NO  Tag: TAG20140402T083021
        Piece Name: /u01/app/oracle/flash_recovery_area/ORCL/backupset/2014_04_02/o1_mf_ncsnf_TAG20140402T083021_9mppn7g5_.bkp
  SPFILE Included: Modification time: 02-APR-14
  SPFILE db_unique_name: ORCL
  Control File Included: Ckp SCN: 1008751      Ckp time: 02-APR-14

BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
7       Full    1.01G      DISK        00:02:25     03-APR-14      
        BP Key: 7   Status: AVAILABLE  Compressed: NO  Tag: TAG20140403T085740
        Piece Name: /u01/app/oracle/flash_recovery_area/ORCL/backupset/2014_04_03/o1_mf_nnndf_TAG20140403T085740_9msdjf1h_.bkp
  List of Datafiles in backup set 7
  File LV Type Ckp SCN    Ckp Time  Name
  ---- -- ---- ---------- --------- ----
  1       Full 1010406    03-APR-14 /u01/app/oracle/oradata/orcl/system01.dbf
  2       Full 1010406    03-APR-14 /u01/app/oracle/oradata/orcl/sysaux01.dbf
  3       Full 1010406    03-APR-14 /u01/app/oracle/oradata/orcl/undotbs01.dbf
  4       Full 1010406    03-APR-14 /u01/app/oracle/oradata/orcl/users01.dbf
  5       Full 1010406    03-APR-14 /u01/app/oracle/oradata/orcl/example01.dbf

BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
8       Full    9.36M      DISK        00:00:05     03-APR-14      
        BP Key: 8   Status: AVAILABLE  Compressed: NO  Tag: TAG20140403T085740
        Piece Name: /u01/app/oracle/flash_recovery_area/ORCL/backupset/2014_04_03/o1_mf_ncsnf_TAG20140403T085740_9msdnrft_.bkp
  SPFILE Included: Modification time: 03-APR-14
  SPFILE db_unique_name: ORCL
  Control File Included: Ckp SCN: 1010627      Ckp time: 03-APR-14

RMAN> quit


此时,4月1日的backup集合的情报仍然在此处出现。


******************************************************************

4月4日再进行backup:

[oracle@localhost ~]$ date
Fri Apr  4 09:49:26 CST 2014
[oracle@localhost ~]$ rman target /

Recovery Manager: Release 11.2.0.1.0 - Production on Fri Apr 4 09:49:31 2014

Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.

connected to target database: ORCL (DBID=1369869147)

RMAN> backup database;

Starting backup at 04-APR-14
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=30 device type=DISK
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=00002 name=/u01/app/oracle/oradata/orcl/sysaux01.dbf
input datafile file number=00005 name=/u01/app/oracle/oradata/orcl/example01.dbf
input datafile file number=00003 name=/u01/app/oracle/oradata/orcl/undotbs01.dbf
input datafile file number=00004 name=/u01/app/oracle/oradata/orcl/users01.dbf
channel ORA_DISK_1: starting piece 1 at 04-APR-14
channel ORA_DISK_1: finished piece 1 at 04-APR-14
piece handle=/u01/app/oracle/flash_recovery_area/ORCL/backupset/2014_04_04/o1_mf_nnndf_TAG20140404T094940_9mw3y603_.bkp tag=TAG20140404T094940 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:03:05
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
including current control file in backup set
including current SPFILE in backup set
channel ORA_DISK_1: starting piece 1 at 04-APR-14
channel ORA_DISK_1: finished piece 1 at 04-APR-14
piece handle=/u01/app/oracle/flash_recovery_area/ORCL/backupset/2014_04_04/o1_mf_ncsnf_TAG20140404T094940_9mw43jmo_.bkp tag=TAG20140404T094940 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:07
Finished backup at 04-APR-14

RMAN> list backup;


List of Backup Sets
===================


BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
4       Full    9.36M      DISK        00:00:05     01-APR-14      
        BP Key: 4   Status: AVAILABLE  Compressed: NO  Tag: TAG20140401T172802
        Piece Name: /u01/app/oracle/flash_recovery_area/ORCL/backupset/2014_04_01/o1_mf_ncsnf_TAG20140401T172802_9mo1s2ky_.bkp
  SPFILE Included: Modification time: 01-APR-14
  SPFILE db_unique_name: ORCL
  Control File Included: Ckp SCN: 1002728      Ckp time: 01-APR-14

BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
5       Full    1.00G      DISK        00:01:37     02-APR-14      
        BP Key: 5   Status: AVAILABLE  Compressed: NO  Tag: TAG20140402T083021
        Piece Name: /u01/app/oracle/flash_recovery_area/ORCL/backupset/2014_04_02/o1_mf_nnndf_TAG20140402T083021_9mppjxh1_.bkp
  List of Datafiles in backup set 5
  File LV Type Ckp SCN    Ckp Time  Name
  ---- -- ---- ---------- --------- ----
  1       Full 1008677    02-APR-14 /u01/app/oracle/oradata/orcl/system01.dbf
  2       Full 1008677    02-APR-14 /u01/app/oracle/oradata/orcl/sysaux01.dbf
  3       Full 1008677    02-APR-14 /u01/app/oracle/oradata/orcl/undotbs01.dbf
  4       Full 1008677    02-APR-14 /u01/app/oracle/oradata/orcl/users01.dbf
  5       Full 1008677    02-APR-14 /u01/app/oracle/oradata/orcl/example01.dbf

BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
6       Full    9.36M      DISK        00:00:02     02-APR-14      
        BP Key: 6   Status: AVAILABLE  Compressed: NO  Tag: TAG20140402T083021
        Piece Name: /u01/app/oracle/flash_recovery_area/ORCL/backupset/2014_04_02/o1_mf_ncsnf_TAG20140402T083021_9mppn7g5_.bkp
  SPFILE Included: Modification time: 02-APR-14
  SPFILE db_unique_name: ORCL
  Control File Included: Ckp SCN: 1008751      Ckp time: 02-APR-14

BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
7       Full    1.01G      DISK        00:02:25     03-APR-14      
        BP Key: 7   Status: AVAILABLE  Compressed: NO  Tag: TAG20140403T085740
        Piece Name: /u01/app/oracle/flash_recovery_area/ORCL/backupset/2014_04_03/o1_mf_nnndf_TAG20140403T085740_9msdjf1h_.bkp
  List of Datafiles in backup set 7
  File LV Type Ckp SCN    Ckp Time  Name
  ---- -- ---- ---------- --------- ----
  1       Full 1010406    03-APR-14 /u01/app/oracle/oradata/orcl/system01.dbf
  2       Full 1010406    03-APR-14 /u01/app/oracle/oradata/orcl/sysaux01.dbf
  3       Full 1010406    03-APR-14 /u01/app/oracle/oradata/orcl/undotbs01.dbf
  4       Full 1010406    03-APR-14 /u01/app/oracle/oradata/orcl/users01.dbf
  5       Full 1010406    03-APR-14 /u01/app/oracle/oradata/orcl/example01.dbf

BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
8       Full    9.36M      DISK        00:00:05     03-APR-14      
        BP Key: 8   Status: AVAILABLE  Compressed: NO  Tag: TAG20140403T085740
        Piece Name: /u01/app/oracle/flash_recovery_area/ORCL/backupset/2014_04_03/o1_mf_ncsnf_TAG20140403T085740_9msdnrft_.bkp
  SPFILE Included: Modification time: 03-APR-14
  SPFILE db_unique_name: ORCL
  Control File Included: Ckp SCN: 1010627      Ckp time: 03-APR-14

BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
9       Full    1.01G      DISK        00:02:58     04-APR-14      
        BP Key: 9   Status: AVAILABLE  Compressed: NO  Tag: TAG20140404T094940
        Piece Name: /u01/app/oracle/flash_recovery_area/ORCL/backupset/2014_04_04/o1_mf_nnndf_TAG20140404T094940_9mw3y603_.bkp
  List of Datafiles in backup set 9
  File LV Type Ckp SCN    Ckp Time  Name
  ---- -- ---- ---------- --------- ----
  1       Full 1013694    04-APR-14 /u01/app/oracle/oradata/orcl/system01.dbf
  2       Full 1013694    04-APR-14 /u01/app/oracle/oradata/orcl/sysaux01.dbf
  3       Full 1013694    04-APR-14 /u01/app/oracle/oradata/orcl/undotbs01.dbf
  4       Full 1013694    04-APR-14 /u01/app/oracle/oradata/orcl/users01.dbf
  5       Full 1013694    04-APR-14 /u01/app/oracle/oradata/orcl/example01.dbf

BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
10      Full    9.36M      DISK        00:00:08     04-APR-14      
        BP Key: 10   Status: AVAILABLE  Compressed: NO  Tag: TAG20140404T094940
        Piece Name: /u01/app/oracle/flash_recovery_area/ORCL/backupset/2014_04_04/o1_mf_ncsnf_TAG20140404T094940_9mw43jmo_.bkp
  SPFILE Included: Modification time: 04-APR-14
  SPFILE db_unique_name: ORCL
  Control File Included: Ckp SCN: 1014440      Ckp time: 04-APR-14

RMAN> 

可以看到,4月1日的文件虽然还有,但和之前相比,已经从2个减少到1个。

上述试验说明,control_file_record_keep_time 虽然进行了设定,也并不是就马上把超过窗口期的数据清除的。






本文转自健哥的数据花园博客园博客,原文链接:http://www.cnblogs.com/gaojian/p/3645444.html,如需转载请自行联系原作者

目录
相关文章
|
2月前
|
分布式计算 Java 大数据
大数据-122 - Flink Time Watermark Java代码测试实现Tumbling Window
大数据-122 - Flink Time Watermark Java代码测试实现Tumbling Window
42 0
|
测试技术
软件测试面试题:什么是Think Time?你如何改变这个阈值?
软件测试面试题:什么是Think Time?你如何改变这个阈值?
153 0
|
Oracle 关系型数据库 数据库
|
Oracle 关系型数据库 测试技术
|
监控 Oracle 关系型数据库
RMAN备份与恢复(新旧控制文件及归档日志)测试
(我的实验) 一直知道我们公司使用的backup format='G:\20090607rman\datafile\data_%s_%p_%T_%t.bak'database plus archivelog  delete all inputformat 'G:\20090607rman\archivelog\arc_%s_%p_%T_%t.bak';来进行备份的,当然是LINUX系统,但是由于在家中没有LINUX环境,就改用WINDOWS环境来做,理论是一样的。
933 0
|
SQL 监控 测试技术
RMAN备份与恢复(新旧控制文件及归档日志)测试(叙)
(我的学习过程) 继上一次做的试验,过后我又思考了下,当然其中的4点结论没有问题,但是却忽略了一点,上次的试验证明了在不使用恢复目录的情况下,做恢复时使用的归档重做日志文件只能是在控制文件中有记录的,backup format "${BACKUP_DB_TAR...
827 0
|
1月前
|
JSON Java 测试技术
SpringCloud2023实战之接口服务测试工具SpringBootTest
SpringBootTest同时集成了JUnit Jupiter、AssertJ、Hamcrest测试辅助库,使得更容易编写但愿测试代码。
60 3
|
2月前
|
JSON 算法 数据可视化
测试专项笔记(一): 通过算法能力接口返回的检测结果完成相关指标的计算(目标检测)
这篇文章是关于如何通过算法接口返回的目标检测结果来计算性能指标的笔记。它涵盖了任务描述、指标分析(包括TP、FP、FN、TN、精准率和召回率),接口处理,数据集处理,以及如何使用实用工具进行文件操作和数据可视化。文章还提供了一些Python代码示例,用于处理图像文件、转换数据格式以及计算目标检测的性能指标。
73 0
测试专项笔记(一): 通过算法能力接口返回的检测结果完成相关指标的计算(目标检测)
|
3月前
|
移动开发 JSON Java
Jmeter实现WebSocket协议的接口测试方法
WebSocket协议是HTML5的一种新协议,实现了浏览器与服务器之间的全双工通信。通过简单的握手动作,双方可直接传输数据。其优势包括极小的头部开销和服务器推送功能。使用JMeter进行WebSocket接口和性能测试时,需安装特定插件并配置相关参数,如服务器地址、端口号等,还可通过CSV文件实现参数化,以满足不同测试需求。
259 7
Jmeter实现WebSocket协议的接口测试方法