查看: 4309|回复: 3

[精华] db2 version 8 migration steps

[复制链接]
论坛徽章:
1
2010新春纪念徽章
日期:2010-01-04 08:33:08
跳转到指定楼层
1#
发表于 2007-5-8 23:56 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
These steps do not include replication migration

1> Save config information
2> Set db2 diag level to 4
db2 update dbm configuration using diaglevel 4
3> Take Application & db down
Stop the DB2 license service by entering the db2licd -end command
db2 terminate
db2 force applications
db2stop
4> Take offline backup
5> Install db2 version 8 and fixpacks
6> Migrate instance
20 MB of /tmp free space needed The instance migration trace file is written to /tmp
db2ckmig command manually and resolve any problems as instance id
/usr/opt/db2_08_01/bin/db2ckmig -h -l ~/migration.log
db2imigr instx (needs root) this command dosent complete if you are in the dce directory, you need to change to the code director
sudo /usr/opt/db2_08_01/instance/db2imigr -d -a server -u <instance_id> <instance_name> 2>&1 | tee /tmp/db2imigr.out
7> Migrate db and bind
db2 migrate db <dbname>
cd sqllib/bnd
db2 "bind @db2ubind.lst blocking all grant public"
db2 "bind @db2cli.lst blocking all grant public sqlerror continue"
8> Convert indexes to type 2
db2 "select 'reorg indexes all for table',substr(rtrim(tabschema)||'.'||rtrim(tabname),1,40),'convert;'from syscat.tables where type = 'T' " >convert.out

pg convert.out |grep -e reorg >convert.ddl
db2 -stvf convert.ddl -z convert.ddl.out
9>runstats
db2 "select 'runstats on table',substr(rtrim(tabschema)||'.'||rtrim(tabname),1,40),'and indexes all shrlevel change;'from syscat.tables where type = 'T' " >runstats.out

pg runstats.out |grep -e runstats >runstats.ddl
db2 -stvf runstats.ddl -z runstats.ddl.out
10>(Revoke EXECUTE privileges on external stored procedures that contain SQL data access from PUBLIC. During database migration, EXECUTE privileges are granted to PUBLIC for all existing functions, methods, and external stored procedures.
db2undgp - r
11> Set db2 diag level to 3
12> application testing
13> Take offline backup
论坛徽章:
71
马上加薪
日期:2014-02-19 11:55:14ITPUB十周年纪念徽章
日期:2011-11-01 16:19:412010广州亚运会纪念徽章:橄榄球
日期:2011-05-22 10:54:33管理团队成员
日期:2011-05-07 01:45:082011新春纪念徽章
日期:2011-01-25 15:42:562011新春纪念徽章
日期:2011-01-25 15:42:332011新春纪念徽章
日期:2011-01-25 15:42:152011新春纪念徽章
日期:2011-01-25 15:41:502011新春纪念徽章
日期:2011-01-25 15:41:012010年世界杯参赛球队:丹麦
日期:2010-04-06 10:23:36
2#
发表于 2007-5-9 07:24 | 只看该作者
不错 可以作为参考

使用道具 举报

回复
论坛徽章:
233
天枰座
日期:2016-02-02 09:36:332012新春纪念徽章
日期:2012-01-04 11:49:54ITPUB十周年纪念徽章
日期:2011-11-01 16:19:41灰彻蛋
日期:2011-06-22 19:28:30现任管理团队成员
日期:2011-05-07 01:45:082010广州亚运会纪念徽章:拳击
日期:2011-04-08 16:56:552011新春纪念徽章
日期:2011-02-18 11:43:332011新春纪念徽章
日期:2011-01-25 15:42:562011新春纪念徽章
日期:2011-01-25 15:42:332011新春纪念徽章
日期:2011-01-25 15:42:15
3#
发表于 2007-5-9 08:48 | 只看该作者
If installed fixpak later than fp10(include) , should bind db2schema.bnd

使用道具 举报

回复
论坛徽章:
1
2010新春纪念徽章
日期:2010-01-04 08:33:08
4#
 楼主| 发表于 2007-5-10 03:57 | 只看该作者
最初由 diablo2 发布
[B]If installed fixpak later than fp10(include) , should bind db2schema.bnd [/B]


YES, you are right !

        db2 terminate
        db2 CONNECT TO <dbname>
       db2 BIND <path>/@db2ubind.lst BLOCKING ALL GRANT PUBLIC ACTION ADD
        db2 terminate

使用道具 举报

回复

您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

TOP技术积分榜 社区积分榜 徽章 团队 统计 知识索引树 积分竞拍 文本模式 帮助
  ITPUB首页 | ITPUB论坛 | 数据库技术 | 企业信息化 | 开发技术 | 微软技术 | 软件工程与项目管理 | IBM技术园地 | 行业纵向讨论 | IT招聘 | IT文档
  ChinaUnix | ChinaUnix博客 | ChinaUnix论坛
CopyRight 1999-2011 itpub.net All Right Reserved. 北京盛拓优讯信息技术有限公司版权所有 联系我们 未成年人举报专区 
京ICP备16024965号-8  北京市公安局海淀分局网监中心备案编号:11010802021510 广播电视节目制作经营许可证:编号(京)字第1149号
  
快速回复 返回顶部 返回列表