经典资料,WORD文档,可编辑修改,欢迎下载交流。 常出现莫名其妙的现象,好象没有被调用一样,最后将名字改短了,之后恢复正常。 3.22 怎样获得自己的数据库连接句柄 SQL目前好象还没有什么办法。 C的可以使用CLI编程得到,在samples\\cli\\dbconn.c中有例子。实际上就可以将pid及ppid及连接句柄记录下来写到库中,便于管理。 3.23 类似于ORACLE的Name pipe 有时在做事物的时候,有些类似于登录信息等是和事务的成功与失败是无关的,无论结果如何都应该把这些内容记录下来。 Oracle有一种name pipe的机制,可以将信息输出到数据库外一个指定的文件中去,然后在写一个c的服务程序不断轮循这个文件,读出其中的信息,再写回到数据库中。 Db2的Sql是不能实现这个功能的,但是可以使用sqc写c的存储过程来实现这个功能。 3.24 类似于ORACLE的TRUNCATE清表但不记日志的做法 db2 \table tmp_testalt activate not logged initially with empty table \但这个表定义的时候一定要有not logged initially选项 3.25 用cli编程批量的insert 据说比import要快很多,下面是例子 /*HongTao, you should create a table fetchscrolltable(col1 char(13),col2 char(13)) first for running this sample program. Any concern, pls feel free to call me! (See attached file: tbread.c) */ /****************************************************************************** ** ** Source File Name = tbread.c %I% ** ** Licensed Materials - Property of IBM ** ** (C) COPYRIGHT International Business Machines Corp. 经典资料,WORD文档,可编辑修改,欢迎下载交流。 16 经典资料,WORD文档,可编辑修改,欢迎下载交流。 1995, 2000 ** All Rights Reserved. ** ** US Government Users Restricted Rights - Use, duplication or ** disclosure restricted by GSA ADP Schedule Contract with IBM Corp. ** ** ** PURPOSE : ** Shows how to read tables. ** ** For more information on programming in CLI see the: ** - \CLI Applications\section of the Application Building Guide, and the ** - CLI Guide and Reference. ** ** For more information on the SQL language see the SQL Reference. ** *******************************************************************************/ #include
数据库管理系统DB2手册112页 - 图文(4)
2019-01-19 17:43
数据库管理系统DB2手册112页 - 图文(4).doc
将本文的Word文档下载到电脑
下载失败或者文档不完整,请联系客服人员解决!