加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

How to change Flash Recovery Area to a new location ? (文档

发布时间:2020-12-15 17:50:39 所属栏目:百科 来源:网络整理
导读:APPLIES TO: Oracle Database - Enterprise Edition - Version 10.1.0.2 and later Information in this document applies to any platform. ***Checked for relevance on 14-Oct-2013*** GOAL This document shows how to change the Flash Recovery Area d

APPLIES TO:

Oracle Database - Enterprise Edition - Version 10.1.0.2 and later
Information in this document applies to any platform.
***Checked for relevance on 14-Oct-2013***

GOAL

This document shows how to change the Flash Recovery Area destination and
how to move the files from old area to new area.

SOLUTION

How to change Flash Recovery Area to a new location ?
-----------------------------------------------------

If you need to move the Flash Recovery Area of your database to a new location,?
invoke SQL*Plus to change the DB_RECOVERY_FILE_DEST initialization parameter.?
For example:

SQL> ALTER SYSTEM SET DB_RECOVERY_FILE_DEST='+disk1' SCOPE=BOTH SID='*';


After you change this parameter,all new Flash Recovery Area files will be?
created in the new location.

The permanent files (control files and online redolog files),flashback logs?
and transient files can be left in the old Flash Recovery Area location. The?
database will delete the transient files from the old Flash Recovery Area?
location as they become eligible for deletion.

For the FLASHBACK logfiles to be able to to pick up the new 'db_recovery_file_dest' location,?
the flashback option needs to be toggled off and on.

This can be done like this:

- Shutdown the Database?? ?
? SQL> shutdown immediate

- Startup mount the Database:
? SQL> startup mount;?

- Drop the garanteed restore points?? ?
? SQL> select * from v$restore_point;
?????? drop restore point <name>;

- Toggle the Flashback off:
? SQL> alter database flashback off;?

- Toggle the Flashback on:
? SQL> alter database flashback on;?

- Open the Database:
? SQL> alter database open;



If you need to actually move your current permanent files,transient files,to the new Flash Recovery Area,then follow the following steps:

1) To move the existing backupsets and archived redo log files,use the following command:
??

?? RMAN> BACKUP AS COPY ARCHIVELOG ALL DELETE INPUT;
?? RMAN> BACKUP DEVICE TYPE DISK BACKUPSET ALL DELETE INPUT;


2) To move the datafile copies. Run the below command for each datafile copy:

RMAN> BACKUP AS COPY DATAFILECOPY <name> DELETE INPUT;


? ?
?? where the <name> is the datafilecopy name in the old recovery area.

3) To move the controlfile from the old Flash Recovery Area to new one.?
?? Change the location in the parameter CONTROL_FILES to the new location
?? and restart the instance in NOMOUNT.

RMAN> RESTORE CONTROLFILE FROM 'filename_of_old_control_file';



4) To move the online redo logs. Use the commands to add a a log file stored in?
?? the new Flash Recovery Area and drop the logfile in the old Flash Recovery Area?
?? for each redo log group.

SQL> alter database add logfile size 100M;
SQL> alter database drop logfile '<name of the old redo log>';



Oracle will clean up transient files remaining in the old Flash Recovery Area?
location as they become eligible for deletion.

REFERENCES

NOTE:833663.1?- Flash Recovery Area - FAQ
NOTE:460145.1?- Space Usage Figures in V$flash_recovery_area_usage Misleading When FRA Location is Changed

?
?

相关内容

? ?
?
?

产品

? ?
?
  • Oracle Database Products?>?Oracle Database?>?Oracle Database?>?Oracle Database - Enterprise Edition?>?Flashback Recovery?>?Flash Recovery Area

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读