最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
oracle中Exadata 备份恢复案例
时间:2022-06-29 09:36:22 编辑:袖梨 来源:一聚教程网
Exadata的备份恢复跟普通单机或者RAC数据库的备份恢复基本面是一样的,但是针对多节点还是有一些优化的最佳实践。今天就简单谈谈针对Exadata的备份和恢复。
为充分利用Exadata的I/O能力和多节点的优势,建议先在每个DB节点上分配2个通道进行测试。另外,为了让所有的DB节点都能参与到备份任务中,可以在每个节点建立一个failover类型的service。下面是一个实际的测试配置和脚本,仅供参考。
srvctl add service –d df –s bkup1 –r df1 –a df2 ,df3 ,df4
srvctl add service –d df –s bkup2 –r df2 –a df1 ,df3 ,df4
srvctl add service –d df –s bkup3 –r df3 –a df1 ,df2 ,df4
srvctl add service –d df –s bkup4 –r df4 –a df1 ,df2 ,df3
srvctl start service -d df
export ORACLE_HOME
export NLS_DATE_FORMAT=”YYYY/MM/DD HH24:MI:SS”
begin_time_sec=`date +%s`
set echo on
run
{
CONFIGURE DEFAULT DEVICE TYPE TO DISK;
CONFIGURE DEVICE TYPE DISK PARALLELISM 8;
allocate channel ch01 device type disk connect ‘sys/welcome1@x3-scan/bkup1’;
allocate channel ch02 device type disk connect ‘sys/welcome1@x3-scan/bkup2’;
allocate channel ch03 device type disk connect ‘sys/welcome1@x3-scan/bkup3’;
allocate channel ch04 device type disk connect ‘sys/welcome1@x3-scan/bkup4’;
allocate channel ch05 device type disk connect ‘sys/welcome1@x3-scan/bkup1’;
allocate channel ch06 device type disk connect ‘sys/welcome1@x3-scan/bkup2’;
allocate channel ch07 device type disk connect ‘sys/welcome1@x3-scan/bkup3’;
allocate channel ch08 device type disk connect ‘sys/welcome1@x3-scan/bkup4’;
backup
as backupset
incremental level 0
section size 128g
database;
}
end_time_sec=`date +%s`
total_execution_time_sec=`expr ${end_time_sec} – ${begin_time_sec}`
echo “Script execution time is $total_execution_time_secseconds”
下图是一个官方数据的截图,原文可以参考白皮书
从上图可以看到,在11203的版本下,满配的X2-2(X3-2),磁盘的备份速度可以达到每小时20-25TB。在11202版本下,可以达到每小时17-18TB。
针对恢复,同理,下面是一段参考脚本:
此示例是在1/8配置的环境下进行的测试,使用了16个channel,针对每个node建了一个service。注意此处是针对表空间而非全库的恢复,稍加修改可以进行全库的恢复。
run
{
allocate channel ch01 device type disk connect ‘sys/oracle@bg1’;
allocate channel ch02 device type disk connect ‘sys/oracle@bg1’;
allocate channel ch03 device type disk connect ‘sys/oracle@bg1’;
allocate channel ch04 device type disk connect ‘sys/oracle@bg1’;
allocate channel ch05 device type disk connect ‘sys/oracle@bg2’;
allocate channel ch06 device type disk connect ‘sys/oracle@bg2’;
allocate channel ch07 device type disk connect ‘sys/oracle@bg2’;
allocate channel ch08 device type disk connect ‘sys/oracle@bg2’;
allocate channel ch09 device type disk connect ‘sys/oracle@bg1’;
allocate channel ch010 device type disk connect ‘sys/oracle@bg1’;
allocate channel ch011 device type disk connect ‘sys/oracle@bg1’;
allocate channel ch012 device type disk connect ‘sys/oracle@bg1’;
allocate channel ch013 device type disk connect ‘sys/oracle@bg2’;
allocate channel ch014 device type disk connect ‘sys/oracle@bg2’;
allocate channel ch015 device type disk connect ‘sys/oracle@bg2’;
allocate channel ch016 device type disk connect ‘sys/oracle@bg2’;
sql ‘ALTER TABLESPACE eighth OFFLINE IMMEDIATE’;
restore tablespace eighth;
recover tablespace eighth;
sql ‘ALTER TABLESPACE eighth ONLINE’;
}
相关文章
- 我的常州怎么查社保卡余额 我的常州查询医保卡余额方法 05-06
- 天刀共鸣技能搭配攻略(掌握共鸣技能,提升天刀战斗实力) 05-06
- 《Neverness To Everness》周年庆委托任务在哪里介绍 05-06
- 纳米ai怎么修改资料 纳米ai修改资料方法 05-06
- 月蚀技能攻略(掌握月蚀技能,成为真正的黑暗之王!) 05-06
- 纳米ai怎么静音 纳米ai静音方法 05-06