ITPub博客

首页 > 数据库 > Oracle > Oracle基础 04 归档日志 archivelog

Oracle基础 04 归档日志 archivelog

原创 Oracle 作者:j04212 时间:2014-02-12 16:20:19 0 删除 编辑

--查看归档模式
archive log list

select log_mode from v$database;


--修改为归档模式(mount下)

alter database archivelog


--修改为非归档模式(mount下)

alter database noarchivelog


--切换日志三个相关命令

SQL> alter system switch logfile;
SQL> alter system archive log current;
SQL> alter system checkpoint;


--修改recovey目录
show parameter db_recover
alter system set db_recovery_file_dest='/u01/app/oracle/arch' scope=both;
alter system set db_recovery_file_dest_size=2g;


--v$recovery_file_dest
SYS@ test11g> col name for a20
SYS@ test11g> select * from v$recovery_file_dest;

NAME                 SPACE_LIMIT SPACE_USED SPACE_RECLAIMABLE NUMBER_OF_FILES
-------------------- ----------- ---------- ----------------- ---------------
/u01/app/oracle/flas  4039114752  344297472         343966720               8
h_recovery_area


--检查一下flash recovery area的使用情况:

SYS@ test11g> set linesize 100
SYS@ test11g> select * from v$flash_recovery_area_usage;

FILE_TYPE            PERCENT_SPACE_USED PERCENT_SPACE_RECLAIMABLE NUMBER_OF_FILES
-------------------- ------------------ ------------------------- ---------------
CONTROL FILE                          0                         0               0
REDO LOG                              0                         0               0
ARCHIVED LOG                       4.26                      4.26               6
BACKUP PIECE                       4.26                      4.25               2
IMAGE COPY                            0                         0               0
FLASHBACK LOG                         0                         0               0
FOREIGN ARCHIVED LOG                  0                         0               0

 


 

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

请登录后发表评论 登录
全部评论

注册时间:2012-10-23

  • 博文量
    94
  • 访问量
    249188