you can set up 2 different gateways, DG4ODBC which is a generic gateway using 3rd party ODBC drivers or the dedicated DB 2 gateway which is called Database gateway for DRDA and which requires an additional license. Both gateways are available for Windows and Linux.
When you want to configure DG4ODBC on 64bit Linux you first need a 64bit ODBC driver which is able to connect to your DB2 UDB database. Do you already have an ODBC driver which is able to connect? If not, please check with IBM if they provide a 64bit ODBC driver for Linux which is able to connect to the DB3 database on Windows.
Once you have a working ODBC connection, then check out the My Oracle Support Note:
How to Configure DG4ODBC on 64bit Unix OS (Linux, Solaris, AIX, HP-UX Itanium) to Connect to Non-Oracle Databases Post Install [Document 561033.1]
You're currently having an issue with the ODBC driver connecting to the DB2 database.
You can post the odbc.ini file so that Mike or I can have a look at it, but it would be also good to get in touch with the ODBC vendor (IBM?) and ask the vendor how to resolve the issue.
UsageCount = 1
NOTE1 = If using unixODBC 2.2.11 or later and you want the 32 and 64-bit ODBC drivers to share DSN's,
NOTE2 = the following Driver64/Setup64 keywords will provide that support.
Threading = 2
DontDLClose = 1
[iSeries Access ODBC Driver 64-bit]
Description = iSeries Access for Linux 64-bit ODBC Driver
Driver = /opt/ibm/iSeriesAccess/lib64/libcwbodbc.so
STARTUP_WAIT_TIME_DEV = 0
CONNECT_TIMEOUT_DEV = 10
TRACE_LEVEL_DEV = OFF
LOG_DIRECTORY_DEV = /VIS/DEV/db/tech_st/11.1.0/network/admin
LOG_FILE_DEV = DEV
TRACE_DIRECTORY_DEV = /VIS/DEV/db/tech_st/11.1.0/network/admin
TRACE_FILE_DEV = DEV
ADMIN_RESTRICTIONS_DEV = ON
SUBSCRIBE_FOR_NODE_DOWN_EVENT_DEV = OFF
# added parameters for bug# 9286476
LOG_STATUS_DEV = ON
INBOUND_CONNECT_TIMEOUT_DEV = 60
# ADR is only applicable for 11gDB
DIAG_ADR_ENABLED_DEV = ON
ADR_BASE_DEV = /VIS/DEV/db/tech_st/11.1.0/admin/DEV_testebs
Not sure, but it looks like you mixed some configurations. The ODBC driver libdb2.so is commonly used to connect to a DB2 UDB on LUW platforms, but the parameters
DefaultPkgLibrary = QGPL
DefaultPackage = A/DEFAULT(IBM),2,0,1,0,512
sound like they belong to the AS400 ODBC driver.
Earlier you've stated that you want to connect to the UDB DB2 on Windows, so the driver is correct - but the odbc.ini entries aren't.
The LUW odbc driver is configured using the config file db2dsdriver.cfg => see http://publib.boulder.ibm.com/infocenter/db2luw/v9r5/index.jsp?topic=%2Fcom.ibm.swg.im.dbclient.config.doc%2Fdoc%2Fc0054555.html
Once you called the utility, please post the file db2dsdriver.cfg, your modified odbc.ini and also do not forget to test the database link using isql and this syntax: isql -v dblink4db2 db2admin nilgiris
still i cant connect
[oradev@testebs cfg]$ isql -v dblink4db2 db2admin nilgiris
[IM002][unixODBC][Driver Manager]Data source name not found, and no default driver specified
[ISQL]ERROR: Could not SQLConnect