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.

 
Go Back  dBforums > Database Server Software > DB2 > unixodbc

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 05-23-07, 05:42
levin7 levin7 is offline
Registered User
 
Join Date: May 2007
Posts: 7
unixodbc

hello, i need you help
i have two pc on the network
1.PC - db2 server with databace "CENTRALA"

2. PC is client with unix odbc , i am using db2_v9_linux_db2driver_for_odbc_cli as driver for unix odbc

slavo@bedna:~$ cat /etc/odbc.ini
[CENTRALA]
Driver=DB2
Description=DB2
Database=CENTRALA

slavo@bedna:~$ cat /etc/odbcinst.ini
[DB2]
Description = ODBC for DB2
Driver = /opt/ibm/db2/V9.1/lib32/libdb2.so
FileUsage = 1
DontDLClose = 1

but connection does not work, when i test it from DataManager (included in unixodbc), i always get error code " [08001][unixODBC][IBM][CLI Driver] SQL1013N The database alias name or database name "CENTRALA" could not be found. SQLSTATE=42705"

thak you
Reply With Quote
  #2 (permalink)  
Old 05-23-07, 06:30
grofaty grofaty is offline
Registered User
 
Join Date: Jan 2003
Posts: 1,570
Hi,
it looks like there is something wrong with ODBC connection.

1. ucatalog odbc connection:
Code:
db2 uncatalog system odbc data source centrala
2. Create ODBC connection:
Code:
db2 catalog system odbc data source centrala
P.S. I have tested this on Windows box, because I don't have access to Unix box.
Hope this helps,
Grofaty

Last edited by grofaty; 05-23-07 at 06:38.
Reply With Quote
  #3 (permalink)  
Old 05-23-07, 09:00
levin7 levin7 is offline
Registered User
 
Join Date: May 2007
Posts: 7
thanks but ...

this command returns this
SQL1297N This command is currently not supported on this platform.
Reply With Quote
  #4 (permalink)  
Old 05-23-07, 09:06
levin7 levin7 is offline
Registered User
 
Join Date: May 2007
Posts: 7
how can i set server hostname or ip ?
Reply With Quote
  #5 (permalink)  
Old 05-23-07, 10:08
n_i n_i is offline
:-)
 
Join Date: Jun 2003
Location: Toronto, Canada
Posts: 4,449
Can you connect from the DB2 command line processor?

Try cataloging the database first:

db2 catalog tcpip node myserver remote <server ip or hostname> server <DB2 port number>
db2 catalog database centrala at node myserver
Reply With Quote
  #6 (permalink)  
Old 05-24-07, 02:35
levin7 levin7 is offline
Registered User
 
Join Date: May 2007
Posts: 7
:)

in the client i dont have db2 command ... but on the server connection works locally
sorry i am new to db2, maybe i dont understand what you mean ...
and on the 2.pc i have only unixodbc with cli driver , there is no db2cc or somethik like this ...
but when i want add odbc sources in windows xp i must add it first to db2cc

Last edited by levin7; 05-24-07 at 03:36.
Reply With Quote
  #7 (permalink)  
Old 05-24-07, 10:34
levin7 levin7 is offline
Registered User
 
Join Date: May 2007
Posts: 7
it works! thank for your help
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On