Chinaunix首页 | 论坛 | 博客
  • 博客访问: 974996
  • 博文数量: 584
  • 博客积分: 2293
  • 博客等级: 大尉
  • 技术积分: 3045
  • 用 户 组: 普通用户
  • 注册时间: 2006-03-28 11:15
文章分类

全部博文(584)

文章存档

2012年(532)

2011年(47)

2009年(5)

我的朋友

分类:

2012-05-18 08:08:40

原文地址:Oracle archive log 小结 作者:icybay

启动归档模式:
shutdown immediate;
startup mount;
alter database archivelog;
alter database open;

查看归档模式:
archive log list

关闭归档模式:
shutdown immediate;
startup mount;
alter database noarchivelog;
alter database open;

查看归档文件:
show parameter db_recovery;
alter system set db_recovery_file_dest_size=100g scope=spfile sid='*';
select * from v$log;
select * from v$logfile;
select * from v$flash_recovery_area_usage;
report obsolete;
delete obsolete;

备份归档文件:
backup archivelog all;

删除归档文件:
1. rman target / 或者 rman target user/password@tns
list archive all;
crosscheck archivelog all;
list expired archivelog all;
delete expired archivelog all;
2. rman target /
delete archivelog all completed before 'sysdate-7';
3.backup first
backup format '/tmp/arch-%T_%s_%U' archivelog all delete input;
或者 backup database plus archivelog;

常用的备份配置:
rman target /;
spool log to a.log
configure retention policy to recovery window of 9 days;
configure backup optimization on;
configure default device type to 'disk';
configure controlfile autobackup on;
configure retention policy to redundancy to 1;
spool log off;
exit
阅读(392) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~