Results 1 to 15 of 15
  1. #1
    Join Date
    Nov 2009
    Posts
    8

    Unanswered: Problem in ODBC connectivity, please help

    Hi,

    I facing a problem in ODBC connectivity.

    i have 2 DB namely A (Production), B (Development) and C (Client).

    i installed db2 client in C and create ODBC connection to A and B

    However, when i test the ODBC connection to one of the database in B, i found out that its actually connecting to one of the DB in A

    I noticed this because when i key in password for B in ODBC connection, the connection failed. However, if i key in password for A in this ODBC connection,
    the connection successful.

    (Please take note that i created this ODBC connection is to B and not A)

    C using Windows server 2003


    Anyone facing this problem before? Please help.

  2. #2
    Join Date
    Jun 2003
    Location
    Toronto, Canada
    Posts
    5,516
    Provided Answers: 1
    Quote Originally Posted by stupidcute View Post
    (Please take note that i created this ODBC connection is to B and not A)
    How do you know that?
    ---
    "It does not work" is not a valid problem statement.

  3. #3
    Join Date
    Nov 2009
    Location
    Bangalore
    Posts
    25
    Verify the ODBC connection settings. Check db2cli.ini

    Regards,
    Sawan Gupta

  4. #4
    Join Date
    Nov 2009
    Posts
    8
    Database name in A(Production) is TEST
    Database name in B(Development) is TEST.

    I connect to B database but it connect A

    ODBC Setting as below:

    DATA SOUCE TAB

    Data Source Name : TEST



    TCP/IP TAB

    DATABASENAME: TEST
    DATABASE ALIAS:TEST
    HOSTNAME: B
    Port :50000

  5. #5
    Join Date
    Nov 2009
    Location
    Bangalore
    Posts
    25
    On the client C, is production db cataloged with same alias name ?

  6. #6
    Join Date
    Nov 2009
    Posts
    8
    Quote Originally Posted by sawangupta View Post
    On the client C, is production db cataloged with same alias name ?
    Hmmm.... how to check the production db cataloged same with alias name in client C?


    I do not understand what is the db cataloged, can explain more?


    I saw db2cli.ini

    A (Production)

    [TEST]
    DBALIAS=TEST

    B (Development)

    [TEST]
    DBALIAS=TEST


    C (Client)

    [TEST]
    DBALIAS=TEST

  7. #7
    Join Date
    Nov 2009
    Posts
    8
    Thanks for your reply Sawangupta.

    Hope you can assist me....

  8. #8
    Join Date
    Nov 2009
    Location
    Bangalore
    Posts
    25
    With the catalogued db I meant the db directory.

    Does "db2 list db directory" & "db2 list node directory" shows any entry for the production database with alias TEST ?


    Which driver are you using at the client ? Runtime client ?

  9. #9
    Join Date
    Nov 2009
    Posts
    8
    Hi,

    I have checked the entries by using the command that you given at above.

    I found out that the DB Alias=TEST is "tie" to my production server ip.

    Can i know
    (i) How to remove the node record that tie to my Prod DB IP?
    (ii) How to remove the db record and recreate my db record so that it will tie to my development IP?

    Thanks in advance.


    Regards,

  10. #10
    Join Date
    Nov 2009
    Location
    Bangalore
    Posts
    25
    Use

    db2 uncatalog db <dbalias>
    db2 uncatalog node <node-name>

  11. #11
    Join Date
    Nov 2009
    Posts
    8
    Hi,

    I follow your instructions, the node and db already removed.

    Then i readd the "TEST" in ODBC,

    and check with "db2 list db directory" & "db2 list node directory" again

    the node directory is pointed to B (development) now.


    however when i query table using the newly created ODBC connection, it shows table in

    production DB but not table in development DB.



    ** i use IBM - DB2 Run-Time Client Lite **


    Thanks

  12. #12
    Join Date
    Nov 2009
    Location
    Bangalore
    Posts
    25
    Could you please take a CLI Trace.

    IBM DB2 9.7 for Linux, UNIX and Windows Information Center

    Regards,
    Sawan Gupta

  13. #13
    Join Date
    Nov 2009
    Posts
    8
    Quote Originally Posted by sawangupta View Post
    Could you please take a CLI Trace.

    IBM DB2 9.7 for Linux, UNIX and Windows Information Center

    Regards,
    Sawan Gupta
    hi,

    Thanks for your advice.


    I uninstall DB2 client in C and reinstall

    again. Then i readd the "TEST" database(B(development)) in C(Client) ODBC

    connection. The connection is successful.


    Is it only can add one connection in ODBC if the database(TEST) name is

    same and both database is in different environment (A(production), B

    (development))??


    Thank you very much

  14. #14
    Join Date
    Jun 2003
    Location
    Toronto, Canada
    Posts
    5,516
    Provided Answers: 1
    Quote Originally Posted by stupidcute View Post


    Is it only can add one connection in ODBC if the database(TEST) name is

    same and both database is in different environment (A(production), B

    (development))??

    No. You catalog databases under different alias ("catalog db test as testdev at node devhost"), then create an ODBC data source referring to the alias.
    ---
    "It does not work" is not a valid problem statement.

  15. #15
    Join Date
    Nov 2009
    Posts
    8
    Thanks n_i.....

Posting Permissions

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