oracle歸檔日誌

一、查看歸檔
select name,log_mode from v$database;或者archive log list
二、開啓歸檔
1)shutdown immediate;
2)startup mount
2)alter database archivelog
3)alter database open
三、禁止歸檔
1)shutdown immediate
2)startup mount
3)alter database noarchivelog
4)alter database open
四、查看歸檔路徑
show parameter db_recovery_file_dest
五、查看歸檔日誌
show parameter log_archive_dest;或者select * from v$recovery_file_dest;
SELECT name FROM v$archived_log   WHERE   archived = 'YES' AND  deleted = 'NO' AND name not like '+%'  AND standby_dest = 'NO';
六、更改歸檔路徑
alter database archivelog
七、更改歸檔路徑大小
alter system set log_archive_dest_1='location=/archivelog' sco
pe=spfile;
alter system set db_recovery_file_dest_size=1400G;
show parameter db_recovery
八、查看歸檔日誌信息
SQL> archive log list;
九、查看歸檔日誌
SQL>select  name,completion_time from v$archived_log;
十、查看歸檔日誌佔有率
select * from v$flash_recovery_area_usage;
十一、手動歸檔
ALTER SYSTEM ARCHIVE LOG CURRENT;
十二、刪除歸檔日誌
rman
connect target /;
crosscheck archivelog all; 
DELETE ARCHIVELOG ALL COMPLETED BEFORE 'SYSDATE-7;
delete expired archivelog all;
1三、查看歸檔日誌的利用狀況
select name,SPACE_LIMIT,SPACE_USED from v$recovery_file_dest;日誌

相關文章
相關標籤/搜索