[Oracle] rman configure基础参数配置


本文总阅读量

1、rman默认配置参数

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 3 DAYS;
CONFIGURE BACKUP OPTIMIZATION ON;
CONFIGURE DEFAULT DEVICE TYPE TO DISK; # default
CONFIGURE CONTROLFILE AUTOBACKUP ON; # default
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE SBT_TAPE TO '%F'; # default
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '%F'; # default
CONFIGURE DEVICE TYPE 'SBT_TAPE' PARALLELISM 2 BACKUP TYPE TO COMPRESSED BACKUPSET;
CONFIGURE DEVICE TYPE DISK PARALLELISM 1 BACKUP TYPE TO BACKUPSET; # default
CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE SBT_TAPE TO 1; # default
CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE SBT_TAPE TO 1; # default
CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE CHANNEL DEVICE TYPE 'SBT_TAPE' PARMS 'ENV=(OB_DEVICE=tape1)';
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 RMAN OUTPUT TO KEEP FOR 7 DAYS; # default
CONFIGURE ARCHIVELOG DELETION POLICY TO NONE; # default
CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/disk1/oracle/dbs/snapcf_ev.f'; # default

2、show命令查看

1
2
3
show all;查看所有配置
show retention policy;查看保留策略
show default device type;查看默认设备类型

3、恢复修改后的策略为默认策略configure……clear

1
2
3
CONFIGURE backup optimization clear;修改备份优化策略为默认(默认为off)
CONFIGURE RETENTION POLICY CLEAR;修改保留策略默认为保留一天
CONFIGURE CONTROFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK CLEAR;

4、配置默认备份设备类型

1
2
3
4
5
CONFIGURE DEFAULT DEVICE TYPE TO DISK; # default
CONFIGURE DEFAULT DEVICE TYPE TO SBT;指定备份设备为system backup tape
也可以使用backup命令覆盖默认的configure配置参数
BACKUP DEVICE TYPE sbt DATABASE;
BACKUP DEVICE TYPE DISK DATABASE;

5、配置默认的备份类型

1
2
3
4
5
6
copy备份形式只能用于disk备份设备类型
sbt的备份设备类型只用用backup set备份形式
CONFIGURE DEVICE TYPE DISK BACKUP TYPE TO COPY; # image copies不能压缩
CONFIGURE DEVICE TYPE DISK BACKUP TYPE TO BACKUPSET; # uncompressed(默认)
CONFIGURE DEVICE TYPE DISK BACKUP TYPE TO COMPRESSED BACKUPSET;(压缩备份到disk)
CONFIGURE DEVICE TYPE sbt BACKUP TYPE TO COMPRESSED BACKUPSET;(压缩备份到sbt)

6、配置通道

对于tape备份,每盘磁带分配一个通道。对于磁盘备份,每块物理磁盘分配一个通道,除非你可以优化磁盘子系统多通道架构。错误的通道数量会影响在io操作方面rman的性能。
默认情况下并行为1
CONFIGURE DEVICE TYPE DISK PARALLELISM 1 BACKUP TYPE TO COMPRESSED BACKUPSET;
如果不指定任何channel直接备份,系统会自动分配一个通道,例如ora_disk_1

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
RMAN> backup as compressed backupset full database format '/tmp/backuporacle/db_%d_%T_%U';
Starting backup at 2019:04:12 21:29:57
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=397 device type=DISK
channel ORA_DISK_1: starting compressed full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00002 name=/data/u01/app/oracle/oradata/boston/sysaux01.dbf
......
input datafile file number=00003 name=/data/u01/app/oracle/oradata/boston/undotbs01.dbf
channel ORA_DISK_1: starting piece 1 at 2019:04:12 21:29:57
channel ORA_DISK_1: finished piece 1 at 2019:04:12 21:31:02
piece handle=/tmp/backuporacle/db_BOSTON_20190412_cstur72l_1_1 tag=TAG20190412T212957 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:01:05
channel ORA_DISK_1: starting compressed 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 2019:04:12 21:31:05
channel ORA_DISK_1: finished piece 1 at 2019:04:12 21:31:06
piece handle=/tmp/backuporacle/db_BOSTON_20190412_cttur74m_1_1 tag=TAG20190412T212957 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
Finished backup at 2019:04:12 21:31:06

如果自己指定分配通道,默认的PARALLELISM会被覆盖掉

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
rman > run{
allocate channel c1 device type disk;
allocate channel c2 device type disk;
backup as compressed backupset full database format '/tmp/backuporacle/db_%d_%T_%U';
release channel c1;
release channel c2;
}

allocated channel: c1
channel c1: SID=10 device type=DISK
allocated channel: c2
channel c2: SID=203 device type=DISK
Starting backup at 2019:04:12 22:26:40
channel c1: starting compressed full datafile backup set
channel c1: specifying datafile(s) in backup set
input datafile file number=00002 name=/data/u01/app/oracle/oradata/boston/sysaux01.dbf
input datafile file number=00003 name=/data/u01/app/oracle/oradata/boston/undotbs01.dbf
channel c1: starting piece 1 at 2019:04:12 22:26:41
channel c2: starting compressed full datafile backup set
channel c2: specifying datafile(s) in backup set
input datafile file number=00001 name=/data/u01/app/oracle/oradata/boston/system01.dbf
input datafile file number=00004 name=/data/u01/app/oracle/oradata/boston/users01.dbf
input datafile file number=00005 name=/data/u01/app/oracle/oradata/boston/test001.dbf
channel c2: starting piece 1 at 2019:04:12 22:26:41
channel c2: finished piece 1 at 2019:04:12 22:27:06
piece handle=/tmp/backuporacle/db_BOSTON_20190412_d3turad1_1_1 tag=TAG20190412T222640 comment=NONE
channel c2: backup set complete, elapsed time: 00:00:25
channel c2: starting compressed full datafile backup set
channel c2: specifying datafile(s) in backup set
including current control file in backup set
channel c2: starting piece 1 at 2019:04:12 22:27:09
channel c2: finished piece 1 at 2019:04:12 22:27:10
piece handle=/tmp/backuporacle/db_BOSTON_20190412_d4turadq_1_1 tag=TAG20190412T222640 comment=NONE
channel c2: backup set complete, elapsed time: 00:00:01
channel c2: starting compressed full datafile backup set
channel c2: specifying datafile(s) in backup set
including current SPFILE in backup set
channel c2: starting piece 1 at 2019:04:12 22:27:10
channel c2: finished piece 1 at 2019:04:12 22:27:11
piece handle=/tmp/backuporacle/db_BOSTON_20190412_d5turadu_1_1 tag=TAG20190412T222640 comment=NONE
channel c2: backup set complete, elapsed time: 00:00:01
channel c1: finished piece 1 at 2019:04:12 22:27:25
piece handle=/tmp/backuporacle/db_BOSTON_20190412_d2turad1_1_1 tag=TAG20190412T222640 comment=NONE
channel c1: backup set complete, elapsed time: 00:00:44
Finished backup at 2019:04:12 22:27:25
released channel: c1
released channel: c2

分配通道时可以指定多个路径

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
RMAN> run{
2> allocate channel c1 device type disk format '/tmp/oracle1/db_%d_%T_%U';
3> allocate channel c2 device type disk format '/tmp/oracle2/db_%d_%T_%U';
4> backup as compressed backupset full database;
5> release channel c1;
6> release channel c2;
7> }
allocated channel: c1
channel c1: SID=10 device type=DISK
allocated channel: c2
channel c2: SID=203 device type=DISK
Starting backup at 2019:04:12 22:35:16
channel c1: starting compressed full datafile backup set
channel c1: specifying datafile(s) in backup set
input datafile file number=00002 name=/data/u01/app/oracle/oradata/boston/sysaux01.dbf
input datafile file number=00003 name=/data/u01/app/oracle/oradata/boston/undotbs01.dbf
channel c1: starting piece 1 at 2019:04:12 22:35:17
channel c2: starting compressed full datafile backup set
channel c2: specifying datafile(s) in backup set
input datafile file number=00001 name=/data/u01/app/oracle/oradata/boston/system01.dbf
input datafile file number=00004 name=/data/u01/app/oracle/oradata/boston/users01.dbf
input datafile file number=00005 name=/data/u01/app/oracle/oradata/boston/test001.dbf
channel c2: starting piece 1 at 2019:04:12 22:35:17
channel c2: finished piece 1 at 2019:04:12 22:35:42
piece handle=/tmp/oracle2/db_BOSTON_20190412_d7turat5_1_1 tag=TAG20190412T223516 comment=NONE
channel c2: backup set complete, elapsed time: 00:00:25
channel c2: starting compressed full datafile backup set
channel c2: specifying datafile(s) in backup set
including current control file in backup set
channel c2: starting piece 1 at 2019:04:12 22:35:45
channel c2: finished piece 1 at 2019:04:12 22:35:46
piece handle=/tmp/oracle2/db_BOSTON_20190412_d8turatu_1_1 tag=TAG20190412T223516 comment=NONE
channel c2: backup set complete, elapsed time: 00:00:01
channel c2: starting compressed full datafile backup set
channel c2: specifying datafile(s) in backup set
including current SPFILE in backup set
channel c2: starting piece 1 at 2019:04:12 22:35:46
channel c2: finished piece 1 at 2019:04:12 22:35:47
piece handle=/tmp/oracle2/db_BOSTON_20190412_d9turau2_1_1 tag=TAG20190412T223516 comment=NONE
channel c2: backup set complete, elapsed time: 00:00:01
channel c1: finished piece 1 at 2019:04:12 22:35:53
piece handle=/tmp/oracle1/db_BOSTON_20190412_d6turat5_1_1 tag=TAG20190412T223516 comment=NONE
channel c1: backup set complete, elapsed time: 00:00:36
Finished backup at 2019:04:12 22:35:53
released channel: c1
released channel: c2

在oracle1和oracle2的路径下存放了备份的所有文件,如果放到不同物理磁盘可以提升备份效率

1
2
3
4
5
6
bash > ls oracle1/ oracle2/
oracle1/:
db_BOSTON_20190412_d6turat5_1_1

oracle2/:
db_BOSTON_20190412_d7turat5_1_1 db_BOSTON_20190412_d8turatu_1_1 db_BOSTON_20190412_d9turau2_1_1

也可以在configure下面配置好多个路径

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
CONFIGURE DEVICE TYPE DISK PARALLELISM 3;
CONFIGURE DEFAULT DEVICE TYPE TO DISK;
CONFIGURE CHANNEL 1 DEVICE TYPE DISK FORMAT '/tmp/oracle1/%U';
CONFIGURE CHANNEL 2 DEVICE TYPE DISK FORMAT '/tmp/oracle2/%U';
CONFIGURE CHANNEL 3 DEVICE TYPE DISK FORMAT '/tmp/oracle3/%U';
BACKUP AS COPY DATABASE;

RMAN> BACKUP AS COPY DATABASE;
Starting backup at 2019:04:12 22:43:26
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=10 device type=DISK
allocated channel: ORA_DISK_2
channel ORA_DISK_2: SID=203 device type=DISK
allocated channel: ORA_DISK_3
channel ORA_DISK_3: SID=396 device type=DISK
channel ORA_DISK_1: starting datafile copy
input datafile file number=00002 name=/data/u01/app/oracle/oradata/boston/sysaux01.dbf
channel ORA_DISK_2: starting datafile copy
input datafile file number=00001 name=/data/u01/app/oracle/oradata/boston/system01.dbf
channel ORA_DISK_3: starting datafile copy
input datafile file number=00004 name=/data/u01/app/oracle/oradata/boston/users01.dbf
output file name=/tmp/oracle2/data_D-BOSTON_I-2681136947_TS-SYSTEM_FNO-1_dbturbcf tag=TAG20190412T224326 RECID=20 STAMP=1005432219
channel ORA_DISK_2: datafile copy complete, elapsed time: 00:00:15
channel ORA_DISK_2: starting datafile copy
input datafile file number=00005 name=/data/u01/app/oracle/oradata/boston/test001.dbf
output file name=/tmp/oracle3/data_D-BOSTON_I-2681136947_TS-USERS_FNO-4_dcturbcf tag=TAG20190412T224326 RECID=19 STAMP=1005432216
channel ORA_DISK_3: datafile copy complete, elapsed time: 00:00:20
channel ORA_DISK_3: starting datafile copy
input datafile file number=00003 name=/data/u01/app/oracle/oradata/boston/undotbs01.dbf
output file name=/tmp/oracle1/data_D-BOSTON_I-2681136947_TS-SYSAUX_FNO-2_daturbce tag=TAG20190412T224326 RECID=21 STAMP=1005432227
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:21
channel ORA_DISK_1: starting datafile copy
copying current control file
output file name=/tmp/oracle2/data_D-BOSTON_I-2681136947_TS-TEST_FNO-5_ddturbd3 tag=TAG20190412T224326 RECID=22 STAMP=1005432229
channel ORA_DISK_2: datafile copy complete, elapsed time: 00:00:04
channel ORA_DISK_2: starting full datafile backup set
channel ORA_DISK_2: specifying datafile(s) in backup set
including current SPFILE in backup set
channel ORA_DISK_2: starting piece 1 at 2019:04:12 22:43:51
output file name=/tmp/oracle3/data_D-BOSTON_I-2681136947_TS-UNDOTBS1_FNO-3_deturbd3 tag=TAG20190412T224326 RECID=23 STAMP=1005432230
channel ORA_DISK_3: datafile copy complete, elapsed time: 00:00:04
output file name=/tmp/oracle1/cf_D-BOSTON_id-2681136947_dfturbd4 tag=TAG20190412T224326 RECID=24 STAMP=1005432231
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:04
channel ORA_DISK_2: finished piece 1 at 2019:04:12 22:43:52
piece handle=/tmp/oracle2/dgturbd7_1_1 tag=TAG20190412T224326 comment=NONE
channel ORA_DISK_2: backup set complete, elapsed time: 00:00:01
Finished backup at 2019:04:12 22:43:52

在oracle1、oracle2、oracle3路径下存储这备份的所有文件:

1
2
3
4
5
6
7
8
9
[oracle@dax-mysql-slave tmp]$ ls oracle1/ oracle2/ oracle3/
oracle1/:
cf_D-BOSTON_id-2681136947_dfturbd4 data_D-BOSTON_I-2681136947_TS-SYSAUX_FNO-2_daturbce

oracle2/:
data_D-BOSTON_I-2681136947_TS-SYSTEM_FNO-1_dbturbcf data_D-BOSTON_I-2681136947_TS-TEST_FNO-5_ddturbd3 dgturbd7_1_1

oracle3/:
data_D-BOSTON_I-2681136947_TS-UNDOTBS1_FNO-3_deturbd3 data_D-BOSTON_I-2681136947_TS-USERS_FNO-4_dcturbcf

恢复配置至默认
CONFIGURE CHANNEL DEVICE TYPE DISK clear;

7、控制文件自动备份

CONFIGURE CONTROLFILE AUTOBACKUP ON;(开启自动备份,默认为off)
CONFIGURE CONTROLFILE AUTOBACKUP OFF;
指定备份的路径
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '/tmp/oracle/cf_%F';
备份数据时,会自动备份控制文件和数据库参数文件

1
2
3
4
5
RMAN> BACKUP AS COPY DATABASE;
......
Starting Control File and SPFILE Autobackup at 2019:04:12 23:58:10
piece handle=/tmp/oracle/cf_c-2681136947-20190412-00 comment=NONE
Finished Control File and SPFILE Autobackup at 2019:04:12 23:58:17

清空自动备份控制文件参数
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK CLEAR;
在run下面使用set controlfile autobackup format命令,可以覆盖掉configure下面的配置信息

1
2
3
4
5
6
7
8
9
10
RMAN> RUN
2> {
3> SET CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '/tmp/oracle/cf_%F.bck';
4> BACKUP AS BACKUPSET DEVICE TYPE DISK DATABASE;
5> }
executing command: SET CONTROLFILE AUTOBACKUP FORMAT
......
Starting Control File and SPFILE Autobackup at 2019:04:13 00:07:28
piece handle=/tmp/oracle/cf_c-2681136947-20190413-00.bck comment=NONE
Finished Control File and SPFILE Autobackup at 2019:04:13 00:07:31

8、配置备份保留策略

配置基于冗余的保留策略(冗余3份)
CONFIGURE RETENTION POLICY TO REDUNDANCY 3;
配置基于时间窗口的保留策略(保留7天)
CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 7 DAYS;
禁用保留策略
CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 7 DAYS;

9、备份优化

CONFIGURE BACKUP OPTIMIZATION ON;(启动备份优化策略,默认为off)
开启备份优化策略,rman根据备份策略和备份双工特性在算法中的因素,来判断是否有足够的备份在rman指定的备份设备上,以此来决定是否对同一文件是否备份。

备份时想要覆盖优化策略可以使用FORCE选项:

1
2
BACKUP DATABASE FORCE;
BACKUP ARCHIVELOG ALL FORCE;

10、配置归档之日删除策略

备份两次的归档日志可以被删除:
CONFIGURE ARCHIVELOG DELETION POLICY TO BACKED UP 2 TIMES TO DISK;
该删除策略的意义是:每份归档日志只会备份两次,哪怕执行多次备份,已经满足2次备份的归档也不会备份。执行备份的时候不会自动删除已经满足删除策略的归档,需要使用delete archivelog all才行。且不满足两次的备份时不会被删除的。

1
2
3
4
5
6
7
8
9
10
11
20:07:02 SYS@ boston> select recid, sequence#, archived, deleted, backup_count from v$archived_log where deleted='NO';

RECID SEQUENCE# ARC DEL BACKUP_COUNT
---------- ---------- --- --- ------------
294 491 YES NO 2
295 492 YES NO 2
296 493 YES NO 2
297 494 YES NO 2
298 495 YES NO 2
299 496 YES NO 1
300 497 YES NO 1

执行删除策略

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
RMAN> delete archivelog all;
......
RMAN-08138: WARNING: archived log not deleted - must create more backups
archived log file name=/data/u01/app/oracle/fast_recovery_area/BOSTON/archivelog/2019_04_13/o1_mf_1_496_gc3n6kxk_.arc thread=1 sequence=496
RMAN-08138: WARNING: archived log not deleted - must create more backups
archived log file name=/data/u01/app/oracle/fast_recovery_area/BOSTON/archivelog/2019_04_13/o1_mf_1_497_gc3n7sfh_.arc thread=1 sequence=497
List of Archived Log Copies for database with db_unique_name BOSTON
=====================================================================

Key Thrd Seq S Low Time
------- ---- ------- - -------------------
294 1 491 A 2019:04:13 19:26:37
Name: /data/u01/app/oracle/fast_recovery_area/BOSTON/archivelog/2019_04_13/o1_mf_1_491_gc3lq5ss_.arc

295 1 492 A 2019:04:13 19:41:25
Name: /data/u01/app/oracle/fast_recovery_area/BOSTON/archivelog/2019_04_13/o1_mf_1_492_gc3lq7m5_.arc

296 1 493 A 2019:04:13 19:41:27
Name: /data/u01/app/oracle/fast_recovery_area/BOSTON/archivelog/2019_04_13/o1_mf_1_493_gc3lrkc7_.arc

297 1 494 A 2019:04:13 19:42:08
Name: /data/u01/app/oracle/fast_recovery_area/BOSTON/archivelog/2019_04_13/o1_mf_1_494_gc3ltyl3_.arc

298 1 495 A 2019:04:13 19:43:26
Name: /data/u01/app/oracle/fast_recovery_area/BOSTON/archivelog/2019_04_13/o1_mf_1_495_gc3lwk6g_.arc
......
Deleted 5 objects

根据提示备份满足两次的可以删除,299和300需要更多的备份才能被删除。
删除完之后,查看没有被删除的归档:

1
2
3
4
5
6
20:07:36 SYS@ boston> select recid, sequence#, archived, deleted, backup_count from v$archived_log where deleted='NO';

RECID SEQUENCE# ARC DEL BACKUP_COUNT
---------- ---------- --- --- ------------
299 496 YES NO 1
300 497 YES NO 1

执行一次归档日志备份:

RMAN> backup archivelog all format '/tmp/backuporacle/arch_%d_%T_%s_%p.bak';
查看归档日志信息:

1
2
3
4
5
6
7
20:08:05 SYS@ boston> select recid, sequence#, archived, deleted, backup_count from v$archived_log where deleted='NO';

RECID SEQUENCE# ARC DEL BACKUP_COUNT
---------- ---------- --- --- ------------
299 496 YES NO 2
300 497 YES NO 2
301 498 YES NO 1

再次执行一次备份
RMAN> backup archivelog all format '/tmp/backuporacle/arch_%d_%T_%s_%p.bak';
查看归档日志信息:

1
2
3
4
5
6
7
8
20:10:38 SYS@ boston> select recid, sequence#, archived, deleted, backup_count from v$archived_log where deleted='NO';

RECID SEQUENCE# ARC DEL BACKUP_COUNT
---------- ---------- --- --- ------------
299 496 YES NO 2
300 497 YES NO 2
301 498 YES NO 2
302 499 YES NO 1

发现299、300只备份了两次,没有被多次备份。
再次删除归档

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
RMAN> delete archivelog all;
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=580 device type=DISK
allocated channel: ORA_DISK_2
channel ORA_DISK_2: SID=11 device type=DISK
allocated channel: ORA_DISK_3
channel ORA_DISK_3: SID=199 device type=DISK
RMAN-08138: WARNING: archived log not deleted - must create more backups
archived log file name=/data/u01/app/oracle/fast_recovery_area/BOSTON/archivelog/2019_04_13/o1_mf_1_499_gc3nfwjg_.arc thread=1 sequence=499
List of Archived Log Copies for database with db_unique_name BOSTON
=====================================================================

Key Thrd Seq S Low Time
------- ---- ------- - -------------------
299 1 496 A 2019:04:13 19:44:16
Name: /data/u01/app/oracle/fast_recovery_area/BOSTON/archivelog/2019_04_13/o1_mf_1_496_gc3n6kxk_.arc

300 1 497 A 2019:04:13 20:06:41
Name: /data/u01/app/oracle/fast_recovery_area/BOSTON/archivelog/2019_04_13/o1_mf_1_497_gc3n7sfh_.arc

301 1 498 A 2019:04:13 20:07:20
Name: /data/u01/app/oracle/fast_recovery_area/BOSTON/archivelog/2019_04_13/o1_mf_1_498_gc3nfgb6_.arc


Do you really want to delete the above objects (enter YES or NO)? yes
deleted archived log
archived log file name=/data/u01/app/oracle/fast_recovery_area/BOSTON/archivelog/2019_04_13/o1_mf_1_496_gc3n6kxk_.arc RECID=299 STAMP=1005509202
deleted archived log
archived log file name=/data/u01/app/oracle/fast_recovery_area/BOSTON/archivelog/2019_04_13/o1_mf_1_497_gc3n7sfh_.arc RECID=300 STAMP=1005509241
deleted archived log
archived log file name=/data/u01/app/oracle/fast_recovery_area/BOSTON/archivelog/2019_04_13/o1_mf_1_498_gc3nfgb6_.arc RECID=301 STAMP=1005509422
Deleted 3 objects

备份超过两次的归档被删除,如果想要强制删除,不使用删除策略,使用delete force archivelog all;

1
2
3
4
5
6
7
8
9
10
11
12
13
14
RMAN> delete force archivelog all;
List of Archived Log Copies for database with db_unique_name BOSTON
=====================================================================

Key Thrd Seq S Low Time
------- ---- ------- - -------------------
302 1 499 A 2019:04:13 20:10:21
Name: /data/u01/app/oracle/fast_recovery_area/BOSTON/archivelog/2019_04_13/o1_mf_1_499_gc3nfwjg_.arc


Do you really want to delete the above objects (enter YES or NO)? yes
deleted archived log
archived log file name=/data/u01/app/oracle/fast_recovery_area/BOSTON/archivelog/2019_04_13/o1_mf_1_499_gc3nfwjg_.arc RECID=302 STAMP=1005509436
Deleted 1 objects

11、查看关于rman的高级配置参数,点击此处

目录
  1. 1. 1、rman默认配置参数
  2. 2. 2、show命令查看
  3. 3. 3、恢复修改后的策略为默认策略configure……clear
  4. 4. 4、配置默认备份设备类型
  5. 5. 5、配置默认的备份类型
  6. 6. 6、配置通道
  7. 7. 7、控制文件自动备份
  8. 8. 8、配置备份保留策略
  9. 9. 9、备份优化
  10. 10. 10、配置归档之日删除策略
  11. 11. 11、查看关于rman的高级配置参数,点击此处

Proudly powered by Hexo and Theme by Lap
本站访客数人次
© 2020 zeven0707's blog