FRA中 keep的backup set 不保险

Applies to:

Oracle Database - Enterprise Edition - Version 10.2.0.1 to 11.2.0.3 [Release 10.2 to 11.2]

Information in this document applies to any platform.

Goal

When I try to 'change...keep' a backupset in the FRA, I get error ORA-19811, how can I KEEP a backup written to the Flash Recovery Area (FRA)?

RESEARCH

=========

OERR ORA-19811 cannot have files in DB_RECOVERY_FILE_DEST with keep attribute
Note.305817.1 FAQ - Flash Recovery Area feature of 10G
Note 315098.1 How is the space pressure managed in the Flash Recovery Area - Example.

Solution

ANSWER

=======

As the space management of the FRA is automatic, you cannot KEEP a backupset created in the FRA.

A backup needed to be KEPT, must be created outside the flash recovery area. There are several ways of accomplishing this:

  1. When performing the backup, use FORMAT along with the backup command to place the backupsets to a location other than default (which would be the FRA).

  2. Copy the desired backups in another location. If restore of these backups is ever required, and the RMAN meta data has aged out, then 'catalog backuppiece' and restore the backup. Note, this is a new Oracle10g option.

3, Once the backupset deleted from the FRA, due to space management, the backup can then be KEPT using the 'change' command. In other words, if the FRA is copied to tape (or to backup copied to alternative disk location using 'backup backupset', once the backupset is deleted from the FRA, it's KEEP options can be changed.

Note, this can be expedited by manually coping the backupset at the OS level, delete the original backup, catalog and keep the copy. See the following testcase:

TESTCASE


RMAN> list backup of database summary;

List of Backups

===============

Key TY LV S Device Type Completion Time #Pieces #Copies Compressed Tag


135 B F A DISK 28-NOV-06 1 1 NO TAG20061128T150309

218 B F A DISK 28-NOV-06 1 1 NO TAG20061128T161144

423 B F A DISK 30-NOV-06 1 1 NO TAG20061130T130903

452 B F A DISK 01-DEC-06 1 1 NO TAG20061201T100942

RMAN> list backupset 452;

List of Backup Sets

===================

BS Key Type LV Size Device Type Elapsed Time Completion Time


452 Full 286.59M DISK 00:00:48 01-DEC-06

BP Key: 455 Status: AVAILABLE Compressed: NO Tag: TAG20061201T100942

Piece Name:

/<path>/flash_recovery_area/<db name>/backupset/2006_12_01/<name of backuppiece>

List of Datafiles in backup set 452

File LV Type Ckp SCN Ckp Time Name


1 Full 382053 01-DEC-06 /<path>/system01.dbf

2 Full 382053 01-DEC-06 /<path>/undotbs01.dbf

3 Full 382053 01-DEC-06 /<path>/sysaux01.dbf

4 Full 382053 01-DEC-06 /<path>//users01.dbf

At OS:


$ cp /<path>/flash_recovery_area/<db name>/backupset/2006_12_01/<name of backuppiece> /<new path>

$ pwd /<new path>

$ ls <name of backuppiece>

In RMAN:


RMAN> delete backupset 452;

using channel ORA_DISK_1

List of Backup Pieces

BP Key BS Key Pc# Cp# Status Device Type Piece Name


455 452 1 1 AVAILABLE DISK

/<path>/flash_recovery_area/<db name>/backupset/2006_12_01/<name of backuppiece>

Do you really want to delete the above objects (enter YES or NO)? yes

deleted backup piece

backup piece

handle=/<path>/flash_recovery_area/<db name>/backupset/2006_12_01/<name of backuppiece> recid=24 stamp=608033386

Deleted 1 objects

RMAN> catalog backuppiece '/<backuppiece in new copied path>';

cataloged backuppiece

backup piece handle=/<backuppiece in new copied path> recid=26 stamp=608033760

RMAN> list backup of database summary;

List of Backups

===============

Key TY LV S Device Type Completion Time #Pieces #Copies Compressed Tag


135 B F A DISK 28-NOV-06 1 1 NO TAG20061128T150309

218 B F A DISK 28-NOV-06 1 1 NO TAG20061128T161144

423 B F A DISK 30-NOV-06 1 1 NO TAG20061130T130903

489 B F A DISK 01-DEC-06 1 1 NO TAG20061201T100942

RMAN> change backupset 489 keep forever nologs;

using channel ORA_DISK_1

keep attributes for the backup are changed

backup will never be obsolete

archived logs required to recover from this backup will not be kept

backup set key=489 recid=23 stamp=608033760

RMAN> list backupset 489;

List of Backup Sets

===================

BS Key Type LV Size Device Type Elapsed Time Completion Time


489 Full 286.59M DISK 00:00:00 01-DEC-06

BP Key: 495 Status: AVAILABLE Compressed: NO Tag: TAG20061201T100942

Piece Name: /<backuppiece in new copied path>

Keep: NOLOGS Until: FOREVER

List of Datafiles in backup set 489

File LV Type Ckp SCN Ckp Time Name


1 Full 382053 01-DEC-06 /<path>/system01.dbf

2 Full 382053 01-DEC-06 /<path>/undotbs01.dbf

3 Full 382053 01-DEC-06 /<path>/sysaux01.dbf

4 Full 382053 01-DEC-06 /<path>/users01.dbf

RMAN>

相关推荐
记得记得就1513 小时前
【MySQL数据库管理】
数据库·mysql·oracle
p***32355 小时前
一条sql 在MySQL中是如何执行的
数据库·sql·mysql
瀚高PG实验室7 小时前
Oracle或DM(达梦)时间戳之间的差值SQL迁移到瀚高数据库
数据库·sql·oracle·瀚高数据库
路边草随风7 小时前
starrocks compaction 进度问题定位
大数据·sql
曹牧8 小时前
Oracle:“列不能外部关联到子查询”
数据库·sql
w***i2948 小时前
【SQL】count(1)、count() 与 count(列名) 的区别
数据库·sql
where happens9 小时前
SQL Server 收缩日志
数据库·sql·oracle
w***i2949 小时前
SQL Server 创建用户并授权
数据库·oracle
jnrjian9 小时前
delete backup backset move backupset 备份集的操作
oracle