Results 1 to 11 of 11
\r\n \r\n\r\n \r\n \r\n
\r\n
\r\n
\r\n Hi All,
\n
\nI\'m an Oracle guy living in a DB2 world, at the moment, and I\'ve been asked to install the IBM Data Server Drivers 9.7 (32 and 64) on a Windows environment.
\n
\nI\'ve successfully done this and I\'ve made an ODBC connection to a test DB. There are a few things I\'m not really clear on though and I\'d like to understand them better before I call this project complete.
\n
\n1. For ODBC or JDBC connections, should I use the db2dsdriver.cfg or the db2cli.ini ? Could someone help me with examples of when I should use cfg versus ini? I\'ve validated connectivity with "db2cli -validate" but what I\'ve done may not be "best practices."
\n
\n2. In Windows, when you launch ODBC Data Source Administrator and you create a System DSN, I select the correct DB2 driver and I\'m presented with 3 boxes: a Data Source Name text field, a Data Alias pulldown, and a Description field. How do I get the Data Alias to populate? In Oracle this would populate via the tnsnames.ora. I haven\'t found out how to do this in DB2. I apologize if this is something simple I\'m overlooking. Be kind ;-)
\n
\n3. Could someone help me with best configuration practices for the db2ddsdriver.cfg? I\'m looking at the IBM Docs (IBM DB2 9.7 Information Center for Linux, UNIX, and Windows) and I don\'t understand the difference between the "dsncollection" and "databases" collection -' + '- do I need both? what are best practices for populating this file? I keep reading and re-reading the definitions IBM has provided for both and I find myself going cross eyed. The example is (or maybe I am) too simple to understand.
\n
\nThanks in advance!
\n
\nRegards,
\nRich
\r\n
\r\n
\r\n\r\n \r\n\r\n\r\n
\r\n \r\n \r\n
\r\n \r\n Last edited by rcevans; 03-20-13 at 12:13.\r\n \r\n \r\n Reason: added 9.7 version\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n \r\n \r\n \r\n Reply With Quote Reply With Quote \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n
\r\n\r\n'; pd[6586070] = '\r\n
  • \r\n
    \r\n
    \r\n \r\n \r\n \r\n \r\n #2\r\n \r\n \r\n \r\n \r\n \r\n
    \r\n\r\n
    \r\n
    \r\n \r\n
    \r\n \r\n
    \r\n \r\n \r\n
    \r\n n_i is offline\r\n\r\n \r\n \r\n :-)\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n
    \r\n
    \r\n \r\n
    \r\n
    \r\n
    Join Date
    Jun 2003
    \r\n
    Location
    Toronto, Canada
    \r\n \r\n
    Posts
    5,516
    \r\n \r\n
    \r\n \r\n
    Provided Answers: 1
    \r\n
    \r\n \r\n
    \r\n
    \r\n\r\n
    \r\n \r\n
    \r\n \r\n \r\n\r\n \r\n \r\n
    \r\n
    \r\n
    \r\n
    \r\n
    \r\n
    \r\n
    \r\n \r\n
    \r\n Quote Originally Posted by rcevans\r\n View Post\r\n
    \r\n

    \r\n1. For ODBC or JDBC connections, should I use the db2dsdriver.cfg or the db2cli.ini ? Could someone help me with examples of when I should use cfg versus ini? I\'ve validated connectivity with "db2cli -validate" but what I\'ve done may not be "best practices."
    \r\n \r\n
    \r\n
    \r\n
    db2cli.ini is not used for JDBC clients, only for CLI/ODBC (which is essentially the same thing) clients. My suggestion would be to use db2dsdriver.cfg for data source configuration. You may still need to use db2cli.ini for certain configuration options if your ODBC applications require them.
    \r\n
    \r\n
    \r\n
    \r\n
    \r\n
    \r\n \r\n
    \r\n Quote Originally Posted by rcevans\r\n View Post\r\n
    \r\n
    2. In Windows, when you launch ODBC Data Source Administrator and you create a System DSN, I select the correct DB2 driver and I\'m presented with 3 boxes: a Data Source Name text field, a Data Alias pulldown, and a Description field. How do I get the Data Alias to populate?
    \r\n \r\n
    \r\n
    \r\n
    I don\'t have a Windows machine handy to verify this, but my guess would be that the pull-down menu will be populated from the dsncollection element in db2dsdriver.cfg
    \r\n
    \r\n
    \r\n
    \r\n
    \r\n
    \r\n \r\n
    \r\n Quote Originally Posted by rcevans\r\n View Post\r\n
    \r\n
    I don\'t understand the difference between the "dsncollection" and "databases" collection -' + '- do I need both?
    \r\n \r\n
    \r\n
    \r\n
    The dsncollection element contains a list of data source names for use by the ODBC/CLI driver. What identifies a database in DB2 is the server hostname, port, and the actual database name. Each dsn element names the data source for a particular database.
    \r\n
    \r\nIn the databases element you can set specific configuration parameters for each database connection, when necessary. I would venture to guess that you don\'t need to create the individual database elements in it, unless you need to specify certain parameters, but the databases section itself may be required. Again, I have not verified that.
    \r\n
    \r\n
    \r\n\r\n \r\n\r\n\r\n
    \r\n \r\n \r\n \r\n \r\n
    -' + '-' + '-
    \r\n"It does not work" is not a valid problem statement.
    \r\n \r\n \r\n
    \r\n
    \r\n
    \r\n
    \r\n \r\n \r\n \r\n \r\n \r\n Reply With Quote Reply With Quote \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n
    \r\n
    \r\n
    \r\n
  • \r\n'; pd[6586089] = '\r\n
  • \r\n
    \r\n
    \r\n \r\n \r\n \r\n \r\n #3\r\n \r\n \r\n \r\n \r\n \r\n
    \r\n\r\n
    \r\n
    \r\n \r\n
    \r\n \r\n
    \r\n \r\n \r\n
    \r\n rcevans is offline\r\n\r\n \r\n \r\n Registered User\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n
    \r\n
    \r\n \r\n
    \r\n
    \r\n
    Join Date
    Mar 2013
    \r\n \r\n \r\n
    Posts
    8
    \r\n \r\n
    \r\n \r\n \r\n
    \r\n \r\n
    \r\n
    \r\n\r\n
    \r\n \r\n
    \r\n \r\n \r\n
    \r\n \r\n\r\n \r\n \r\n
    \r\n
    \r\n
    \r\n @n_i: Thank you very much for the prompt and thorough reply! I too thought the dnscollection element would populate the Data Alias pulldown but so far no luck. It still could, I\'m not ruling out user error yet ;-)
    \n
    \n@sathyaram_s: Thank you for the prompt reply and the link. I\'ll review it and add it to my bookmarks.
    \r\n
    \r\n
    \r\n\r\n \r\n\r\n\r\n
    \r\n \r\n \r\n
    \r\n \r\n Last edited by rcevans; 03-20-13 at 15:34.\r\n \r\n \r\n Reason: clarified my response.\r\n \r\n
    \r\n \r\n \r\n \r\n \r\n \r\n \r\n
    \r\n
    \r\n
    \r\n
    \r\n \r\n \r\n \r\n \r\n \r\n Reply With Quote Reply With Quote \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n
    \r\n
    \r\n
    \r\n
  • \r\n'; pd[6586073] = '\r\n
  • \r\n
    \r\n
    \r\n \r\n \r\n \r\n \r\n #4\r\n \r\n \r\n \r\n \r\n \r\n
    \r\n\r\n
    \r\n
    \r\n \r\n
    \r\n \r\n
    \r\n \r\n \r\n
    \r\n sathyaram_s is offline\r\n\r\n \r\n \r\n Super Moderator\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n
    \r\n
    \r\n \r\n
    \r\n
    \r\n
    Join Date
    Aug 2001
    \r\n
    Location
    UK
    \r\n \r\n
    Posts
    4,650
    \r\n \r\n
    \r\n \r\n \r\n
    \r\n \r\n
    \r\n
    \r\n\r\n
    \r\n \r\n
    \r\n \r\n \r\n\r\n \r\n \r\n
    \r\n
    \r\n
    \r\n For an overview,
    \nODBC and CLI Development for DB2 and DB2 Connect FAQs - Wikis
    \r\n
    \r\n
    \r\n\r\n \r\n\r\n\r\n
    \r\n \r\n \r\n \r\n \r\n
    Visit the new-look IDUG Website , register to gain access to the excellent content.
    \r\n \r\n \r\n
    \r\n
    \r\n
    \r\n
    \r\n \r\n \r\n \r\n \r\n \r\n Reply With Quote Reply With Quote \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n
    \r\n
    \r\n
    \r\n
  • \r\n'; pd[6586105] = '\r\n
  • \r\n
    \r\n
    \r\n \r\n \r\n \r\n \r\n #5\r\n \r\n \r\n \r\n \r\n \r\n
    \r\n\r\n
    \r\n
    \r\n \r\n
    \r\n \r\n
    \r\n \r\n \r\n
    \r\n n_i is offline\r\n\r\n \r\n \r\n :-)\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n
    \r\n
    \r\n \r\n
    \r\n
    \r\n
    Join Date
    Jun 2003
    \r\n
    Location
    Toronto, Canada
    \r\n \r\n
    Posts
    5,516
    \r\n \r\n
    \r\n \r\n
    Provided Answers: 1
    \r\n
    \r\n \r\n
    \r\n
    \r\n\r\n
    \r\n \r\n
    \r\n \r\n \r\n\r\n \r\n \r\n
    \r\n
    \r\n
    \r\n Ok, so I tested this out of curiousity. Windows 7 64 bit, DB2 9.7 fix pack 7 runtime client installation.
    \n
    \nThe list of aliases in the IBM ODBC driver configuration comes from the CLI catalog (refer to the CATALOG NODE and CATALOG DATABASE commands in the manual). This is the traditional way of storing the connection information for the DB2 CLI clients.
    \n
    \nIf you choose to use db2dsdriver.cfg instead (which might be a good idea if you use both ODBC/CLI and JDBC clients, since they both can obtain data source definitions from the file) you can use db2cli registerdsn command (e.g. db2cli registerdsn -add -alldsn) to automatically register the data sources with the Windows ODBC driver manager.
    \r\n
    \r\n
    \r\n\r\n \r\n\r\n\r\n
    \r\n \r\n \r\n \r\n \r\n
    -' + '-' + '-
    \r\n"It does not work" is not a valid problem statement.
    \r\n \r\n \r\n
    \r\n
    \r\n
    \r\n
    \r\n \r\n \r\n \r\n \r\n \r\n Reply With Quote Reply With Quote \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n
    \r\n
    \r\n
    \r\n
  • \r\n'; pd[6586109] = '\r\n
  • \r\n
    \r\n
    \r\n \r\n \r\n \r\n \r\n #6\r\n \r\n \r\n \r\n \r\n \r\n
    \r\n\r\n
    \r\n
    \r\n \r\n
    \r\n \r\n
    \r\n \r\n \r\n
    \r\n rcevans is offline\r\n\r\n \r\n \r\n Registered User\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n
    \r\n
    \r\n \r\n
    \r\n
    \r\n
    Join Date
    Mar 2013
    \r\n \r\n \r\n
    Posts
    8
    \r\n \r\n
    \r\n \r\n \r\n
    \r\n \r\n
    \r\n
    \r\n\r\n
    \r\n \r\n
    \r\n \r\n \r\n\r\n \r\n \r\n
    \r\n
    \r\n
    \r\n
    \r\n
    \r\n
    \r\n
    \r\n \r\n
    \r\n Quote Originally Posted by n_i\r\n View Post\r\n
    \r\n
    db2cli.ini is not used for JDBC clients, only for CLI/ODBC (which is essentially the same thing) clients. My suggestion would be to use db2dsdriver.cfg for data source configuration. You may still need to use db2cli.ini for certain configuration options if your ODBC applications require them.
    \n
    \n
    \n
    \nI don\'t have a Windows machine handy to verify this, but my guess would be that the pull-down menu will be populated from the dsncollection element in db2dsdriver.cfg
    \n
    \n
    \n
    \nThe dsncollection element contains a list of data source names for use by the ODBC/CLI driver. What identifies a database in DB2 is the server hostname, port, and the actual database name. Each dsn element names the data source for a particular database.
    \n
    \nIn the databases element you can set specific configuration parameters for each database connection, when necessary. I would venture to guess that you don\'t need to create the individual database elements in it, unless you need to specify certain parameters, but the databases section itself may be required. Again, I have not verified that.
    \r\n \r\n
    \r\n
    \r\n
    \r\n
    \r\n
    \r\n
    \r\n \r\n
    \r\n Quote Originally Posted by n_i\r\n View Post\r\n
    \r\n
    Ok, so I tested this out of curiousity. Windows 7 64 bit, DB2 9.7 fix pack 7 runtime client installation.
    \n
    \nThe list of aliases in the IBM ODBC driver configuration comes from the CLI catalog (refer to the CATALOG NODE and CATALOG DATABASE commands in the manual). This is the traditional way of storing the connection information for the DB2 CLI clients.
    \n
    \nIf you choose to use db2dsdriver.cfg instead (which might be a good idea if you use both ODBC/CLI and JDBC clients, since they both can obtain data source definitions from the file) you can use db2cli registerdsn command (e.g. db2cli registerdsn -add -alldsn) to automatically register the data sources with the Windows ODBC driver manager.
    \r\n \r\n
    \r\n
    \r\n
    Thanks again. I hate to drop an error message on you here but I can\'t find a solution on Google or on this forum. I executed what you provided and it seems like it should work just fine. Unfortunately I\'m getting an error that says "Error: ODBC_ERROR_COMPONENT_NOT_FOUND" for each of the DSNs.
    \n
    \nBelow is an example of the db2dsdriver.cfg with one of our DB2 systems.
    \n
    \nHere is my paired down db2dsdriver.cfg:
    \n
    \n
    \r\n
    Code:
    \r\n
    <configuration>    \n  <dsncollection>       \n   <dsn alias="U_TOOLS" name="TOOLSDB" host="aixudb2" port="50000"/>\n  </dsncollection>     \n</configuration>
    \r\n
    In the first step I validate the DSN and connectivity:
    \n
    \n
    \r\n
    Code:
    \r\n
     C:\\Users\\db2user>db2cli validate -dsn U_TOOLS -connect -user *** -passwd ***\nIBM DATABASE 2 Interactive CLI Sample Program\n(C) COPYRIGHT International Business Machines Corp. 1993,1996\nAll Rights Reserved\nLicensed Materials - Property of IBM\nUS Government Users Restricted Rights - Use, duplication or\ndisclosure restricted by GSA ADP Schedule Contract with IBM Corp.\n  -' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-\n  [ CLI Driver Version  : 09.07.0000 ]\n  [ Informational Tokens: "DB2 v9.7.700.552","s121002","IP23368","Fixpack  7" ]\n  [ CLI Driver Type     : IBM Data Server Driver Package ]\n  [ db2diag.log Path    : C:\\ProgramData\\IBM\\DB2\\C_PROGRA~2_IBM_IBMDAT~1\\db2diag.log ]\n  -' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-\n\n  IBM Data Server Client packages on the current workstation :\n\n  Copyname                     Version     Installed Location\n  -' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-\n  C_PROGRA~2_IBM_IBMDAT~1[C]   09.07.0007  C:\\PROGRA~2\\IBM\\IBMDAT~1\n  IBMDBCL1[D]                  09.07.0007  C:\\Program Files\\IBM\\IBM DATA SERVER DRIVER 64\n\n  -' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-\n\ndb2dsdriver.cfg Schema Validation :\nSuccess: The schema validation operation completed successfully.\nThe configuration file C:\\PROGRA~2\\IBM\\IBMDAT~1\\cfg\\db2dsdriver.cfg is valid\n\ndb2cli.ini Validation :\nNote: The validation operation utility could not find the\nconfiguration file named db2cli.ini.\nThe file is searched at C:\\ProgramData\\IBM\\DB2\\C_PROGRA~2_IBM_IBMDAT~1\\cfg\\db2cli.ini\n\n\ndb2dsdriver.cfg Validation :\n  -' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-\n  [ DB2DSDRIVER_CFG_PATH env var : unset ]\n  [ db2dsdriver.cfg Path         : C:\\PROGRA~2\\IBM\\IBMDAT~1\\cfg\\db2dsdriver.cfg ]\n  -' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-\n  [ List of keywords used for DSN : U_TOOLS ]\n    Keywords                  Valid For     Value\n    -' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-\n    DATABASE                  CLI,.NET,ESQL TOOLSDB\n    HOSTNAME                  CLI,.NET,ESQL aixudb2\n    PORT                      CLI,.NET,ESQL 50000\n  -' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-\n\nConnection Section :\n  -' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-\n  Connecting to: U_TOOLS\n  Connect Status: success\n  End Connection Section\n\nC:\\ProgramData\\IBM\\DB2\\C_PROGRA~2_IBM_IBMDAT~1\\cfg\\\n\nThe validation completed.
    \r\n
    In this step, I try to add the DSN by name:
    \n
    \n
    \r\n
    Code:
    \r\n
    \nC:\\Users\\db2user>db2cli registerdsn -add -dsn U_TOOLS\nIBM DATABASE 2 Interactive CLI Sample Program\n(C) COPYRIGHT International Business Machines Corp. 1993,1996\nAll Rights Reserved\nLicensed Materials - Property of IBM\nUS Government Users Restricted Rights - Use, duplication or\ndisclosure restricted by GSA ADP Schedule Contract with IBM Corp.\n\nDSN                                 Remarks\n-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-\nU_TOOLS                          -  Error: ODBC_ERROR_COMPONENT_NOT_FOUND
    \r\n
    I get the same error with the alldsn switch:
    \n
    \n
    \r\n
    Code:
    \r\n
    C:\\Users\\db2user>db2cli registerdsn -add -alldsn\nIBM DATABASE 2 Interactive CLI Sample Program\n(C) COPYRIGHT International Business Machines Corp. 1993,1996\nAll Rights Reserved\nLicensed Materials - Property of IBM\nUS Government Users Restricted Rights - Use, duplication or\ndisclosure restricted by GSA ADP Schedule Contract with IBM Corp.\n\nDSN                                 Remarks\n-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-\nU_TOOLS                          -  Error: ODBC_ERROR_COMPONENT_NOT_FOUND
    \r\n
    Any thoughts? Again, thanks for your outstanding response! If I need to open up a Service Request (or IBM equivalent name) with IBM please let me know and I\'ll do so.
    \n
    \nRegards,
    \nRich
    \r\n
    \r\n
    \r\n\r\n \r\n\r\n\r\n
    \r\n \r\n \r\n
    \r\n \r\n Last edited by rcevans; 03-21-13 at 16:57.\r\n \r\n \r\n Reason: wordsmithing\r\n \r\n
    \r\n \r\n \r\n \r\n \r\n \r\n \r\n
    \r\n
    \r\n
    \r\n
    \r\n \r\n \r\n \r\n \r\n \r\n Reply With Quote Reply With Quote \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n
    \r\n
    \r\n
    \r\n
  • \r\n'; pd[6586110] = '\r\n
  • \r\n
    \r\n
    \r\n \r\n \r\n \r\n \r\n #7\r\n \r\n \r\n \r\n \r\n \r\n
    \r\n\r\n
    \r\n
    \r\n \r\n
    \r\n \r\n
    \r\n \r\n \r\n
    \r\n n_i is offline\r\n\r\n \r\n \r\n :-)\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n
    \r\n
    \r\n \r\n
    \r\n
    \r\n
    Join Date
    Jun 2003
    \r\n
    Location
    Toronto, Canada
    \r\n \r\n
    Posts
    5,516
    \r\n \r\n
    \r\n \r\n
    Provided Answers: 1
    \r\n
    \r\n \r\n
    \r\n
    \r\n\r\n
    \r\n \r\n
    \r\n \r\n \r\n\r\n \r\n \r\n
    \r\n
    \r\n
    \r\n Which DB2 client edition did you install? Does the IBM DB2 ODBC driver show in the list of available drivers in the Windows driver manager? Also, this probably requires you to run this as Administrator...\r\n
    \r\n
    \r\n\r\n \r\n\r\n\r\n
    \r\n \r\n \r\n \r\n \r\n
    -' + '-' + '-
    \r\n"It does not work" is not a valid problem statement.
    \r\n \r\n \r\n
    \r\n
    \r\n
    \r\n
    \r\n \r\n \r\n \r\n \r\n \r\n Reply With Quote Reply With Quote \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n
    \r\n
    \r\n
    \r\n
  • \r\n'; pd[6586113] = '\r\n
  • \r\n
    \r\n
    \r\n \r\n \r\n \r\n \r\n #8\r\n \r\n \r\n \r\n \r\n \r\n
    \r\n\r\n
    \r\n
    \r\n \r\n
    \r\n \r\n
    \r\n \r\n \r\n
    \r\n rcevans is offline\r\n\r\n \r\n \r\n Registered User\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n
    \r\n
    \r\n \r\n
    \r\n
    \r\n
    Join Date
    Mar 2013
    \r\n \r\n \r\n
    Posts
    8
    \r\n \r\n
    \r\n \r\n \r\n
    \r\n \r\n
    \r\n
    \r\n\r\n
    \r\n \r\n
    \r\n \r\n \r\n\r\n \r\n \r\n
    \r\n
    \r\n
    \r\n
    \r\n
    \r\n
    \r\n
    \r\n \r\n
    \r\n Quote Originally Posted by n_i\r\n View Post\r\n
    \r\n
    Which DB2 client edition did you install? Does the IBM DB2 ODBC driver show in the list of available drivers in the Windows driver manager? Also, this probably requires you to run this as Administrator...
    \r\n \r\n
    \r\n
    \r\n
    Thanks,
    \r\n
    \r\nI installed the IBM Data Server Driver Package 9.7 FP 7, #6 on the list:
    \r\n
    \r\nIBM Support: Fix Central
    \r\n
    \r\nWe chose this because it looks like it supports everything:
    \r\n
    \r\nIBM DB2 9.7 Information Center for Linux, UNIX, and Windows
    \r\n
    \r\nI can make my own Windows "Data Source" ODBC connection successfully -' + '- there is nothing in that Database Alias dropdown but if I click Add I can create one. It works as long as I use the exact name in the db2dsdriver.cfg.
    \r\n
    \r\nI thought about the privilege issue so I opened up a command prompt as administrator (right mouse click, run as administrator) and I received the same error.
    \r\n
    \r\nI can take screenshots and pass them along if you\'d like.
    \r\n
    \r\n
    \r\n\r\n \r\n\r\n\r\n
    \r\n \r\n \r\n \r\n \r\n \r\n
    \r\n
    \r\n
    \r\n
    \r\n \r\n \r\n \r\n \r\n \r\n Reply With Quote Reply With Quote \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n
    \r\n
    \r\n
    \r\n
  • \r\n'; pd[6586125] = '\r\n
  • \r\n
    \r\n
    \r\n \r\n \r\n \r\n \r\n #9\r\n \r\n \r\n \r\n \r\n \r\n
    \r\n\r\n
    \r\n
    \r\n \r\n
    \r\n \r\n
    \r\n \r\n \r\n
    \r\n n_i is offline\r\n\r\n \r\n \r\n :-)\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n
    \r\n
    \r\n \r\n
    \r\n
    \r\n
    Join Date
    Jun 2003
    \r\n
    Location
    Toronto, Canada
    \r\n \r\n
    Posts
    5,516
    \r\n \r\n
    \r\n \r\n
    Provided Answers: 1
    \r\n
    \r\n \r\n
    \r\n
    \r\n\r\n
    \r\n \r\n
    \r\n \r\n \r\n\r\n \r\n \r\n
    \r\n
    \r\n
    \r\n Looks like a botched installation. May be you should contact IBM support. Like I said, I tried the runtime client package on my Windows 7 VM and it seems to work.\r\n
    \r\n
    \r\n\r\n \r\n\r\n\r\n
    \r\n \r\n \r\n \r\n \r\n
    -' + '-' + '-
    \r\n"It does not work" is not a valid problem statement.
    \r\n \r\n \r\n
    \r\n
    \r\n
    \r\n
    \r\n \r\n \r\n \r\n \r\n \r\n Reply With Quote Reply With Quote \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n
    \r\n
    \r\n
    \r\n
  • \r\n'; pd[6586126] = '\r\n
  • \r\n
    \r\n
    \r\n \r\n \r\n \r\n \r\n #10\r\n \r\n \r\n \r\n \r\n \r\n
    \r\n\r\n
    \r\n
    \r\n \r\n
    \r\n \r\n
    \r\n \r\n \r\n
    \r\n rcevans is offline\r\n\r\n \r\n \r\n Registered User\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n
    \r\n
    \r\n \r\n
    \r\n
    \r\n
    Join Date
    Mar 2013
    \r\n \r\n \r\n
    Posts
    8
    \r\n \r\n
    \r\n \r\n \r\n
    \r\n \r\n
    \r\n
    \r\n\r\n
    \r\n \r\n
    \r\n \r\n \r\n\r\n \r\n \r\n
    \r\n
    \r\n
    \r\n
    \r\n
    \r\n
    \r\n
    \r\n \r\n
    \r\n Quote Originally Posted by n_i\r\n View Post\r\n
    \r\n
    Looks like a botched installation. May be you should contact IBM support. Like I said, I tried the runtime client package on my Windows 7 VM and it seems to work.
    \r\n \r\n
    \r\n
    \r\n
    Thanks, I\'ll do that. I really appreciate your support!
    \r\n
    \r\n
    \r\n\r\n \r\n\r\n\r\n
    \r\n \r\n \r\n \r\n \r\n \r\n
    \r\n
    \r\n
    \r\n
    \r\n \r\n \r\n \r\n \r\n \r\n Reply With Quote Reply With Quote \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n
    \r\n
    \r\n
    \r\n
  • \r\n'; pd[6586232] = '\r\n
  • \r\n
    \r\n
    \r\n \r\n \r\n \r\n \r\n #11\r\n \r\n \r\n \r\n \r\n \r\n
    \r\n\r\n
    \r\n
    \r\n \r\n
    \r\n \r\n
    \r\n \r\n \r\n
    \r\n rcevans is offline\r\n\r\n \r\n \r\n Registered User\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n
    \r\n
    \r\n \r\n
    \r\n
    \r\n
    Join Date
    Mar 2013
    \r\n \r\n \r\n
    Posts
    8
    \r\n \r\n
    \r\n \r\n \r\n
    \r\n \r\n
    \r\n
    \r\n\r\n
    \r\n \r\n
    \r\n \r\n \r\n\r\n \r\n \r\n
    \r\n
    \r\n
    \r\n Although they do not show up in the "Database Alias" pulldown they are registered as User DSNs if I modify the command from db2cli to db2cli32, per the fine print @ IBM DB2 9.7 Information Center for Linux, UNIX, and Windows:
    \n
    \n In DB2 Version 9.7 Fix Pack 4 and later fix packs, use the db2cli32 command, instead of the db2cli command, if you are using a 32-bit IBM Data Server Driver along with the 64-bit installer in a 64-bit Windows computer...
    \n
    \n
    \r\n
    Code:
    \r\n
    \nC:\\Users\\db2user>db2cli32 registerdsn -add -alldsn\nIBM DATABASE 2 Interactive CLI Sample Program\n(C) COPYRIGHT International Business Machines Corp. 1993,1996\nAll Rights Reserved\nLicensed Materials - Property of IBM\nUS Government Users Restricted Rights - Use, duplication or\ndisclosure restricted by GSA ADP Schedule Contract with IBM Corp.\n\nDSN                                 Remarks\n-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-' + '-\nU_TOOLS                          -  Successfully added
    \r\n
    What\'s interesting is this is a 64-bit Driver package on a 64-bit system. I reverted to a VM snapshot and only installed the 64-bit package this time.
    \n
    \nI\'ll keep plugging away and if I have anything helpful I\'ll post it here for posterity.
    \r\n
    \r\n
    \r\n\r\n \r\n\r\n\r\n
    \r\n \r\n \r\n
    \r\n \r\n Last edited by rcevans; 03-21-13 at 16:57.\r\n \r\n \r\n Reason: wordsmithing\r\n \r\n
    \r\n \r\n \r\n \r\n \r\n \r\n \r\n
    \r\n
    \r\n
    \r\n
    \r\n \r\n \r\n \r\n \r\n \r\n Reply With Quote Reply With Quote \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n\r\n \r\n \r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n
    \r\n
    \r\n
    \r\n
  • \r\n'; // next/previous post info pn[6586058] = "6586232,6586070"; pn[0] = ",6586058"; pn[6586070] = "6586058,6586089"; pn[6586089] = "6586070,6586073"; pn[6586073] = "6586089,6586105"; pn[6586105] = "6586073,6586109"; pn[6586109] = "6586105,6586110"; pn[6586110] = "6586109,6586113"; pn[6586113] = "6586110,6586125"; pn[6586125] = "6586113,6586126"; pn[6586126] = "6586125,6586232"; pn[6586232] = "6586126,6586058"; // cached usernames pu[0] = guestphrase; pu[314780] = "rcevans"; pu[31334] = "n_i"; pu[752] = "sathyaram_s"; // -->

    Threaded View

    1. #1
      Join Date
      Mar 2013
      Posts
      8

      Unanswered: db2dsdriver.cfg questions

      Hi All,

      I'm an Oracle guy living in a DB2 world, at the moment, and I've been asked to install the IBM Data Server Drivers 9.7 (32 and 64) on a Windows environment.

      I've successfully done this and I've made an ODBC connection to a test DB. There are a few things I'm not really clear on though and I'd like to understand them better before I call this project complete.

      1. For ODBC or JDBC connections, should I use the db2dsdriver.cfg or the db2cli.ini ? Could someone help me with examples of when I should use cfg versus ini? I've validated connectivity with "db2cli -validate" but what I've done may not be "best practices."

      2. In Windows, when you launch ODBC Data Source Administrator and you create a System DSN, I select the correct DB2 driver and I'm presented with 3 boxes: a Data Source Name text field, a Data Alias pulldown, and a Description field. How do I get the Data Alias to populate? In Oracle this would populate via the tnsnames.ora. I haven't found out how to do this in DB2. I apologize if this is something simple I'm overlooking. Be kind ;-)

      3. Could someone help me with best configuration practices for the db2ddsdriver.cfg? I'm looking at the IBM Docs (IBM DB2 9.7 Information Center for Linux, UNIX, and Windows) and I don't understand the difference between the "dsncollection" and "databases" collection -- do I need both? what are best practices for populating this file? I keep reading and re-reading the definitions IBM has provided for both and I find myself going cross eyed. The example is (or maybe I am) too simple to understand.

      Thanks in advance!

      Regards,
      Rich
      Last edited by rcevans; 03-20-13 at 12:13. Reason: added 9.7 version

    Tags for this Thread

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •