听说备库最值得推广的是:报表和备份卸载
因为主备库一致,因此从备库发起备份那么会减少对主库的磁盘、cpu、网络消耗,听起来很好,实际执行时怎么保障一致呢?
理想情况下:
-
以下操作都在备库上执行
-
-
编辑一个脚本 vi /home/oracle/logswitch.sh,输入以下内容
-
-
#!/bin/ksh
-
sqlplus -s "sys/oracle@tns_primary as sysdba" <<eof
-
alter system archive log current;
-
exit
-
eof
-
-
授予执行权限 chmod 755 /home/oracle/logswitch.sh
-
-
-
编辑备份脚本 vi /home/oracle/rman_bak.sh,输入以下内容
-
-
#!/bin/ksh
-
-
rman target /
-
run{
-
configure controlfile autobackup on ;
-
backup database plus archivelog delete input;
-
host "/home/oracle/logswitch.sh";
-
backup archivelog all delete input;
-
}
-
阅读(1032) | 评论(0) | 转发(0) |