473,473 Members | 1,974 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

unixODBC client problems

Trying to get the unixODBC to work connecting to an IBM DB2 UDB V8.1. The
DB2 server is running on Red Hat 8 and is tested and confirmed to be
serving connections to Windows 98 clients using the Accpac 5.1 client
program (I would like to find an OpenSource generic ODBC program for
Wiindows that can do simple SQL). An Accpac database was installed and the
Win32 ODBC connection is working.

Trying to connect a Linux client via unixODBC I have tried this on Mandrake
9.0, 9.1, 9.2, 10, Red Hat 8. I have tried the default unixODBC that comes
with these system all of them are version 2.2.3 (Red Hat was 2.2.2
originaly) or newer. I have also downloaded and compiled the 2.2.10 version
of unixODBC.

I have tried the DB2 client that came with the server and I have donwloaded
and tried the FixPak 7 & 6a.

In the process of attempting to make this work I have varified that unixODBC
is working while connecting to a remote PostgreSQL server by using the
PostgreSQL driver library on the client system.

I have found documententaion on the Internet for the IBM DB2 UDB V6 and V7
regarding the required setting for
export DB2INSTANCE=db2inst1
and have set my odbc files as such...

bash$ cat /etc/odbc.ini
[sample]
Description = Test to DB2
Driver = DB2

bash$ cat /etc/odbcinst.ini
[ODBC]
Trace = 1
Trace File = /tmp/odbc.log

[DB2]
Description = DB2 Driver
Driver = /opt/IBM/db2/V8.1/lib/libdb2.so
FileUsage = 1
DontDLClose = 1

From the IBM documentation I found they recomend setting ODBC environment
variables. So I set these values.
export ODBCHOME=/etc
export ODBCSYSINI=/etc/odbc.ini
This only made the isql program not able to find the odbc*.ini files.

I have attempted to connect to the remove DB2 database with this command
isql -v sample db2inst1 password
but constantly receive the error "[[unixODBC][Driver Manager]Driver's
SQLAllocHandle on SQL_HANDLE_HENV failed]"
Where:
sample = name of the DSN as shown above in the /etc/odbc.ini file
db2inst1 = the username on the server that has access to the sample database
password = the password for the db2inst1 on the server

The connection between the DSN name and the database name on the server is
not documented anywhere that I could find.

Running tcpdump on the server shows no network activity from the Linux ODBC
client during the isql command. Attempting to connect from the Windows
system causes a flood of activity in tcpdump when using the Accpac client.

How does the IBM DB2 ODBC client find the server? The Windows systems
required the IP address while using the Java client to add a new database
connection.

I don't know what else to try. It seems as though other people have excelent
success with the same steps I have been following
http://www.unixodbc.org/doc/db2.html
http://www-1.ibm.com/support/docview...id=swg21079056

What next?

--
Roy Souther
Open Support Guild
Bringing Open concepts to IT support
www.OsGuild.com
Nov 12 '05 #1
3 6873
Found my own solution.

On the client system login as db2inst1 and run db2
Inside the db2 system shell run these commands

CATALOG TCPIP NODE sample REMOTE serverip SERVER portnumber
CATALOG DATABASE sample AT NODE sample

Where sample is the name of the database on the server, the alias for it and
the DSN name on the client side, serverip is the TCP/IP address for the
server, and portnumber is 500000 the default port number for the DB2
server.

I must be missing some documentation because I don't remember reading this
anywhere in the hundreds of documentation files that came with the
software.

Roy Souther wrote:
Trying to get the unixODBC to work connecting to an IBM DB2 UDB V8.1. The
DB2 server is running on Red Hat 8 and is tested and confirmed to be
serving connections to Windows 98 clients using the Accpac 5.1 client
program (I would like to find an OpenSource generic ODBC program for
Wiindows that can do simple SQL). An Accpac database was installed and the
Win32 ODBC connection is working.

Trying to connect a Linux client via unixODBC I have tried this on
Mandrake 9.0, 9.1, 9.2, 10, Red Hat 8. I have tried the default unixODBC
that comes with these system all of them are version 2.2.3 (Red Hat was
2.2.2 originaly) or newer. I have also downloaded and compiled the 2.2.10
version of unixODBC.

I have tried the DB2 client that came with the server and I have
donwloaded and tried the FixPak 7 & 6a.

In the process of attempting to make this work I have varified that
unixODBC is working while connecting to a remote PostgreSQL server by
using the PostgreSQL driver library on the client system.

I have found documententaion on the Internet for the IBM DB2 UDB V6 and V7
regarding the required setting for
export DB2INSTANCE=db2inst1
and have set my odbc files as such...

bash$ cat /etc/odbc.ini
[sample]
Description = Test to DB2
Driver = DB2

bash$ cat /etc/odbcinst.ini
[ODBC]
Trace = 1
Trace File = /tmp/odbc.log

[DB2]
Description = DB2 Driver
Driver = /opt/IBM/db2/V8.1/lib/libdb2.so
FileUsage = 1
DontDLClose = 1

From the IBM documentation I found they recomend setting ODBC environment
variables. So I set these values.
export ODBCHOME=/etc
export ODBCSYSINI=/etc/odbc.ini
This only made the isql program not able to find the odbc*.ini files.

I have attempted to connect to the remove DB2 database with this command
isql -v sample db2inst1 password
but constantly receive the error "[[unixODBC][Driver Manager]Driver's
SQLAllocHandle on SQL_HANDLE_HENV failed]"
Where:
sample = name of the DSN as shown above in the /etc/odbc.ini file
db2inst1 = the username on the server that has access to the sample
database password = the password for the db2inst1 on the server

The connection between the DSN name and the database name on the server is
not documented anywhere that I could find.

Running tcpdump on the server shows no network activity from the Linux
ODBC client during the isql command. Attempting to connect from the
Windows system causes a flood of activity in tcpdump when using the Accpac
client.

How does the IBM DB2 ODBC client find the server? The Windows systems
required the IP address while using the Java client to add a new database
connection.

I don't know what else to try. It seems as though other people have
excelent success with the same steps I have been following
http://www.unixodbc.org/doc/db2.html
http://www-1.ibm.com/support/docview...id=swg21079056

What next?


--
Roy Souther
Open Support Guild
Bringing Open concepts to IT support
www.OsGuild.com
Nov 12 '05 #2
ODBC connects to a database "defined on the system where it's running".
Your ODBC setup connected to a UDB database that wasn't defined on the
system until you implemented your solution.

Many (all?) ODBCs support an ODBC to ODBC connection to a remote system.
You could use that to connect through ODBC running on the server system.
My personal preference is to use the UDB client connection for
inter-systems communication.

Phil Sherman

Roy Souther wrote:
Found my own solution.

On the client system login as db2inst1 and run db2
Inside the db2 system shell run these commands

CATALOG TCPIP NODE sample REMOTE serverip SERVER portnumber
CATALOG DATABASE sample AT NODE sample

Where sample is the name of the database on the server, the alias for it and
the DSN name on the client side, serverip is the TCP/IP address for the
server, and portnumber is 500000 the default port number for the DB2
server.

I must be missing some documentation because I don't remember reading this
anywhere in the hundreds of documentation files that came with the
software.


Nov 12 '05 #3
Hi Roy !!!
You were the one that helped me with your solution !!!
I tried this 2 weeks. Now your solution worked for me !!!

Thank you very much !!!

Cu,

Fabian

"Roy Souther" <ro*@OsGuild.com> schrieb im Newsbeitrag
news:D5gdd.21183$cr4.19005@edtnps84...
Found my own solution.

On the client system login as db2inst1 and run db2
Inside the db2 system shell run these commands

CATALOG TCPIP NODE sample REMOTE serverip SERVER portnumber
CATALOG DATABASE sample AT NODE sample

Where sample is the name of the database on the server, the alias for it and the DSN name on the client side, serverip is the TCP/IP address for the
server, and portnumber is 500000 the default port number for the DB2
server.

I must be missing some documentation because I don't remember reading this
anywhere in the hundreds of documentation files that came with the
software.

Roy Souther wrote:
Trying to get the unixODBC to work connecting to an IBM DB2 UDB V8.1. The DB2 server is running on Red Hat 8 and is tested and confirmed to be
serving connections to Windows 98 clients using the Accpac 5.1 client
program (I would like to find an OpenSource generic ODBC program for
Wiindows that can do simple SQL). An Accpac database was installed and the Win32 ODBC connection is working.

Trying to connect a Linux client via unixODBC I have tried this on
Mandrake 9.0, 9.1, 9.2, 10, Red Hat 8. I have tried the default unixODBC
that comes with these system all of them are version 2.2.3 (Red Hat was
2.2.2 originaly) or newer. I have also downloaded and compiled the 2.2.10 version of unixODBC.

I have tried the DB2 client that came with the server and I have
donwloaded and tried the FixPak 7 & 6a.

In the process of attempting to make this work I have varified that
unixODBC is working while connecting to a remote PostgreSQL server by
using the PostgreSQL driver library on the client system.

I have found documententaion on the Internet for the IBM DB2 UDB V6 and V7 regarding the required setting for
export DB2INSTANCE=db2inst1
and have set my odbc files as such...

bash$ cat /etc/odbc.ini
[sample]
Description = Test to DB2
Driver = DB2

bash$ cat /etc/odbcinst.ini
[ODBC]
Trace = 1
Trace File = /tmp/odbc.log

[DB2]
Description = DB2 Driver
Driver = /opt/IBM/db2/V8.1/lib/libdb2.so
FileUsage = 1
DontDLClose = 1

From the IBM documentation I found they recomend setting ODBC environment variables. So I set these values.
export ODBCHOME=/etc
export ODBCSYSINI=/etc/odbc.ini
This only made the isql program not able to find the odbc*.ini files.

I have attempted to connect to the remove DB2 database with this command
isql -v sample db2inst1 password
but constantly receive the error "[[unixODBC][Driver Manager]Driver's
SQLAllocHandle on SQL_HANDLE_HENV failed]"
Where:
sample = name of the DSN as shown above in the /etc/odbc.ini file
db2inst1 = the username on the server that has access to the sample
database password = the password for the db2inst1 on the server

The connection between the DSN name and the database name on the server is not documented anywhere that I could find.

Running tcpdump on the server shows no network activity from the Linux
ODBC client during the isql command. Attempting to connect from the
Windows system causes a flood of activity in tcpdump when using the Accpac client.

How does the IBM DB2 ODBC client find the server? The Windows systems
required the IP address while using the Java client to add a new database connection.

I don't know what else to try. It seems as though other people have
excelent success with the same steps I have been following
http://www.unixodbc.org/doc/db2.html
http://www-1.ibm.com/support/docview...id=swg21079056

What next?


--
Roy Souther
Open Support Guild
Bringing Open concepts to IT support
www.OsGuild.com

Nov 12 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Cary | last post by:
Trying to install on SuSE 8.2 from source. ../configure --with-apxs=/usr/local/apache/bin/apxs --with-mysql --with-unixODBC=/usr/lib getting this error: /root/php-4.3.2/ext/odbc/php_odbc.c -o...
0
by: Tbird67ForSale | last post by:
Has anyone had much luck with UnixODBC on RedHat Linux. I've recently moved a 100 Gb MySQL database from Win2000 Server to a RedHat 9 server and installed UnixODBC to access it. It appears that...
0
by: Bang | last post by:
Hi All, Recently I installed unixODBC(2.2.3) and MySql and MyODBC on Redhat 9.0. After the installation, I am able to use test program isql to connect to the database I created with mysql. ...
7
by: Gaetano Mendola | last post by:
This is what I got installing the RPM for 9.0: file /usr/include/sqltypes.h from install of postgresql-devel-7.4-0.3PGDG conflicts with file from package unixODBC-devel-2.2.3-6 BTW I...
3
by: Greg | last post by:
Hi, Does anyone know what is the difference between the two ODBC systems ? Are there any other popular and established standards ? Thanks for the help. -greg
0
by: zhengfish | last post by:
HI,all I used an odbc-wrapper connectting mysql with unixODBC. But it didnt work well, often some exception occured. So I need one new wrapper for unixODBC, it must run stably. Could U give me an...
0
by: erik.myllymaki | last post by:
I am using a script that's worked for me in the past on Windows, but now that i've moved it to a Linux machine it is not. The trouble seems to be when trying to insert escaped characters into a ...
0
by: UDBDBA | last post by:
Hi: We have a setup which connects a V8.2 32bit db2 instance on AIX to SQLServer 2000 using the unixODBC driver. We have 5 SQLServer "Server mappings" and 4 of them work just fine and can use...
4
by: Gregor =?UTF-8?B?S292YcSN?= | last post by:
Hi! I have DB2 Express-C v9.1 installed on my machine. It is Linux UBUNTO 6.10. I've installed unixODBC version 2.2.11. My /etc/odbcinst.ini: Trace=yes Tracefile=/home/gregor/trc.log
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.