Chinaunix首页 | 论坛 | 博客
  • 博客访问: 662831
  • 博文数量: 163
  • 博客积分: 0
  • 博客等级: 民兵
  • 技术积分: 1625
  • 用 户 组: 普通用户
  • 注册时间: 2014-11-24 11:40
个人简介

资深Oracle数据库专家 OCM认证大师 10年数据库相关服务及开发经验 各类数据库相关方案的编写,管理及实施 数据中心数据库日常运维、大型项目割接、性能优化等方面有丰富的实战经验 客户包括: 电信,银行,保险,航空,国网,汽车,烟草等 想要一起学习探讨数据安全技术的请加qq群 256041954

文章分类

全部博文(163)

文章存档

2017年(2)

2016年(112)

2015年(38)

2014年(11)

我的朋友

分类: Oracle

2015-01-07 11:56:17

1:备份策略
15,45 6-23 * * * /home/oracle/shell/starbossdb_backup_arch.sh >> /home/oracle/shell/archive_log.rman
30 3 17 * * /home/oracle/shell/analyze_starboss.sql >> /home/oracle/shell/analyze.log
00  22  * *  2,4,6 /home/oracle/shell/starbossdb_backup.sh >>  /home/oracle/shell/log.rman


2:全备脚本:
crosscheck backup;
report obsolete;
delete noprompt obsolete;
delete obsolete redundancy = 1;
crosscheck backup;
report obsolete;
delete noprompt obsolete;
delete obsolete redundancy = 1;
run{
allocate channel ch1 type disk ;
allocate channel ch2 type disk ;
allocate channel ch3 type disk ;
allocate channel ch4 type disk ;
allocate channel ch5 type disk ;
allocate channel ch6 type disk ;
allocate channel ch7 type disk ;
allocate channel ch8 type disk ;
allocate channel ch9 type disk ;
 backup filesperset   10    database tag bossdb  format '/rmanbackupibm/rmanbackup/bossdb%d%U.dbf.%T';
release channel ch1;
release channel ch2;
release channel ch3;
release channel ch4;
release channel ch5;
release channel ch6;
release channel ch7;
release channel ch8;
release channel ch9;
}
quit


3:归档日志备份脚本
run{                                                                                                       
Crosscheck archivelog all;                                                                                 
delete noprompt archivelog until time 'SYSDATE-8';                                                         
allocate channel d1 type disk;                                                                             
allocate channel d2 type disk;                                                                             
allocate channel d3 type disk;                                                                             
allocate channel d4 type disk;                                                                             
allocate channel d5 type disk;                                                                             
sql 'alter system archive log current';                                                                    
sql 'alter system archive log current';                                                                    
backup filesperset 20 format '/rmanbackupibm/archbackup/archlog_t%t_s%s_p%p' archivelog all  delete input; 
backup current controlfile format '/rmanbackupibm/archbackup/controlfile%d%U.dbf.%T';                      
release channel d1;                                                                                        
release channel d2;                                                                                        
release channel d3;                                                                                        
release channel d4;                                                                                        
release channel d5;                                                                                        
}                                                                                                          
quit                                      
阅读(1477) | 评论(0) | 转发(0) |
0

上一篇:数据库异机恢复升级文档

下一篇:MY BOK

给主人留下些什么吧!~~