设为首页 加入收藏

TOP

改变FlashRecoveryArea(FRA)到一个新路径的方法
2015-11-21 01:43:07 来源: 作者: 【 】 浏览:0
Tags:改变 FlashRecoveryArea FRA 一个 路径 方法

改变 Flash Recovery Area (FRA)到一个新路径的方法。

来源于:
How to change Flash Recovery Area to a new location ? (文档 ID 305651.1)

目标:
本文描述了改变FRA目的地的方法和从老的FRA中move file到新FRA的方法

解决方案:
如果你需要改变你的FRA到新的路径,需要从sqlplus里边改变DB_RECOVERY_FILE_DEST初始化参数:

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

当你改变这个参数之后,新的所有的FRA file 将会建立在新的路径下

永久的file(控制文件和在线日志文件),闪回日志和临时文件可以放在老的FRA区里边。当这些临时文件可以被删除时,数据库将会从老的FRA区里边删除这些临时文件.

为了闪回日志能使用新的'db_recovery_file_dest'位置,数据库的闪回选项需要off掉再on

类似如下的方法:

- 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 
  
   ;

 - 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;
  

如果你需要move你的永久文件、临时文件到新的FRA区中,请使用下面的步骤:
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 
  
    DELETE INPUT;
  
where the 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 '
   
    ';
   
Oracle will clean up transient files remaining in the old Flash Recovery Area
location as they become eligible for deletion.
】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
分享到: 
上一篇给员工涨工资,总裁1000,经理800.. 下一篇数据库-关系数据库

评论

帐  号: 密码: (新用户注册)
验 证 码:
表  情:
内  容: