473,574 Members | 2,639 Online
Bytes | Software Development & Data Engineering Community
+ 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=db2 inst1
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 6897
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=db2 inst1
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.co m> schrieb im Newsbeitrag
news:D5gdd.2118 3$cr4.19005@edt nps84...
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=db2 inst1
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
4127
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 ext/odbc/php_odbc.lo In file included from /root/php-4.3.2/ext/odbc/php_odbc.c:37: /root/php-4.3.2/ext/odbc/php_odbc_includes.h:118:17: sql.h: No...
0
1426
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 the performance is dramatically slower using the same application, pointed to the RedHat server. The performance of command line queries works as...
0
2479
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. However, if I run my application (linked with -lodbc), in SQLConnect it will get the following error: Message: Can't open cursor lib 'libodbccr' :...
7
1846
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 think that something is wrong with the file size between two distributions:
3
4852
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
1407
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 advice? THX
0
1099
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 varchar field (\n \r ,etc.). ----------------------------------------------------------------------------- # conn =...
0
1560
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 the nicknames associated with it. The one last mapping is going against a sqlserver and can't seem to get the nicknames setup on db2. The error...
4
5034
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
7813
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
8066
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8249
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
6461
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5631
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3743
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3755
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2251
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 we have to send another system
1
1350
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.