【发布时间】:2019-02-15 19:33:03
【问题描述】:
我的环境中有 server1 和 server2,都安装了 db2 v11.1。
我已经对我的数据库 GS_DB 进行了在线表空间(TS1、TS2、TS3)增量备份,并获得了以下 3 张图像。
Image1 at timestamp1: 20190215162151 (full online backup of TS1,TS2,TS3)
Image2 at timestamp2: 20190215162254 (incremental online backup of TS1,TS2,TS3)
Image3 at timestamp3: 20190215162725 (incremental online backup of TS1,TS2,TS3)
在server1中,假设我想将我的db恢复到image2(20190215162254),我可以这样做:
db2ckrst -d GS_DB -t 20190215162254 -r tablespace
Suggested restore order of images using timestamp 20190215162254 for database gs_db.
====================================================================
restore db gs_db tablespace ( TS1, TS2, TS3 ) incremental taken at 20190215162254
restore db gs_db incremental taken at 20190215162151
restore db gs_db incremental taken at 20190215162254
====================================================================
如果我按照命令恢复到 server1 中现有的 GS_DB,它工作正常。
现在我将3张图片传输到server2并在server2中创建了一个空数据库GS_DB,然后尝试使用上述命令将表空间TS1,TS2,TS3恢复到server2中的GS_DB:
db2 restore db gs_db2 tablespace ( TS1, TS2, TS3 ) incremental taken at 20190215162254
SQL2560N The table space restore operation failed because the target database is not identical to the source database.
已经卡在第一个命令上,这是否意味着我们无法跨两个不同的数据库恢复表空间备份映像?有什么办法可以吗?
提前致谢!
【问题讨论】:
标签: db2