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. 他们在军训,我在搞 OI(Ending)

    Day 7 上午看看数学书,老师让我把导数相关的概念学了.这也没有多高大上,就是一坨公式需要背,什么 (a)' = 0 啦,什么 (xn)' = n·xn-1 啦,什么 sin'(x) = cos(x ...

  2. SSH-Struts第四弹:Struts2学习过程中遇到的问题

    1.2014-03-27 22:03:10 问题点:在struts.xml中进行常量的配置:devMode=true不起作用,还是必须重新启动tomcat,才能使修改过的struts.xml和Acti ...

  3. Genymotion加速下载虚拟镜像速度慢失败Connection timeout

    Genymotion也算是个android的模拟程序了, Add new device后下载速度太慢了,容易失败 解决方法有二: 1.设置HTTP代理,在Setting->Network,自己设 ...

  4. POJ 1390 Block

    Description 给你一堆块,每个块有颜色,每次可以消去相邻颜色块,并获得块大小平方的分数,求最高得分. Sol DP/记忆化搜索. \(f[i][j][k]\) 表示 \((i,j)\) 这个 ...

  5. 13 HashTable抽象哈希表类——Live555源码阅读(一)基本组件类

    这是Live555源码阅读的第一部分,包括了时间类,延时队列类,处理程序描述类,哈希表类这四个大类. 本文由乌合之众 lym瞎编,欢迎转载 http://www.cnblogs.com/oloroso ...

  6. Servlet的使用方法详细说明

    Servlet的生命周期方法: init() destroy() doGet(HttpServletRequest request,HttpServletResponse response) 客户端请 ...

  7. HTML 返回顶部的样式

    .fhdb{ width:50px; height:50px; position:fixed;   //可以用来定义元素的固定定位. right:20px;      //距离右侧20像素 botto ...

  8. 手动fsck修复

    [转自]http://blog.chinaunix.net/uid-26719405-id-3781541.html 由于硬盘常年读写,系统会造成系统文件损坏,导致重启后无法登陆到系统, fsck不仅 ...

  9. 8. javacript高级程序设计-BOM

    1. BOM 1.1 window BOM的核心对象是window,它表示浏览器的一个实例.在浏览器中,window对象有双重身份, 1.1.1 全局作用域 由于window对象同时扮演着ECMASc ...

  10. MySQL 通过idb文件恢复Innodb 数据【转】

    昨晚收到一则求助,一个用户的本地数据库的重要数据由于误操作被删除,需要进行紧急恢复,用户的数据库日常并没有进行过任何备份,binlog也没有开启,所以从备份和binlog入手已经成为不可能,咨询了丁奇 ...