基于时间的备份保留策略的rman研究


1 实验准备

a)物理和逻辑上检查

  1. SQL> col file_name for a70 wrapped 
  2. SQL> select file_name,status from dba_data_files where file_id=4; 
  3.  
  4. FILE_NAME                                                              STATUS 
  5. ---------------------------------------------------------------------- ---------  
  6. /u01/app/Oracle/oradata/ORCL/datafile/o1_mf_users_7wvsw7hg_.dbf        AVAILABLE 
  7.  
  8. SQL> select tablespace_name,status from dba_tablespaces where tablespace_name='USERS'
  9.  
  10. TABLESPACE_NAME                STATUS 
  11. ------------------------------ ---------  
  12. USERS                          ONLINE 

b)large_pool

  1. SQL> select * from v$sgastat where pool like '%large%'
  2.  
  3. POOL         NAME                            BYTES 
  4. ------------ -------------------------- ----------  
  5. large pool   PX msg pool                    902160 
  6. large pool   free memory                   3292144 

c)NLS_DATE_FORMAT

  1. >vim .bash_profile 
  2. >export NLS_DATE_FORMAT='YYYY-MM-DD:HH24:MI:SS' 
  3. >. .bash_profile 

d)control_file_record_keep_time

  1. SQL> show parameter control_ 
  2.  
  3. NAME                                 TYPE        VALUE 
  4. ------------------------------------ ----------- ------------------------------  
  5. control_file_record_keep_time        integer     7 

e)清空环境

  1. RMAN> list backup; 
  2.  
  3.  
  4. RMAN> list copy; 
  5.  
  6. specification does not match any archive log in the recovery catalog 

f)配置时间窗口为1 days

  1. RMAN> CONFIGURE RETENTION POLICY TO recovery window of 1 days; 
  2.  
  3. new RMAN configuration parameters: 
  4. CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 1 DAYS; 
  5. new RMAN configuration parameters are successfully stored 
  6.  
  7. RMAN> show all
  8.  
  9. RMAN configuration parameters are: 
  10. CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 1 DAYS; 
  11. ...... 
  • 1
  • 2
  • 3
  • 4
  • 下一页

相关内容