Chinaunix首页 | 论坛 | 博客
  • 博客访问: 3492620
  • 博文数量: 738
  • 博客积分: 1860
  • 博客等级: 上尉
  • 技术积分: 7745
  • 用 户 组: 普通用户
  • 注册时间: 2008-04-07 08:51
个人简介

偶尔有空上来看看

文章分类

全部博文(738)

文章存档

2023年(75)

2022年(134)

2021年(238)

2020年(115)

2019年(11)

2018年(9)

2017年(9)

2016年(17)

2015年(7)

2014年(4)

2013年(1)

2012年(11)

2011年(27)

2010年(35)

2009年(11)

2008年(11)

最近访客

分类: Oracle

2021-09-29 07:11:33


听说备库最值得推广的是:报表和备份卸载

因为主备库一致,因此从备库发起备份那么会减少对主库的磁盘、cpu、网络消耗,听起来很好,实际执行时怎么保障一致呢?

理想情况下:

  1. 以下操作都在备库上执行

  2. 编辑一个脚本 vi /home/oracle/logswitch.sh,输入以下内容

  3. #!/bin/ksh
  4. sqlplus -s "sys/oracle@tns_primary as sysdba" <<EOF
  5. alter system archive log current;
  6. exit
  7. EOF

  8. 授予执行权限 chmod 755 /home/oracle/logswitch.sh


  9. 编辑备份脚本 vi /home/oracle/rman_bak.sh,输入以下内容

  10. #!/bin/ksh

  11. rman target /
  12. run{
  13. Configure controlfile autobackup on ;
  14. backup database plus archivelog delete input;
  15. host "/home/oracle/logswitch.sh";
  16. backup archivelog all delete input;
  17. }


阅读(1073) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~