rman target / #连接进rman DELETE NOPROMPT ARCHIVELOG ALL COMPLETED BEFORE 'SYSDATE-7'; oracle_clean() { oracle_env ${oraclerman} target /<<EOF DELETE NOPROMPT ARCHIVELOG ALL COMPLETED BEFORE 'SYSDATE
scripts/log/del_arch_$DAY_TAG.log<<EOF crosscheck archivelog all; delete noprompt archivelog until time '(sysdate
--减1年 select sysdate,add_months(sysdate,-1) from dual; --减1月 select sysdate,to_char(sysdate
STATUS='Y' , LAST_UPADTE_TIME=sysdate where STATUS='N' and ID='2024091309581000101' and TRAN_TIME>=sysdate STATUS='Y' , LAST_UPADTE_TIME=sysdate where STATUS='N' and ID='2024091309581000101' and TRAN_TIME>=sysdate
sequence 110; RMAN> restore archivelog high sequence 108; 按时间恢复: RMAN> restore archivelog from time 'sysdate
DBA_AUDIT_TRAIL,排查异常登录或高危操作: SELECT username, action_name, timestamp FROM dba_audit_trail WHERE timestamp >= SYSDATE tablespace_name> ADD DATAFILE '<path>' SIZE 10G; 2、归档日志管理 清理过期归档(确保已备份): RMAN> DELETE ARCHIVELOG UNTIL TIME 'SYSDATE
backup/full_%U_%d'; configure device type disk parallelism 10; delete backupset all completed before 'sysdate
obsolete; crosscheck backupset; delete expired backupset; DELETE ARCHIVELOG ALL COMPLETED BEFORE 'SYSDATE
--->删除log sequence为16及16之前的所有归档日志 delete archivelog all completed before 'sysdate _16.arc recid=2092 stamp=817516861 Deleted 9 objects RMAN> delete archivelog all completed before 'sysdate
dual; -- - 1 year select sysdate,add_months(sysdate,-1) from dual; -- - 1 month select sysdate,to_char(sysdate
AMERICAN_AMERICA.AL32UTF8 rman target / <<EOF run { crosscheck archivelog all; DELETE NOPROMPT ARCHIVELOG until time 'sysdate
RMAN>delete noprompt obsolete; --删除7天前的归档日志备份 RMAN> delete archivelog all completed before 'sysdate-
deltime}.log<<EOF" echo 'crosscheck archivelog all;' echo "delete noprompt archivelog until time 'sysdate
RESUME',sysdate-3); insert into test values(2,'SUSPEND',sysdate-10); insert into test values(2,'RESUME',sysdate
oradata/scripts/delarch.sql crosscheck archivelog all; delete noprompt archivelog all completed before "sysdate
defaultCONFIGURE SNAPSHOT CONTROLFILE NAME TO '/u01/app/oracle/product/11.2.0/db/dbs/snapcf_orcl.f'; # default#配置Sysdate
archivelog from logseq 27 until logseq 29; 还原log sequence为27到29这几个归档日志 restore archivelog from time 'sysdate
window of 3 days; RMAN> report obsolete; RMAN> report unrecoverable; RMAN> report schema at time 'sysdate
删除7天前归档): vi delarch.sql crosscheck archivelog all; delete noprompt archivelog all completed before "sysdate
device type disk; allocate channel ch2 device type disk; delete noprompt backupset completed before 'sysdate