Oracle基礎 04 歸檔日誌 archivelog

j04212發表於2014-02-12

--檢視歸檔模式
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/,如需轉載,請註明出處,否則將追究法律責任。

相關文章