软讯网络 > 冲浪宝典 > 网络资源 > restore (重定向恢复数据库)
【标 题】:restore (重定向恢复数据库)
【关键字】:
restore
【来 源】:http://www.cublog.cn/u/5003/showart.php?id=156227
restore (重定向恢复数据库)
1.检查备份数据库的表空间名和对应的containers。 0 SYSCATSPACE 2 CIGSPACE 3 FLOWSPACE 4 PPSPACE 5 USERSPACE 6 IDXCSPACE 7 IDXCSPACE 8 IDXCSPACE 9 TEMPSPACE 2.检查要恢复的服务器是否有足够的containers去对应相应的表空间,检查那些裸设备的大小和备份数据库每个space的pagesize大小,要一致。 3.执行命令进行恢复 db2 restore db stmaold taken at 20060809 redirect db2 "set tablespace containers for 0 using (path '/home/db2admin/db2admin/NODE0000/SQL00001/SQLT0000.0')" db2 "set tablespace containers for 2 using (device '/dev/dbvg/rdb2ciglv' 64000)" db2 "set tablespace containers for 3 using (device '/dev/dbvg/rstma_user102' 6400)" db2 "set tablespace containers for 4 using (device '/dev/dbvg/rstma_user103' 6400)" db2 "set tablespace containers for 5 using (device '/dev/dbvg/rdb2userlv' 32000)" db2 "set tablespace containers for 6 using (device '/dev/dbvg/rstma_index01' 6400)" db2 "set tablespace containers for 7 using (device '/dev/dbvg/rstma_index02' 6400)" db2 "set tablespace containers for 8 using (device '/dev/dbvg/rstma_index03' 6400)" db2 "set tablespace containers for 9 using (device '/dev/dbvg/rstma_temp01' 51200)" db2 restore db stmaold continue ROLLFORWARD DATABASE stmaold complete 注:lvcreate -L 2048 -n db2ciglv /dev/dbvg lvdisplay stma_user101