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. 简单实现div遮罩

    顾名思义,div遮罩就是将网页上的一部分用div遮盖起来,防止用户误点,因此div遮罩的一个用途就是将table设置为不可编辑. 作者通过查找资料,并进行简单的测试,最终完成了以下几段简单代码,来实现 ...

  2. iOS开发——UI进阶篇(七)程序启动原理、打电话、发短信

    一.Info.plist常见的设置 1.建立一个工程后,会在Supporting files文件夹下看到一个“工程名-Info.plist”的文件,该文件对工程做一些运行期的配置,非常重要,不能删除 ...

  3. iOS开发——UI进阶篇(四)tableView的全局刷新,局部刷新,左滑操作,左滑出现更多按钮,进入编辑模式,批量删除,自定义批量删除

    首先创建项目,在storyboard如下布局控件,设置好约束 然后创建cell模型类XMGWineCell数据模型类XMGWine创建UITableView,设置数据源协议,实现数据源方法懒加载数据这 ...

  4. canvas 中save和restore的用法

    在创建新的控件或修改现有的控件时,我们都会涉及到重写控件或View的onDraw方法. onDraw方法会传入一个Canvas对象,它是你用来绘制控件视觉界面的画布. 在onDraw方法里,我们经常会 ...

  5. (原创)在service中定时执行网络操作的几点说明

    执行网络操作是耗时操作,即便是在service中也要放到子线程中执行 这里我用到了async-http-client框架来执行异步请求操作 计时用的java原生Timer和TimerTask类 本来这 ...

  6. Dex动态加载

    Dex动态加载是为了解决什么问题? 在Android系统中,一个App的所有代码都在一个Dex文件里面. Dex是一个类似Jar的存储了多个Java编译字节码的归档文件. 因为Android系统使用D ...

  7. Implement a TextView with an animation in its left side

    In my case, I want to write a TextView with an animation in its left side. ImageView + TextView coul ...

  8. SqlServer中的Null值空值问题

    sql使用的是三值谓词逻辑,所以逻辑表达式返回的结果可以为True.False或者未知,在三值逻辑中返回True与不返回False并不完全一样, SQL对查询过滤条件的处理:接受TURE  拒绝FAL ...

  9. Java程序优化的一些最佳实践(转)

    衡量程序的标准 衡量一个程序是否优质,可以从多个角度进行分析.其中,最常见的衡量标准是程序的时间复杂度.空间复杂度,以及代码的可读性.可扩展性.针对程序的时间复杂度和空间复杂度,想要优化程序代码,需要 ...

  10. Portal

    https://chenliang0571.wordpress.com/2013/12/08/openwrt-wifidog-wifi-hotspots/http://www.h3c.com.cn/M ...