• How to configure ODBC DSN to access local DB2 for Windows



    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:winntsystem32drivers in windows 2000 or c:windowssystem32drivers 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

     

     



  • 相关阅读:
    关于课内外读物的建议
    c# Aes加解密
    web api 如何通过接收文件流的方式,接收客户端及前端上传的文件
    c# 文件夹权限
    mysql 8创建远程访问用户以及连接mysql速度慢的解决方法
    为什么读书?读书让我们明心见性!
    大部分教程不会告诉你的 12 个 JS 技巧
    nuget包管理nuget服务器发布包时出现请求报错 406 (Not Acceptable)
    Python 实现毫秒级淘宝、京东、天猫等秒杀抢购脚本
    eos的资源和工具列表
  • 原文地址:https://www.cnblogs.com/wuyida/p/6300739.html
Copyright © 2020-2023  润新知