改變 Flash Recovery Area (FRA)到一個新路徑的方法,recoveryfra

來源:互聯網
上載者:User

改變 Flash Recovery Area (FRA)到一個新路徑的方法,recoveryfra

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

如果你需要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 <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.

 

著作權聲明:本文為博主原創文章,未經博主允許不得轉載。

相關文章

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.