1、oracle必须处于归档模式
archive log list;/select log_mode from v$database;确认数据库是否处于归档模式(必须处于归档模式)
开启归档模式:
shutdown immediate;
startup mount;
alter database archivelog;
alter system set log_archive_dest_1='location=/data/oracle/log1/archive_log';
alter database open;
shutdown immediate;
startup;
手工生成一个归档:alter system switch logfile;
查看归档:select name from v$archived_log;
查看数据库中数据量大小:select sum(bytes)/1024/1024/1024 from dba_segments;
删除部分归档:
DELETE ARCHIVELOG ALL COMPLETED BEFORE 'SYSDATE-7';
find /oraarchive -xdev -mtime +7 -name "*.dbf" -exec rm -f {} ;
crosscheck archivelog all;
delete expired archivelog all;
删除归档后进行一次检验;
rman备份
backup format '/u01/rmanbak/full_%T_%U.bak' database plus archivelog;
list backup;
阅读(1026) | 评论(0) | 转发(0) |