两种DB2分区数据库恢复方式
DB2分区数据库恢复分为·分区间串行方式和分区间并行方式。下面就为您详细介绍这两种DB2分区数据库恢复方式,供您参考学习。
分区数据库的恢复操作:
由于备份和恢复操作都只作用于当前数据库分区,因此也可分为串行和并行的方式。为了在前滚恢复中介绍OVERFLOW 选项的使用,这里我们将 SAMPLE 数据库恢复到同实例的一个名为SAMPNEW的新数据库中,其命令应为:
·DB2分区数据库恢复--分区间串行方式:
- db2_all "db2 restore db sample into sampnew without prompting"
注:由于是分区数据库,因此在完成了***个分区的恢复操作,开始第二个分区的恢复操作时系统会出现SQL2529W的警告,表明数据库已存在,是否要覆盖数据恢复的提示,而在某些平台下,如Linux,这一提示会导致分区数据库恢复操作的失败,如:
$ db2_all "db2 restore db sample into sapmnew"
DB20000I The RESTORE DATABASE command completed successfully.
rhas3: db2 restore db sample into sapmnew completed ok
SQL2529W Warning! Restoring to an existing database that is different from the backup image database, and the alias name "SAPMNEW" of the existing database do es not match the alias name "SAMPLE" of the backup image, and the database name "SAPMNEW" of the existing database does not match the database name "SAMPLE" of the backup image. The target database will be overwritten by the backup version. The Roll-forward recovery logs associated with the target database will be deleted.
Do you want to continue ? (y/n) SQL2001N The utility was interrupted. The output data may be incomplete.
rhas3: db2 restore db sample into sapmnew completed rc=4
因此建议在上述硬盘数据恢复命令中加入了“WITHOUT PROMPTING”的选项,以避免该提示的出现。
DB2分区数据库恢复--分区间并行方式
- db2_all "<<+0< db2 restore db sample into sampnew"
- db2_all "||<<-0< db2 restore db sample into sampnew without prompting"
或
- db2_all "<<-0<; db2 restore db sample into sampnew without prompting"
因编目分区是***个进行恢复的分区,所以无需加“WITHOUT PROMPTING”选项。
由于我们使用的备份映象文件是通过联机备份产生的,因此在恢复操作结束后,数据库将处于前滚暂挂状态,必须通过前滚操作前滚归档日志,以取消前滚暂挂状态,使数据库最终可用。
【编辑推荐】
相关文章
- 史上最强动态路由协议知识分解,3分钟带你入门到精通!
- 客快物流项目的一些Bug
- 大数据错题库(微信群Bug整理)
- 大数据开发岗大厂面试30天冲刺 - 日积月累,每日五题【Day03】——Kafka1
- 大数据开发岗大厂面试30天冲刺 - 日积月累,每日五题【Day04】——Kafka2
- 5G能否推动智能家居市场的创新?
- 2021年十大科技趋势 - 人工智能,边缘计算,机器视觉等
- 大数据开发岗常见面试复习30天冲刺 - 日积月累,每日五题【Day05】——Kafka3
- 分布式NoSQL列存储数据库Hbase(一)Hbase的功能与应用场景、基本设计思想
- 西安翔石携手亚马逊云服务(AWS) 引领西北地区客户上云转型
- 5G启航 网络先行 新华三MSR 5G路由器助推5G应用落地
- 【推荐系统】离线增量文章画像计算(二)
- 2020年及未来值得关注的4个边缘计算趋势
- 边缘计算2.0时代存在哪些挑战?
- 对于一般大数据物流项目的面试题(问题+答案)
- 【秋招面试】货拉拉面试(1面过程)
- 5G时代不可或缺的关键技术:详解边缘计算参考架构3.0
- 阿里巴巴大数据之路读书笔记——用户画像的定义
- 阿里巴巴大数据之路读书笔记——事实表设计的八大原则
- com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: Could not create connection to