DB2 BIND

                                              BIND

1.         Two method of BIND

l         Bind all DBRMs directly into one application plan as below

BIND PLAN(PLAN1) MEMBER( Main ,Sub1,Sub2)

l         Bind each DBRM separately into a package, and then associate these packages with an application plan as below

BIND PACKAGE(COL1) MEMBER( Main )

 BIND PACKAGE(COL1) MEMBER(Sub1)

BIND PACKAGE(COL2) MEMBER(Sub2)

BIND PLAN(PLAN2) PKLIST(COL1.*,COL2.Sub2)

The advantage of the second method is if you change one source program, you only have to precompile it and bind the corresponding package, not the whole plan.

The Access Path are determined at BIND Package and stored with each package.

2.         Let BIND determine object to be accessed

Assume that your test and production environments run on the same DB2 subsystem. When you want to promote your application from the tables with the TEST qualifier to tables with PROD qualifier, and you won’t want to change all your source programs, what should you do?

Omit the table qualifiers in SQL statements in your source programs and specify the qualifiers at bind time.

l         BIND PLAN(PLAN1) MEMBER(PROG1)

When you specify neither the plan OWNER nor the table QUALIFIER then the bind userid becomes the qualifier of non-qualified table name in your program.

l         BIND PLAN(PLAN1) MEMBER(PROG1) OWNER(TEST)

When you only specify the plan OWNER, the plan owner is used as the qualifier for all non-qualified table name

l         BIND PLAN(PLAN1) MEMBER(PROG1) OWNER(TEST) QUALIFIER(PROD)

When you specify the plan QUALIFIER, this parameter becomes the qualifier of non-qualified table name in your program. This is so for both packages and plans.

 
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值