OS:
Oracle Linux Server release 5.7
DB:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 -
64bit Production
查看rman是否开启自动备份控制文件
RMAN> show all;
RMAN configuration parameters for database with db_unique_name YOON are:
CONFIGURE RETENTION POLICY TO REDUNDANCY 1; # default
CONFIGURE BACKUP OPTIMIZATION OFF; # default
CONFIGURE DEFAULT DEVICE TYPE TO DISK; # default
CONFIGURE CONTROLFILE AUTOBACKUP ON;
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/oracle/product/11.2.0/db_1/dbs/snapcf_yoon.f'; # default
测试:
SQL> archive log list;
Database log mode Archive Mode
Automatic archival Enabled
Archive destination USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence 290
Next log sequence to archive 292
Current log sequence 292
SQL> create tablespace yoon datafile '/u01/oracle/oradata/yoon/yoon.dbf' size 10m;
Tablespace created.
RMAN> list backup of controlfile;
specification does not match any backup in the repository
[root@b28-122 2013_11_07]# ls -ltr
total 0
过了几分钟以后:
RMAN> list backup of controlfile;
List of Backup Sets
===================
BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
5 Full 9.52M DISK 00:00:00 07-NOV-13
BP Key: 5 Status: AVAILABLE Compressed: NO Tag: TAG20131107T015306
Piece Name: /u01/oracle/fast_recovery_area/YOON/autobackup/2013_11_07/o1_mf_s_830829186_97pg6lld_.bkp
Control File Included: Ckp SCN: 4186677 Ckp time: 07-NOV-13
[root@b28-122 2013_11_07]# ls -ltr
total 9776
-rw-r----- 1 oracle oinstall 9994240 Nov 7 01:53 o1_mf_s_830829186_97pg6lld_.bkp
oracle后台进程m000的trace文件记录了备份信息,alter不在记录
[root@b28-122 trace]# more yoon_m000_4288.trc
Trace file /u01/oracle/diag/rdbms/yoon/yoon/trace/yoon_m000_4288.trc
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
ORACLE_HOME = /u01/oracle/product/11.2.0/db_1
System name: Linux
Node name: b28-122.jd.com
Release: 2.6.32-200.13.1.el5uek
Version: #1 SMP Wed Jul 27 21:02:33 EDT 2011
Machine: x86_64
Instance name: yoon
Redo thread mounted by this instance: 1
Oracle process number: 45
Unix process pid: 4288, image: oracle@b28-122.jd.com (M000)
*** 2013-11-07 01:53:06.398
*** SESSION ID:(40.529) 2013-11-07 01:53:06.398
*** CLIENT ID:() 2013-11-07 01:53:06.398
*** SERVICE NAME:(SYS$BACKGROUND) 2013-11-07 01:53:06.398
*** MODULE NAME:(MMON_SLAVE) 2013-11-07 01:53:06.398
*** ACTION NAME:(Autobackup Control File) 2013-11-07 01:53:06.398
Starting control autobackup
Control autobackup written to DISK device
handle '/u01/oracle/fast_recovery_area/YOON/autobackup/2013_11_07/o1_mf_s_830829186_97pg6lld_.bkp'
oracle通过隐含参数controlfile_autobackup_delay来控制,默认是300秒