https://www.ibm.com/support/knowledgecenter/SSEPGG_10.5.0/com.ibm.db2.luw.apdv.embed.doc/doc/c0005563.html

Binding embedded SQL packages to a database

 

Binding is the process of creating a package from a bind file and storing it in a database.

Application, bind file, and package relationships

Database applications use packages for some of the same reasons that applications are compiled: improved performance and compactness. By precompiling an SQL statement, the statement is compiled into the package when the application is built, instead of at run time. Each statement is parsed, and a more efficiently interpreted operand string is stored in the package. At run time, the code generated by the precompiler calls run-time services database manager APIs with any variable information required for input or output data, and the information stored in the package is executed.

The advantages of precompilation apply only to static SQL statements. SQL statements that are executed dynamically (using PREPARE and EXECUTE or EXECUTE IMMEDIATE) are not precompiled; therefore, they must go through the entire set of processing steps at run time.

With the DB2® bind file description (db2bfd) utility, you can easily display the contents of a bind file to examine and verify the SQL statements within it. You can also display the precompile options used to create the bind file using the DB2 bind file description (db2bfd) utility. This can be useful in problem determination related to the bind file for your application.

You can set the STATICASDYNAMIC string on the GENERIC parameter of the BIND command to "yes" to instruct the DB2 database manager to store all statements in the catalogs and mark them as incremental bind. At run time, when the package is first loaded, the database manager uses the current session environment (rather than the package) to set up the section entries and other entities (text is populated and the package cache is accessed). Thereafter, the statements in the bound file behave the same as they would if you were using dynamic SQL. For example, sections will be implicitly recompiled for Database Definition Language invalidations, special register updates, and so on. The DB2 database manager provides this feature to facilitate the migration of embedded SQL C applications from other database systems.

 
Concept topic

db2 bind on luw的更多相关文章

  1. DB2 bind on z/os

    BIND and REBIND options for packages and plans There are several options you can use for binding or ...

  2. DB2常用命令

    DB2安装启动服务中启动不了,可用command启动并查看windows系统的日志.1.启动数据库  db2start2.停止数据库  db2stop3.连接数据库运行 db2命令之前要先运行db2c ...

  3. DB2 常用命令小结

    . 打开命令行窗口 #db2cmd . 打开控制中心 # db2cmd db2cc . 打开命令编辑器 db2cmd db2ce =====操作数据库命令===== . 启动数据库实例 #db2sta ...

  4. DB2操作命令

    本文详细汇总了DB2的常用操作命令,分享给大家.对于使用db2的朋友可以参考下. DB2数据库管理客户端从v9.7版本之后就不再带有控制中心了,而是使用 Data Studio Client.安装 D ...

  5. db2常用命令大全

    #显示这个DB2错误的解释信息(SQLSTATE 5位数字)db2 ? 42704 #显示这个SQLCODE的解释信息(SQLCODE 四位数字) db2 ? SQL0204N ##查看数据库指定配置 ...

  6. db2操作 连接、备份、恢复db2

    先deactivate后再start standby再primary报错不能启动hadr standby的时候,先restore,但是别rollback,直接start hadr as standby ...

  7. db2 常用命令(二)

    1. 打开命令行窗口 #db2cmd 2. 打开控制中心 # db2cmd db2cc 3. 打开命令编辑器 db2cmd db2ce   ======脚本文件操作命令=======  -- 执行脚本 ...

  8. DB2使用笔记

    1.赋予用户LOAD权限的步骤   使用实例用户db2inst1登录数据库:     使用命令db2 update dbm cfg using sysadm_group dasadm1给管理员用户组d ...

  9. DB2 基本概念

    DB2基本概念——实例,数据库,模式,表空间   DB2支持以下两种类型的表空间:     1. 系统管理存储器表空间(SMS-SYSTEM   MANAGED   STORAGE)     2. 数 ...

随机推荐

  1. 批处理快速更改ip地址

    在各种网络中切换,windows更换ip地址步骤:  进入控制面板--网络和internet--网络和共享中心--理性适配器设置--然后找到网卡--进入属性--然后internet 协议--更改ip信 ...

  2. Unity手游之路<十二>手游资源热更新策略探讨

    http://blog.csdn.net/janeky/article/details/17666409 上一次我们学习了如何将资源进行打包.这次就可以用上场了,我们来探讨一下手游资源的增量更新策略. ...

  3. javascript,检测对象中是否存在某个属性

    检测对象中属性的存在与否可以通过几种方法来判断. 1.使用in关键字. 该方法可以判断对象的自有属性和继承来的属性是否存在. var o={x:1}; "x" in o; //tr ...

  4. COGS 2437 暗之链锁 II 题解

    [题意] 给出一个有n个点的无向图,其中有n-1条主要边且这些主要边构成一棵树,此外还有m条其他边,求斩断原图的一条主要边和k条其他边使得图不连通的方案数mod109+7的值. 注意,就算你切断一条主 ...

  5. [ruby on rails] 跟我学之(10)数据输入验证

    这里简单加上几个验证,非空,最小长度,唯一 修改模型 修改app/models/post.rb文件,如下: class Post < ActiveRecord::Base #attr_acces ...

  6. quickLinux

    在cmd下稍微模仿一下linux的习惯...配置...主要是环境变量...就不用说了吧... time 要用 time.exe...可以计时...这个命令接受一个命令...可以中间有空格... ls直 ...

  7. phpcms访问顶级栏目,自动跳到第一个子栏目

    在顶级栏目的category页放入如下代码: <?php if($child){ $child_arrary=explode(',',$arrchildid); $to_url=$CATEGOR ...

  8. 转:jQuery弹出二级菜单

    <html> <head> <meta http-equiv="content-type" content="text/html; char ...

  9. JavaScript——Window对象

    1.serTimeout()和setinterval()可用于注册在指定的时间之后单词或者重复调用的函数. 2.window对象的location属性引用的是Location对象,表示该窗口当前显示的 ...

  10. Python之调用WebService:suds

    suds官方: https://fedorahosted.org/suds/wiki/Documentation 互联网公开WSDL: http://www.webxml.com.cn/zh_cn/w ...