How to configure ODBC DSN to access local DB2 for Windows

MA Genfeng

(GuangdongUnitoll Services incorporated, Guangzhou 510300)

Abstract   This article introduces how to configure ODBC DSN in Server to access local DB2 for windows in detail. Then I give asample how to access local DB2 database with ODBC by DB Query Analyzer expediently.

Key words   ODBC; DB Query Analyzer; DB2

1    Get port number ofDB2 instance

We should get port number of DB2 instance at first. Please run db2 command line process,then input ‘DB2 get dbm cfg |find"SVCENAME" ’ to get the SVCENAME db2c_DB2 of DB2 TCP/IP.

Figure 1  Get the SVCENAME db2c_DB2 of DB2 TCP/IP

Click on Start -> Run and type drivers to locate the directory c:\winnt\system32\drivers in windows 2000 or c:\windows\system32\drivers in Windows XP or Win7 and so on. Then open the sub directory etc and open the file services. This is shown in Figure 2.

Figure 2  Locate and open file services

Then you’ll see the port number of db2c_DB2 is 50000 .

2   Configure ODBC DSN in Server

Open the DB2 configuration Assistant first and then start to configure ODBC DSN as it’s shown from Figure 3 to Figure 11.

In Figure we can see 4 DB2 databases created in local Server machine including TOOLSDB, SAMPLE,MGF_DB1 and LIST23. In here I’ll give a sample how to access local DB2 database MGF_DB1 with ODBC by DB Query Analyzer expediently.

Figure 3   Configure ODBC DSN with DB2 configuration Assistant

Figure 4   Configure ODBC DSN with DB2 configuration Assistant

Figure 5   Configure ODBC DSN with DB2 configuration Assistant

Figure 6   Configure ODBC DSN with DB2 configuration Assistant

Input IP Address of computer, if it’s not setted, please input 127.0.0.1.

Figure 7   Configure ODBC DSN with DB2 configuration Assistant

Figure 8   Configure ODBC DSN with DB2 configuration Assistant

Figure 9   Configure ODBC DSN with DB2 configuration Assistant

Figure 10   Configure ODBC DSN with DB2configuration Assistant

Figure 11   Configure ODBC DSN with DB2configuration Assistant

Finally,Click button ‘Finish’ to end the process. In the same way I create another ODBC DSN ‘TOOLSDB’.

Figure 12   Change occurs after two ODBC DSN created

3   Access DB2 database with DB Query Analyzer

DB Query Analyzer is presented by Master Gen feng, Ma from Chinese Mainland. It has English version named ‘DB Query Analyzer’ and Simplified Chinese version named   .

DB Query Analyzer is one of the few excellent Client Tools in the world for its’powerful function, friendly interface, easy operation and applicability to every production of RDBMS.

It lets you query ODBC data sources, author SQL scripts and queries, return query results to a grid or free-form text or a file, retrieve ODBC driver information, execute multiple SQL scripts or stored procedures simultaneously, and more.

In the New products & Tools reviews of programmer second issue of 2007, DB Query Analyzer had been strongly recommended.

Now the Simplified Chinese version of DB Query Analyzer is the top 50 database application software in the famous software website http://xiazai.zol.com.cn/download_order/sub_550.html . In most case it lies the top 20 and it has been download more than 96,000 times.

63 technical articles about DB Query Analyzer have been published or been publishing in computer journal, BAIDU Library, the CSDN resource or my four blog-websites.

Download and install DB Query Analyzer. Then run it and input the DSN ’MGF_DB1’,User Name and Password.

Figure 13  Run DB Query Analzyer

Figure 14  Object View in DB Query Analyzer and fast SQL Script program

 

 

4  63 technical articles about DB Query Analyzer have been published or been publishing in computer journal, Baidu Library, the CSDN resource or my four blog-website.

The following 6 articles have been published in computer journal.

DB Query Analyzer to cancel a running SQL statement in Computer Era 12th issue of 2011 in Hangzhou.

DB Query Analyzer Returns Information in More Detail While Batch SQL Statement End of Execution in Computer Programming Skill & Maintenance 24th issue of 2011 in Beijing

The Application of the Transactions Control in DB2 with DB Query Analyzer in Computer Programming Skill & Maintenance 22nd issue of 2011 in Beijing.

How does DB Query Analyzer cancel the SQL statement committed to DBMS in Computer Engineering & Software 6th issue of 2011 in Tianjin.

The Application of the Transactions Control in Oracle with DB Query Analyzer in Microcomputer Applications 11th issue of 2011 in Shanghai.

    DB Query Analyzer had been strongly recommended In the New products & Tools reviews of programmer 2nd issue of 2007.

The following 57 articles have been published or been publishing in Baidu Library, the CSDN resource or my four blog-website.

The DBMS that DB Query Analyzer Users often use cover all kinds of DBMS have been published.

How to configure ODBC DSN in Client to access remote DB2 for Windows

How to configure ODBC DSN to access local DB2 for Windows

Which SQL statement is the trump card to the senior software developer

Exe packer prevent DB Query Analyzer from being debugged have been published.

13 articles from The 1st tip of DB Query Analyze to The 13th skills of DB Query Analyzer have been published.

The table name must be enclosed in double quotation marks or square bracket while accessing EXCEL by DB Query Analyzer

DB Query Analyzer 5.04 download URL:

http://xiazai.zol.com.cn/detail/43/420901.shtml

http://www.unitedpowersoft.com/UpFile/DBQueryAnalyzer_English_503.rar

DB Query Analyzer Simplified Chinese version 5.04  download URL:

http://xiazai.zol.com.cn/detail/27/264455.shtml

Remarks :

Please uninstall the former version first, then install the latest version.

My blog-sites are http://blog.csdn.net/magenfeng

http://blog.sina.com.cn/magenfeng

http://user.qzone.qq.com/630414817


How to configure ODBC DSN to access local DB2 for Windows的更多相关文章

  1. How to configure ODBC DSN in Client to access remote DB2 for Windows

      How to configure ODBC DSN in Client to access remote DB2 for Windows MA Gen feng (Guangdong Unito ...

  2. 如何在服务器上配置ODBC来访问本机DB2 for Windows服务器

    如何在服务器上配置ODBC来访问本机 DB2 for Windows服务器                         马根峰             (广东联合电子服务股份有限公司, 广州 51 ...

  3. 错误1919,配置ODBC数据源MS Access Database时发生错误ODEC错误

    WIN7 64位旗舰版安装OFFICE2003 提示:“错误1919,配置ODBC数据源MS Access Database时发生错误ODEC错误” 在64位系统上,32位软件的注册表的信息不是直接在 ...

  4. paip.odbc DSN的存储与读取

    paip.odbc DSN的存储与读取 作者Attilax ,  EMAIL:1466519819@qq.com  来源:attilax的专栏 地址:http://blog.csdn.net/atti ...

  5. How To Configure SAMBA Server And Transfer Files Between Linux & Windows

    If you are reading this article it means you have a network at home or office with Windows and Linux ...

  6. 如何在客户端配置ODBC来访问远程DB2 for Windows服务器

    如何在客户端配置ODBC来访问远程DB2 for Windows服务器                                  马根峰                    (广东联合电子服 ...

  7. 配置ODBC DSN数据源,导出数据库数据到Excel过程记录

    一.前言 工作中我们可能遇到这样的需要:查询数据库中的信息,并将结果导出到Excel文件.这本来没什么,但数据量比较大时,用PLSQL.toad导出Excel会出现内存不足等情况,使用odbc+Mic ...

  8. MFC中对基于ODBC对数据ACCESS数据库的增删改查。

    在MFC中可以使用很多方法对数据库进行操作. 什么ODBC  什么ADO之类的,这里要介绍使用的ODBC这种方法,通过本文的阅读可以达初步掌握在MFC里面通过ODBC访问ACCESS数据库. 涉及到的 ...

  9. csharp: read system DSN configured get Driver Names on windows

    using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; usin ...

随机推荐

  1. 迎战大数据-Oracle篇

    来自:http://www.cnblogs.com/wenllsz/archive/2012/11/16/2774205.html 了解大数据带来的机遇: 透视架构与工具: 开源节流,获得竞争优势. ...

  2. 2.QLabel,QPushButton,QLineEdit,QComboBox,QCheckBox,QRadioButton,QTextEdit,QTextBrowser,QGroupBox,QSl

     1.新建一个空项目(其它项目->空QT项目): 2  添加新文件(选择C++Class) MyWidget.h #ifndef MYWIDGET_H #define MYWIDGET_H ...

  3. iOS中让Settings Bundle中的变化立即在App中反应出来的两种方法

    大熊猫猪·侯佩原创或翻译作品.欢迎转载,转载请注明出处. 如果觉得写的不好请多提意见,如果觉得不错请多多支持点赞.谢谢! hopy ;) 为了能够在Settings Bundle中的变化在进入App后 ...

  4. MySQL设计软件登录模块

    学了一段时间的Java了,思量着做一点简单的小模块的东西吧,于是就有了下面的这个简单的小案例. 大致实现的功能就是注册于登录还有就是用到了一点,分层思想.仅此而已,所以非常的适合新手围观. 建立好数据 ...

  5. 高通8x12平台开机画面制作工具

    你可能在网上看到很到关于手动更换手机开机图片的文章,想想自己的开机画面是小两口,好基友的照片多么个性啊.但是你有没有发现,网上下载的什么"一键生成"之类的,在你的手机上不能用啊,( ...

  6. iOS中 最新微信支付/最全的微信支付教程详解 韩俊强的博客

    每日更新关注:http://weibo.com/hanjunqiang  新浪微博! 亲们, 首先让我们来看一下微信支付的流程吧. 1. 注册微信开放平台,创建应用获取appid,appSecret, ...

  7. (NO.00004)iOS实现打砖块游戏(十四):3球道具的实现

    大熊猫猪·侯佩原创或翻译作品.欢迎转载,转载请注明出处. 如果觉得写的不好请告诉我,如果觉得不错请多多支持点赞.谢谢! hopy ;) 反弹棒变化道具实现前面已经介绍过了,我们下面可以在小球上做些文章 ...

  8. Hessian探究(一)Hessian与Spring结合

    上一篇博客Hessian探究(一)Hessian入门示例我们初步简单的介绍了一下Hessian的使用入门示例,由于Spring现在使用的实在是太广泛了,接下来我们介绍一下Hessian和Spring一 ...

  9. tomcat服务器虚拟目录的映射方式

    lWEB应用程序指供浏览器问的程序,通常也简称为web应用 l l一个web应用由多个静态web资源和动态web资源组成,如: •html.css.js文件 •jsp文件.servlet程序.支持ja ...

  10. polaris: 一个用go实现的支持restful的web框架

    介绍 polaris是一个用go实现的支持restful的web框架,主要参考tornado进行设计. 虽然在go里面搭建一个http server非常的简单,这里强烈推荐gorilla,但并没有很好 ...