DB2 ODBC

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am trying to figure out how to construct a Connection statement for DB2 via
ODBC.

According to the "ConnectionStrings.com", it should have the following
information.

driver={IBM DB2 ODBC
DRIVER};Database=myDbName;hostname=myServerName;port=myPortNum;protocol=TCPIP; uid=myUserName; pwd=myPwd

I'm not sure what some of this information is. I am looking in the
"DB2CLI.INI" file, which is the only place I know of where connection
information is kept and I do not see anything which identifies port, protocol
(although I presume it is probably TCPIP). I see somthing which identifies
"Alias", which I am guessing is either Host Name or Database name. Is the
DB2CLI.ini the file that I should be looking at to gather this information.
If so, How do I find the the connection string information which is required?

Thanks in advance for your assistance!!!!
 
Something to try until a better answer comes (im not a DB2 expert)...

for hostname use the ip address of the machine holding the database

for port try 5179 (default port for DB2)

GL
 
If does not work the previous idea…

First try also the 5000 port since sometimes is so configured.

To help you I will need the answer to the following questions:
So you have the DSN created?
Or you want to create him programmatically?
What DB2 you use (a iSeries one (not on PC))
 
So you have the DSN created? YES

Or you want to create him programmatically? It is something I want to be
able to do, as I do not intend to place a DSN on the server.

What DB2 you use (a iSeries one (not on PC)) . It is a mainframe version of
DB2 Z/OS. The version of DB2 Connect is 8.1.5.
 
Back
Top