oracle 10g 歸檔日誌清除

oracle_ace發表於2009-11-20
正常情況下應該在rman下刪除archivelog

rman>delete archivelog all;

 

以下為手動刪除archivelog物理檔案後要進行的操作

1, 手工清除後,資料庫中還會存有記錄:
select * from v$flash_recovery_area_usage;

2, 然後:
rman target /
crosscheck archivelog all;
delete expired archivelog all;

說明:2是修復1的辦法

 

用rman

run {
    allocate channel ch1 type disk format '/目錄/a_log_%d_%p_%c_%s';
    backup archivelog all       # Backs up all archived redo logs.
   delete input;             # Optionally, delete the input logs
    release channel ch1;
}

========================================================

list backup of archivelog all;

 

restore archivelog all;

restore archivelog sequence seqnumber;

===歸檔當前日誌============

 

alter system archive log current;

===============================================================

ORA-32004: obsolete and/or deprecated parameter(s) specified

ALTER SYSTEM RESET log_archive_start SCOPE=SPFILE SID='*';

===============================================================

===資料庫啟用歸檔模式=====================

SQL> startup mount;

SQL> alter database archivelog;

SQL> alter system set log_archive_dest_1='E:\ORACLE\ora92\database\archive' scope=both;

SQL> alter system set log_archive_dest_2='service=standby' scope=both;

SQL> alter system set log_archive_start=true scope=spfile;

SQL> alter database open;

SQL> archive log list;

=============================================================================
 

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/12361284/viewspace-620160/,如需轉載,請註明出處,否則將追究法律責任。

相關文章