| |
|
If this is your first visit, be sure to check out the FAQ by clicking the link above.
You may have to register before you can post: click the register link above to proceed.
To start viewing messages, select the forum that you want to visit from the selection below.
|
 |

11-18-09, 21:45
|
|
Registered User
|
|
Join Date: Nov 2009
Posts: 8
|
|
|
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.
|
|

11-18-09, 22:06
|
|
:-)
|
|
Join Date: Jun 2003
Location: Toronto, Canada
Posts: 4,449
|
|
Quote:
Originally Posted by stupidcute
(Please take note that i created this ODBC connection is to B and not A)
|
How do you know that?
|
|

11-19-09, 00:09
|
|
Registered User
|
|
Join Date: Nov 2009
Location: Bangalore
Posts: 25
|
|
|
|
Verify the ODBC connection settings. Check db2cli.ini
Regards,
Sawan Gupta
|
|

11-19-09, 01:14
|
|
Registered User
|
|
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
|
|

11-19-09, 01:22
|
|
Registered User
|
|
Join Date: Nov 2009
Location: Bangalore
Posts: 25
|
|
On the client C, is production db cataloged with same alias name ?
|
|

11-19-09, 02:01
|
|
Registered User
|
|
Join Date: Nov 2009
Posts: 8
|
|
Quote:
Originally Posted by sawangupta
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
|
|

11-19-09, 02:04
|
|
Registered User
|
|
Join Date: Nov 2009
Posts: 8
|
|
Thanks for your reply Sawangupta.
Hope you can assist me....
|
|

11-19-09, 03:53
|
|
Registered User
|
|
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 ?
|
|

11-19-09, 10:36
|
|
Registered User
|
|
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,
|
|

11-19-09, 18:59
|
|
Registered User
|
|
Join Date: Nov 2009
Location: Bangalore
Posts: 25
|
|
Use
db2 uncatalog db <dbalias>
db2 uncatalog node <node-name>
|
|

11-19-09, 20:29
|
|
Registered User
|
|
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
|
|

11-20-09, 00:04
|
|
Registered User
|
|
Join Date: Nov 2009
Location: Bangalore
Posts: 25
|
|
|
|

11-23-09, 21:37
|
|
Registered User
|
|
Join Date: Nov 2009
Posts: 8
|
|
Quote:
Originally Posted by sawangupta
|
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
|
|

11-24-09, 08:00
|
|
:-)
|
|
Join Date: Jun 2003
Location: Toronto, Canada
Posts: 4,449
|
|
Quote:
Originally Posted by stupidcute
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.
|
|

11-24-09, 23:29
|
|
Registered User
|
|
Join Date: Nov 2009
Posts: 8
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
|