Establishing DB2 ODBC connection

db2odbc

I am trying to establish a DB2 ODBC connection from my system. I installed the DB2 driver from IBM and i tried creating a system DSN. I got the following options:
Data Source Name, Database Alias (Empty Drop down along with a Add button), Description.
I do not know where to enter the IP of the server and the database name.
When i click on the Add button, I get the textboxes to enter the UserID and Password. I tried entering them and a system DSN was created. I clicked on the DSN that was created and selected Configure button, to test the connection. It asked me to enter the password. When i entered the password and clicked on Connect button, I get a message stating that SQL1013N The Database alias name or database name "" cannot be found. SQLSTATE = 42705

I am not supposed to install DB2 on my machine.
Please help me in resolving this.

Best Answer

Follow below steps, you will be successful in creating DSN. 1. Give DSN name in Data Source Name File (Name can be any user name eg: DSN_TEST) 2. Click in Add button 3. A new window is opened which has tabs 4. on first tab give user name and password 5. Second tab: Give database name, alias name (Preferebally give both with same name) Host field give IP address of database server and finally Port field give port number 6. click on ok 7. Go to system DSN now double on create DSN and test connection. 8. Now your DSN got created.

Let me know if you still face any issue

Related Topic