设为首页 加入收藏

TOP

DB2恢复一例SQL0928N(二)
2015-07-24 11:05:38 来源: 作者: 【 】 浏览:3
Tags:DB2 恢复 SQL0928N
t1 mkdir xxx 3.更改容器及文件的存储路径: db2 "set tablespace containers for 0 using (Path '/db2sys/db2inst1/xxx/NODE0000/SQL00001/SQLT0000.0')" db2 "set tablespace containers for 1 using (Path '/db2sys/db2inst1/xxx/NODE0000/SQL00001/SQLT0001.0')" db2 "set tablespace containers for 2 using (Path '/db2sys/db2inst1/xxx/NODE0000/SQL00001/SQLT0002.0')" db2 "set tablespace containers for 3 using (Path '/db2sys/db2inst1/xxx/NODE0000/SQL00001/SYSTOOLSPACE')" db2 "set tablespace containers for 4 using (Path '/db2sys/db2inst1/xxx/NODE0000/SQL00001/SYSTOOLSTMPSPACE')" db2 "set tablespace containers for 5 using (File '/db2sys/db2inst1/xxx/NODE0000/SQL00001/CDTABLESPACE.DAT' 50000)" db2 "set tablespace containers for 6 using (File '/db2sys/db2inst1/xxx/NODE0000/SQL00001/TSASNCA' 38400)" db2 "set tablespace containers for 7 using (File '/db2sys/db2inst1/xxx/NODE0000/SQL00001/TSASNUOW' 12800)" db2 "set tablespace containers for 8 using (Path '/db2sys/db2inst1/xxx/NODE0000/SQL00001/xxxCLOB')"
ps:其中遇到一个SQL0298N的报错: SQL0298N Bad container path. SQLSTATE=428B2 容器类型和容器名指定均正确。查到最后查不出办法,最后使用一个比较笨拙的办法; 解决方法: 删除xxx数据库
>db2 drop db xxx 重新使用db2 restore 恢复并添加to参数: >db2 restore db xxx from . on /db2sys/db2inst1/xxx replace existing redirect without rolling forward 在重复上面更改容器和数据文件路径的命令就OK了。 路径更改完毕之后,restore continue: > db2 restore db xxx continue DB20000I The RESTORE DATABASE command completed successfully.
更改归档路径 >db2 update db cfg for xxx using LOGARCHMETH1 disk:/db2sys/db2log/xxx
重启数据库使参数生效: > db2 stop > db2 start
Ps:其中db2 connect 的时候遇到SQL0332N > db2 connect to xxx SQL0332N Character conversion from the source code page "1386" to the target code page "819" is not supported. SQLSTATE=57017 解决方法: > db2set DB2COMM=tcpip
> db2set DB2CODEPAGE=1386
> db2set DB2COMM=tcpip DB2CODEPAGE=1386 > db2 terminate
> db2 connect to cnap
Database Connection Information
Database server = DB2/AIX64 9.7.7 SQL authorization ID = DB2INST1 Local database alias = XXX
Ok ,DB2 就算恢复完成了。
首页 上一页 1 2 下一页 尾页 2/2/2
】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
分享到: 
上一篇sqlserver锁定一行数据,禁止读取.. 下一篇CentOS5上安装Oracle10g

评论

帐  号: 密码: (新用户注册)
验 证 码:
表  情:
内  容:

·Redis 分布式锁全解 (2025-12-25 17:19:51)
·SpringBoot 整合 Red (2025-12-25 17:19:48)
·MongoDB 索引 - 菜鸟 (2025-12-25 17:19:45)
·What Is Linux (2025-12-25 16:57:17)
·Linux小白必备:超全 (2025-12-25 16:57:14)