ITPub博客

首页 > Linux操作系统 > Linux操作系统 > 设置Flash Recovery Area

设置Flash Recovery Area

原创 Linux操作系统 作者:tengrid 时间:2009-05-19 09:55:39 0 删除 编辑

注意点:
1, DB_RECOVERY_FILE_DEST_SIZE必须在DB_RECOVERY_FILE_DEST之前设置
2, 相关视图V$RECOVERY_FILE_DEST,V$FLASH_RECOVERY_AREA_USAGE 
    相关参数db_recovery_file_dest, db_recovery_file_dest_size
3, 不能反设置size参数,可以反设置dest参数
   如果不使用FRA,最好修改pfile,重新生成spfile,坏处是需要重启DB

#没有设置db_recovery_file_dest_size时直接设置dest报错
SQL> alter system set DB_RECOVERY_FILE_DEST='/data/oradata/fra' scope=both;
alter system set DB_RECOVERY_FILE_DEST='/data/oradata/fra' scope=both
*
ERROR at line 1:
ORA-02097: parameter cannot be modified because specified value is invalid
ORA-19802: cannot use DB_RECOVERY_FILE_DEST without DB_RECOVERY_FILE_DEST_SIZE

#正常设置

SQL> alter system set DB_RECOVERY_FILE_DEST_SIZE=10g scope=both;

System altered.

SQL> alter system set DB_RECOVERY_FILE_DEST='/data/oradata/fra' scope=both;
System altered.

SQL> col name for a30
SQL> set linesize 1000
SQL>  select * from V$RECOVERY_FILE_DEST;
NAME                           SPACE_LIMIT SPACE_USED SPACE_RECLAIMABLE NUMBER_OF_FILES
------------------------------ ----------- ---------- ----------------- ---------------
/data/oradata/fra               1.0737E+10          0                 0               0

SQL> show parameter db_recovery

NAME                                 TYPE                             VALUE
------------------------------------ -------------------------------- ------------------------------
db_recovery_file_dest                string                           /data/oradata/fra
db_recovery_file_dest_size           big integer                      10G

SQL> archive log list;
Database log mode              Archive Mode
Automatic archival             Enabled
Archive destination            USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence     145
Next log sequence to archive   147
Current log sequence           147

#反设置(将 dest设为''就可以了)

SQL> alter system set DB_RECOVERY_FILE_DEST_SIZE=0 scope=both;
*
ERROR at line 1:
ORA-02097: parameter cannot be modified because specified value is invalid
ORA-19803: Parameter DB_RECOVERY_FILE_DEST_SIZE is out of range (1 - 18446744073709551614)

SQL>alter system set DB_RECOVERY_FILE_DEST='' scope=both;
System altered.

SQL> select * from V$RECOVERY_FILE_DEST;  ==>limit仍有值

NAME                           SPACE_LIMIT SPACE_USED SPACE_RECLAIMABLE NUMBER_OF_FILES
------------------------------ ----------- ---------- ----------------- ---------------
                                1.0737E+10          0                 0               0

SQL>  show parameter db_recovery     ===>show没有显示结果

SQL> alter system set DB_RECOVERY_FILE_DEST='/data/oradata/fra' scope=both;
System altered.


SQL>  select * from V$RECOVERY_FILE_DEST;
NAME                           SPACE_LIMIT SPACE_USED SPACE_RECLAIMABLE NUMBER_OF_FILES
------------------------------ ----------- ---------- ----------------- ---------------
/data/oradata/fra               1.0737E+10          0                 0               0

SQL> show parameter db_recovery

NAME                                 TYPE                             VALUE
------------------------------------ -------------------------------- ------------------------------
db_recovery_file_dest                string                           /data/oradata/fra
db_recovery_file_dest_size           big integer                      10G

注意,不能反设置size
SQL> alter system set DB_RECOVERY_FILE_DEST_SIZE=0 scope=both;
*
ERROR at line 1:
ORA-02097: parameter cannot be modified because specified value is invalid
ORA-19803: Parameter DB_RECOVERY_FILE_DEST_SIZE is out of range (1 - 18446744073709551614)

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/94384/viewspace-600386/,如需转载,请注明出处,否则将追究法律责任。

上一篇: linux下显示中文
请登录后发表评论 登录
全部评论

注册时间:2009-05-18

  • 博文量
    136
  • 访问量
    383686