Unable to get isql working on AIX 7.1

classic Classic list List threaded Threaded
19 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Unable to get isql working on AIX 7.1

Sundar Mahadevan
Hi All,
I am trying to setup oracle database to connect to db2 to pull data using dblink using oracle dg4odbc that comes as part of enterprise edition. My oracle database is on 11gR204 hosted on AIX 7.1 while DB2 is on version 10.5 hosted on RHEL 5.11. I am an oracle dba with limited systems administration knowledge looking for assistance in getting my setup working. I installed db2 client which comes with odbc driver and i also installed unix odbc driver manager (both of them installed as OS user dbclient). When i try to execute isql, i am getting the error below. Any help is greatly appreciated.

dbclient@omsa4103:SUPCON(/u13/app/DBCLIENT)> ls -ld /home/oracle/bin/UnixOdbcDriverManager
drwxrwxr-x    7 oracle   dba             256 Jan 21 14:01 /home/oracle/bin/UnixOdbcDriverManager

I have the following in my .profile.

export LIBPATH=$LIBPATH:/home/oracle/bin/UnixOdbcDriverManager/lib
export PATH=$PATH:/home/oracle/bin:/home/oracle/bin/UnixOdbcDriverManager/lib:/home/oracle/bin/UnixOdbcDriverManager/bin
export LD_LIBRARY_PATH=/u01/app/oracle/product/11gR204/db_1/lib:/u13/app/DBCLIENT/sqllib/lib64:/home/oracle/bin/UnixOdbcDriverManager/lib

dbclient@omsa4103:SUPCON(/u13/app/DBCLIENT)> which isql
/home/oracle/bin/UnixOdbcDriverManager/bin/isql
dbclient@omsa4103:SUPCON(/u13/app/DBCLIENT)> isql
exec(): 0509-036 Cannot load program isql because of the following errors:
        0509-022 Cannot load module /home/oracle/bin/UnixOdbcDriverManager/lib/libodbc.a(libodbc.so.2).
        0509-150   Dependent module /usr/lib/libiconv.a(libiconv.so.2) could not be loaded.
        0509-152   Member libiconv.so.2 is not found in archive 
        0509-022 Cannot load module isql.
        0509-150   Dependent module /home/oracle/bin/UnixOdbcDriverManager/lib/libodbc.a(libodbc.so.2) could not be loaded.
        0509-022 Cannot load module .
dbclient@omsa4103:SUPCON(/u13/app/DBCLIENT)> 

_______________________________________________
unixODBC-support mailing list
[hidden email]
http://mailman.unixodbc.org/mailman/listinfo/unixodbc-support
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Unable to get isql working on AIX 7.1

Nick Gorham-2
On 21/01/16 20:51, Sundar Mahadevan wrote:

> Hi All,
> I am trying to setup oracle database to connect to db2 to pull data
> using dblink using oracle dg4odbc that comes as part of enterprise
> edition. My oracle database is on 11gR204 hosted on AIX 7.1 while DB2
> is on version 10.5 hosted on RHEL 5.11. I am an oracle dba with
> limited systems administration knowledge looking for assistance in
> getting my setup working. I installed db2 client which comes with odbc
> driver and i also installed unix odbc driver manager (both of them
> installed as OS user dbclient). When i try to execute isql, i am
> getting the error below. Any help is greatly appreciated.
>
> dbclient@omsa4103:SUPCON(/u13/app/DBCLIENT)> ls -ld
> /home/oracle/bin/UnixOdbcDriverManager
> drwxrwxr-x    7 oracle   dba             256 Jan 21 14:01
> /home/oracle/bin/UnixOdbcDriverManager

The driver manager has been built with iconv support, but at run time
cant load the libiconv library.

         0509-150   Dependent module /usr/lib/libiconv.a(libiconv.so.2)
could not be loaded.
         0509-152   Member libiconv.so.2 is not found in archive

--
Nick
_______________________________________________
unixODBC-support mailing list
[hidden email]
http://mailman.unixodbc.org/mailman/listinfo/unixodbc-support
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Unable to get isql working on AIX 7.1

Sundar Mahadevan
Hi Nick,
Could you please advice on how to fix this issue? Should I fix PATH variable or is it something else. Appreciate your help.

Sent from my BlackBerry 10 smartphone on the Rogers network.
  Original Message  
From: Nick Gorham
Sent: Thursday, January 21, 2016 6:31 PM
To: [hidden email]
Reply To: Support for the unixODBC project
Subject: Re: [unixODBC-support] Unable to get isql working on AIX 7.1

On 21/01/16 20:51, Sundar Mahadevan wrote:

> Hi All,
> I am trying to setup oracle database to connect to db2 to pull data
> using dblink using oracle dg4odbc that comes as part of enterprise
> edition. My oracle database is on 11gR204 hosted on AIX 7.1 while DB2
> is on version 10.5 hosted on RHEL 5.11. I am an oracle dba with
> limited systems administration knowledge looking for assistance in
> getting my setup working. I installed db2 client which comes with odbc
> driver and i also installed unix odbc driver manager (both of them
> installed as OS user dbclient). When i try to execute isql, i am
> getting the error below. Any help is greatly appreciated.
>
> dbclient@omsa4103:SUPCON(/u13/app/DBCLIENT)> ls -ld
> /home/oracle/bin/UnixOdbcDriverManager
> drwxrwxr-x 7 oracle dba 256 Jan 21 14:01
> /home/oracle/bin/UnixOdbcDriverManager

The driver manager has been built with iconv support, but at run time
cant load the libiconv library.

0509-150 Dependent module /usr/lib/libiconv.a(libiconv.so.2)
could not be loaded.
0509-152 Member libiconv.so.2 is not found in archive

--
Nick
_______________________________________________
unixODBC-support mailing list
[hidden email]
http://mailman.unixodbc.org/mailman/listinfo/unixodbc-support
_______________________________________________
unixODBC-support mailing list
[hidden email]
http://mailman.unixodbc.org/mailman/listinfo/unixodbc-support
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Unable to get isql working on AIX 7.1

Michael König
Hi!

I am not familiar with AIX, but I suppose that either you have not
installed the libiconv package or it is installed, but the .so file is
located somewhere else. Try installing the package or try searching for
libiconv and manipulate the library path.

Cheers

Michael


> Hi Nick,
> Could you please advice on how to fix this issue? Should I fix PATH variable or is it something else. Appreciate your help.
>
>
> The driver manager has been built with iconv support, but at run time
> cant load the libiconv library.
>
> 0509-150 Dependent module /usr/lib/libiconv.a(libiconv.so.2)
> could not be loaded.
> 0509-152 Member libiconv.so.2 is not found in archive
>

_______________________________________________
unixODBC-support mailing list
[hidden email]
http://mailman.unixodbc.org/mailman/listinfo/unixodbc-support
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Unable to get isql working on AIX 7.1

Sundar Mahadevan
Hi Michael, Nick and all,
Thanks for the response. When i check listed of installed packages, i do find libiconv installed. When i checked the first time, only /usr/lib/libiconv.a existed. I then ran ar -x command and it created the .so files which i renamed later as shown below (Not sure if it should be done or not). I have /usr/lib in PATH and LIBPATH environment variables. I am not sure what i am doing wrong. Any help is greatly appreciated.

dbclient@omsa4103:SUPCON(/u13/app/DBCLIENT)> lslpp -L | grep -i conv
  bos.iconv.com              7.1.3.0    C     F    Common Language to Language
                                                   Converters 
  bos.iconv.ucs.com         7.1.3.15    C     F    Unicode Base Converters for
  bos.rte.iconv             7.1.3.15    C     F    Language Converters
                            7.1.3.30    A     F    RoCE Converged Network Adapter
  devices.ethernet.mlx.rte  7.1.3.45    A     F    RoCE Converged Network Adapter
                                                   Converged Network Adapter
                                                   Converged Network Adapter
                                                   Converged Network VF Adapter
  libiconv                    1.14-2    C     R    Character set conversion
                                                   library, portable iconv

root@omsa4103:SUPCON(/)> id
uid=0(root) gid=0(system)
root@omsa4103:SUPCON(/usr/lib)> cd /usr/lib
root@omsa4103:SUPCON(/usr/lib)> ar -x -X any libiconv.a
root@omsa4103:SUPCON(/usr/lib)> mv libiconv_64.so libiconv4_64.so
root@omsa4103:SUPCON(/usr/lib)> mv shr4.o libiconv4.so
root@omsa4103:SUPCON(/usr/lib)> mv shr.o libiconv.so
root@omsa4103:SUPCON(/usr/lib)> ln -s libiconv4_64.so libiconv4_64.so.2
root@omsa4103:SUPCON(/usr/lib)> ln -s libiconv4.so libiconv4.so.2
root@omsa4103:SUPCON(/usr/lib)> ln -s libiconv.so libiconv.so.2

dbclient@omsa4103:SUPCON(/u13/app/DBCLIENT)> ls -l /usr/lib/*conv*
-r--r--r--    1 bin      bin          708498 Mar 14 2014  /usr/lib/libiconv.a
-rwxr-x---    1 root     system       215754 Jan 21 14:43 /usr/lib/libiconv.so
lrwxrwxrwx    1 root     system           11 Jan 21 14:53 /usr/lib/libiconv.so.2 -> libiconv.so
-rwxr-x---    1 root     system       215632 Jan 21 14:43 /usr/lib/libiconv4.so
lrwxrwxrwx    1 root     system           12 Jan 21 14:53 /usr/lib/libiconv4.so.2 -> libiconv4.so
-rwxr-x---    1 root     system       273628 Jan 21 14:43 /usr/lib/libiconv4_64.so
lrwxrwxrwx    1 root     system           15 Jan 21 14:53 /usr/lib/libiconv4_64.so.2 -> libiconv4_64.so
dbclient@omsa4103:SUPCON(/u13/app/DBCLIENT)> 

On Fri, Jan 22, 2016 at 7:42 AM, Michael König <[hidden email]> wrote:
Hi!

I am not familiar with AIX, but I suppose that either you have not installed the libiconv package or it is installed, but the .so file is located somewhere else. Try installing the package or try searching for libiconv and manipulate the library path.

Cheers

Michael


Hi Nick,
Could you please advice on how to fix this issue? Should I fix PATH variable or is it something else. Appreciate your help.


The driver manager has been built with iconv support, but at run time
cant load the libiconv library.

0509-150 Dependent module /usr/lib/libiconv.a(libiconv.so.2)
could not be loaded.
0509-152 Member libiconv.so.2 is not found in archive


_______________________________________________
unixODBC-support mailing list
[hidden email]
http://mailman.unixodbc.org/mailman/listinfo/unixodbc-support


_______________________________________________
unixODBC-support mailing list
[hidden email]
http://mailman.unixodbc.org/mailman/listinfo/unixodbc-support
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Unable to get isql working on AIX 7.1

Nick Gorham-2
On 22/01/16 14:34, Sundar Mahadevan wrote:
> Hi Michael, Nick and all,
> Thanks for the response. When i check listed of installed packages, i
> do find libiconv installed. When i checked the first time, only
> /usr/lib/libiconv.a existed. I then ran ar -x command and it created
> the .so files which i renamed later as shown below (Not sure if it
> should be done or not). I have /usr/lib in PATH and LIBPATH
> environment variables. I am not sure what i am doing wrong. Any help
> is greatly appreciated.

Normally AIX will load the .so from the .a, but I would check that your
driver manager is built 64 bit, if its 32 bit them it will find the lib,
but not load the 64 bit components it contains.

--
Nick
_______________________________________________
unixODBC-support mailing list
[hidden email]
http://mailman.unixodbc.org/mailman/listinfo/unixodbc-support
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Unable to get isql working on AIX 7.1

Sundar Mahadevan
Hi Nick,
Thanks for the quick response. The following are the commands, i used to install the driver manager with the 64 bit flags set. While running /usr/bin/make i got gcc: unrecognized option '-q64'. I am not sure if it was critical since i did not see any error when i ran /usr/bin/make install

dbclient@omsa4103:SUPCON(/u13/app/DBCLIENT/unixODBC-2.3.4)> export CC=gcc
dbclient@omsa4103:SUPCON(/u13/app/DBCLIENT/unixODBC-2.3.4)> export CFLAGS="-maix64 -q64 -DBUILD_REAL_64_BIT_MODE"
dbclient@omsa4103:SUPCON(/u13/app/DBCLIENT/unixODBC-2.3.4)> export OBJECT_MODE=64
dbclient@omsa4103:SUPCON(/u13/app/DBCLIENT/unixODBC-2.3.4)> /u13/app/DBCLIENT/unixODBC-2.3.4/configure --prefix=/home/oracle/bin/UnixOdbcDriverManager --enable-gui=no --enable-drivers=no

no errors for the above command

dbclient@omsa4103:SUPCON(/u13/app/DBCLIENT/unixODBC-2.3.4)> /usr/bin/make

gcc: unrecognized option '-q64'
SQLSetEnvAttr.c: In function 'SQLSetEnvAttr':
SQLSetEnvAttr.c:201: warning: cast from pointer to integer of different size
.
.
gcc: unrecognized option '-q64'
libtool: link: ar cru .libs/libodbccr.a .libs/libodbccr.so.2
libtool: link: ( cd ".libs" && rm -f "libodbccr.la" && ln -s "../libodbccr.la" "libodbccr.la" )

ld: 0711-224 WARNING: Duplicate symbol: .bcopy
ld: 0711-224 WARNING: Duplicate symbol: .memmove

Target "all" is up to date.
Making all in DRVConfig
Target "all-am" is up to date.
Target "all" is up to date.
Making all in Drivers
Target "all-am" is up to date.
Target "all" is up to date.
Making all in include
Target "all" is up to date.
Making all in doc
Making all in AdministratorManual
Target "all" is up to date.
Making all in ProgrammerManual
Making all in Tutorial
Target "all" is up to date.
Target "all-am" is up to date.
Target "all" is up to date.
Making all in UserManual
Target "all" is up to date.
Making all in lst
Target "all" is up to date.
Target "all-am" is up to date.
Target "all" is up to date.
Making all in man
Target "all" is up to date.
Making all in samples
Target "all" is up to date.
Target "all-am" is up to date

dbclient@omsa4103:SUPCON(/u13/app/DBCLIENT/unixODBC-2.3.4)> /usr/bin/make install

Target "install" is up to date. 

No errors reported for the above command. Please let me know if uploading my installation log file somewhere and providing a link can assist in any way. Thanks again for your assistance.


On Fri, Jan 22, 2016 at 9:36 AM, Nick Gorham <[hidden email]> wrote:
On 22/01/16 14:34, Sundar Mahadevan wrote:
Hi Michael, Nick and all,
Thanks for the response. When i check listed of installed packages, i do find libiconv installed. When i checked the first time, only /usr/lib/libiconv.a existed. I then ran ar -x command and it created the .so files which i renamed later as shown below (Not sure if it should be done or not). I have /usr/lib in PATH and LIBPATH environment variables. I am not sure what i am doing wrong. Any help is greatly appreciated.

Normally AIX will load the .so from the .a, but I would check that your driver manager is built 64 bit, if its 32 bit them it will find the lib, but not load the 64 bit components it contains.

--
Nick

_______________________________________________
unixODBC-support mailing list
[hidden email]
http://mailman.unixodbc.org/mailman/listinfo/unixodbc-support


_______________________________________________
unixODBC-support mailing list
[hidden email]
http://mailman.unixodbc.org/mailman/listinfo/unixodbc-support
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Unable to get isql working on AIX 7.1

Nick Gorham-2
On 22/01/16 14:53, Sundar Mahadevan wrote:

> Hi Nick,
> Thanks for the quick response. The following are the commands, i used
> to install the driver manager with the 64 bit flags set. While running
> /usr/bin/make i got gcc: unrecognized option '-q64'. I am not sure if
> it was critical since i did not see any error when i ran /usr/bin/make
> install
>
> dbclient@omsa4103:SUPCON(/u13/app/DBCLIENT/unixODBC-2.3.4)> export CC=gcc
> dbclient@omsa4103:SUPCON(/u13/app/DBCLIENT/unixODBC-2.3.4)> export
> CFLAGS="-maix64 -q64 -DBUILD_REAL_64_BIT_MODE"
> dbclient@omsa4103:SUPCON(/u13/app/DBCLIENT/unixODBC-2.3.4)> export
> OBJECT_MODE=64
> dbclient@omsa4103:SUPCON(/u13/app/DBCLIENT/unixODBC-2.3.4)>
> /u13/app/DBCLIENT/unixODBC-2.3.4/configure
> --prefix=/home/oracle/bin/UnixOdbcDriverManager --enable-gui=no
> --enable-drivers=no
>
> no errors for the above command
>
> dbclient@omsa4103:SUPCON(/u13/app/DBCLIENT/unixODBC-2.3.4)> /usr/bin/make

Its normally -m64 for gcc, not sure I use IBM's compiler on AIX to build
Easysoft drivers.

--
Nick
_______________________________________________
unixODBC-support mailing list
[hidden email]
http://mailman.unixodbc.org/mailman/listinfo/unixodbc-support
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Unable to get isql working on AIX 7.1

Sundar Mahadevan
Hi Nick,
Thank you for the response. During the original install, i used the following export variables.

export CC=gcc
export CFLAGS="-maix64 -q64 -DBUILD_REAL_64_BIT_MODE"
export OBJECT_MODE=64

As per your suggestion, i set the following export variables (based on https://community.oracle.com/thread/2569247?tstart=0)

export PATH=/usr/ccs/bin:$PATH
export CFLAGS="-m64 -DBUILD_REAL_64_BIT_MODE"
export CXXFLAGS="-m64 -DBUILD_REAL_64_BIT_MODE"

But i get the following error. Any ideas on what value should i set it to?

cc1: error: unrecognized command line option "-m64"
configure:3648: error: C compiler cannot create executables

I got the same error for the following settings as well.

export PATH=/usr/ccs/bin:$PATH
export CFLAGS="-m64"
export CXXFLAGS="-m64"

cc1: error: unrecognized command line option "-m64"
configure:3648: error: C compiler cannot create executables

I am trying to find what the acceptable values for CFLAGS are, but could not find any with google. Appreciate your help. Thanks.


On Fri, Jan 22, 2016 at 9:59 AM, Nick Gorham <[hidden email]> wrote:
On 22/01/16 14:53, Sundar Mahadevan wrote:
Hi Nick,
Thanks for the quick response. The following are the commands, i used to install the driver manager with the 64 bit flags set. While running /usr/bin/make i got gcc: unrecognized option '-q64'. I am not sure if it was critical since i did not see any error when i ran /usr/bin/make install

dbclient@omsa4103:SUPCON(/u13/app/DBCLIENT/unixODBC-2.3.4)> export CC=gcc
dbclient@omsa4103:SUPCON(/u13/app/DBCLIENT/unixODBC-2.3.4)> export CFLAGS="-maix64 -q64 -DBUILD_REAL_64_BIT_MODE"
dbclient@omsa4103:SUPCON(/u13/app/DBCLIENT/unixODBC-2.3.4)> export OBJECT_MODE=64
dbclient@omsa4103:SUPCON(/u13/app/DBCLIENT/unixODBC-2.3.4)> /u13/app/DBCLIENT/unixODBC-2.3.4/configure --prefix=/home/oracle/bin/UnixOdbcDriverManager --enable-gui=no --enable-drivers=no

no errors for the above command

dbclient@omsa4103:SUPCON(/u13/app/DBCLIENT/unixODBC-2.3.4)> /usr/bin/make

Its normally -m64 for gcc, not sure I use IBM's compiler on AIX to build Easysoft drivers.


--
Nick
_______________________________________________
unixODBC-support mailing list
[hidden email]
http://mailman.unixodbc.org/mailman/listinfo/unixodbc-support


_______________________________________________
unixODBC-support mailing list
[hidden email]
http://mailman.unixodbc.org/mailman/listinfo/unixodbc-support
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Unable to get isql working on AIX 7.1

Nick Gorham-2
On 25/01/16 17:44, Sundar Mahadevan wrote:

> Hi Nick,
> Thank you for the response. During the original install, i used the
> following export variables.
>
> export CC=gcc
> export CFLAGS="-maix64 -q64 -DBUILD_REAL_64_BIT_MODE"
> export OBJECT_MODE=64
>
> As per your suggestion, i set the following export variables (based on
> https://community.oracle.com/thread/2569247?tstart=0)
>
> export PATH=/usr/ccs/bin:$PATH
> export CFLAGS="-m64 -DBUILD_REAL_64_BIT_MODE"
> export CXXFLAGS="-m64 -DBUILD_REAL_64_BIT_MODE"
>
> But i get the following error. Any ideas on what value should i set it to?

This

http://unix.ittoolbox.com/groups/technical-functional/ibm-aix-l/using-gcc-on-aix-want-64bit-compile-2613507

Suggests

CFLAGS="-Wl,-b64 -maix64"

May do what you want.

--
Nick
_______________________________________________
unixODBC-support mailing list
[hidden email]
http://mailman.unixodbc.org/mailman/listinfo/unixodbc-support
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Unable to get isql working on AIX 7.1

Kevin Adler
In reply to this post by Sundar Mahadevan
On AIX,  use -maix64 or -maix32 instead of -m64 or -m32. See
http://www.ibm.com/developerworks/aix/library/au-gnu.html

The -q64 is only for the IBM xlc compiler.

Regards


Kevin Adler


Software Development - DB2 for i, Database Access for IBM i

 

IBM Systems & Technology Group
015-3/C117
3605 Hwy 52 N
Rochester, MN 55901-1407
United States

Dept: 45X
Phone:
+1-507-253-5111
email:
[hidden email]




From:   Sundar Mahadevan <[hidden email]>
To:     Support for the unixODBC project
<[hidden email]>
Date:   01/25/2016 11:51 AM
Subject:        Re: [unixODBC-support] Unable to get isql working on AIX
7.1
Sent by:        [hidden email]



Hi Nick,
Thank you for the response. During the original install, i used the
following export variables.

export CC=gcc
export CFLAGS="-maix64 -q64 -DBUILD_REAL_64_BIT_MODE"
export OBJECT_MODE=64

As per your suggestion, i set the following export variables (based on
https://community.oracle.com/thread/2569247?tstart=0)

export PATH=/usr/ccs/bin:$PATH
export CFLAGS="-m64 -DBUILD_REAL_64_BIT_MODE"
export CXXFLAGS="-m64 -DBUILD_REAL_64_BIT_MODE"

But i get the following error. Any ideas on what value should i set it to?

cc1: error: unrecognized command line option "-m64"
configure:3648: error: C compiler cannot create executables

I got the same error for the following settings as well.

export PATH=/usr/ccs/bin:$PATH
export CFLAGS="-m64"
export CXXFLAGS="-m64"

cc1: error: unrecognized command line option "-m64"
configure:3648: error: C compiler cannot create executables

I am trying to find what the acceptable values for CFLAGS are, but could
not find any with google. Appreciate your help. Thanks.


On Fri, Jan 22, 2016 at 9:59 AM, Nick Gorham <[hidden email]> wrote:
On 22/01/16 14:53, Sundar Mahadevan wrote:
Hi Nick,
Thanks for the quick response. The following are the commands, i used to
install the driver manager with the 64 bit flags set. While running
/usr/bin/make i got gcc: unrecognized option '-q64'. I am not sure if it
was critical since i did not see any error when i ran /usr/bin/make
install

dbclient@omsa4103:SUPCON(/u13/app/DBCLIENT/unixODBC-2.3.4)> export CC=gcc
dbclient@omsa4103:SUPCON(/u13/app/DBCLIENT/unixODBC-2.3.4)> export
CFLAGS="-maix64 -q64 -DBUILD_REAL_64_BIT_MODE"
dbclient@omsa4103:SUPCON(/u13/app/DBCLIENT/unixODBC-2.3.4)> export
OBJECT_MODE=64
dbclient@omsa4103:SUPCON(/u13/app/DBCLIENT/unixODBC-2.3.4)>
/u13/app/DBCLIENT/unixODBC-2.3.4/configure
--prefix=/home/oracle/bin/UnixOdbcDriverManager --enable-gui=no
--enable-drivers=no

no errors for the above command

dbclient@omsa4103:SUPCON(/u13/app/DBCLIENT/unixODBC-2.3.4)> /usr/bin/make

Its normally -m64 for gcc, not sure I use IBM's compiler on AIX to build
Easysoft drivers.


--
Nick
_______________________________________________
unixODBC-support mailing list
[hidden email]
http://mailman.unixodbc.org/mailman/listinfo/unixodbc-support
_______________________________________________
unixODBC-support mailing list
[hidden email]
http://mailman.unixodbc.org/mailman/listinfo/unixodbc-support




_______________________________________________
unixODBC-support mailing list
[hidden email]
http://mailman.unixodbc.org/mailman/listinfo/unixodbc-support
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Unable to get isql working on AIX 7.1

Sundar Mahadevan
Hi Kevin and Nick,
Many thanks for your help. I was able to get isql working. I needed to unset LIBPATH on my aix machine and it started working. I am trying to test my db2 database connection with isql and i cant get it to work. Could you please assist? Thanks.

oracle@omsa4103:SUPCON(/home/oracle/bin/UnixOdbcDriverManager/etc)> cat odbc.ini
[BPMSIT]
Description     = ODBC for DB2
Driver          = /u13/app/DBCLIENT/sqllib/lib64/db2_64.o
Database        = BPMDB
Instance        = psinst1
Protocol        = TCPIP
Hostname        = oms420.omers.com
ServiceName     = 50000
uid             = db2ro
pwd             = *****

oracle@omsa4103:SUPCON(/home/oracle/bin/UnixOdbcDriverManager/etc)> cat odbcinst.ini
[BPMSIT]
Description     = IBM DB2 ODBC driver (64-bit)
Driver          = /u13/app/DBCLIENT/sqllib/lib64/db2_64.o
FileUsage       = 1
DontDLClose     = 1
Debug           = 1
CommLog         = 1

[ODBC]
Trace           = Yes
TraceFile       = /tmp/odbctrace.out

dbclient@omsa4103:SUPCON(/u13/app/DBCLIENT)> \rm /tmp/odbctrace.out 

dbclient@omsa4103:SUPCON(/u13/app/DBCLIENT)> env | grep ODBCINI    
ODBCINI=/home/oracle/bin/UnixOdbcDriverManager/etc/odbc.ini

dbclient@omsa4103:SUPCON(/u13/app/DBCLIENT)> export DB2INSTANCE=psinst1
dbclient@omsa4103:SUPCON(/u13/app/DBCLIENT)> isql -v BPMSIT            
[IM004][unixODBC][Driver Manager]Driver's SQLAllocHandle on SQL_HANDLE_HENV failed
[ISQL]ERROR: Could not SQLConnect
dbclient@omsa4103:SUPCON(/u13/app/DBCLIENT)> cat /tmp/odbctrace.out
.
.
.
[[unixODBC][Driver Manager]Driver's SQLAllocHandle on SQL_HANDLE_HENV failed]
.
.


_______________________________________________
unixODBC-support mailing list
[hidden email]
http://mailman.unixodbc.org/mailman/listinfo/unixodbc-support
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Unable to get isql working on AIX 7.1

Sundar Mahadevan
Hi All,
I spent all day yesterday and could not find what is wrong with my config. I did a trace with strace and notice some errors in the log snippet attached below. I see tons of errors "T h e   s y s t e m   c" for /usr/lib/nls/msg/en_US/libc.cat but the file exists. Any help is greatly appreciated. Thanks.


40828946: 99024971: kload("/usr/lib/nls/loc/en_US__64", 128, "/u01/app/oracle/product/11gR204/db_1/lib:/u13/app/DBCLIENT/sql
lib/lib64:/home/oracle/bin/UnixOdbcDriverManager/lib") = 648518346072919080
40828946: 99024971: kopen("/home/oracle/bin/UnixOdbcDriverManager/etc/odbcinst.ini", O_RDONLY) = 3
40828946: 99024971: kioctl(3, 22528, 0x0000000000000000, 0x0000000000000000) Err#25 ENOTTY
40828946: 99024971: kioctl(3, 22528, 0x0000000000000000, 0x0000000000000000) Err#25 ENOTTY
40828946: 99024971: kread(3, " [ B P M S I T ]\n D e s".., 4096) = 249
40828946: 99024971: kread(3, " [ B P M S I T ]\n D e s".., 4096) = 0
40828946: 99024971: close(3)                            = 0
40828946: 99024971: kopen("/u13/app/DBCLIENT/.odbcinst.ini", O_RDONLY) Err#2  ENOENT
40828946: 99024971: kopen("/home/oracle/bin/UnixOdbcDriverManager/etc/odbcinst.ini", O_RDONLY) = 3
40828946: 99024971: kioctl(3, 22528, 0x0000000000000000, 0x0000000000000000) Err#25 ENOTTY
40828946: 99024971: kioctl(3, 22528, 0x0000000000000000, 0x0000000000000000) Err#25 ENOTTY
40828946: 99024971: kread(3, " [ B P M S I T ]\n D e s".., 4096) = 249
40828946: 99024971: kread(3, " [ B P M S I T ]\n D e s".., 4096) = 0
40828946: 99024971: close(3)                            = 0
40828946: 99024971: kopen("/u13/app/DBCLIENT/.odbcinst.ini", O_RDONLY) Err#2  ENOENT
40828946: 99024971: kopen("/home/oracle/bin/UnixOdbcDriverManager/etc/odbcinst.ini", O_RDONLY) = 3
40828946: 99024971: kioctl(3, 22528, 0x0000000000000000, 0x0000000000000000) Err#25 ENOTTY
40828946: 99024971: kioctl(3, 22528, 0x0000000000000000, 0x0000000000000000) Err#25 ENOTTY
40828946: 99024971: kread(3, " [ B P M S I T ]\n D e s".., 4096) = 249
40828946: 99024971: kread(3, " [ B P M S I T ]\n D e s".., 4096) = 0




40828946: 99024971: statx("/etc/passwd", 0x0FFFFFFFFFFFC470, 176, 0) = 0
40828946: 99024971: kopen("/etc/passwd.id.idx", O_RDONLY)       Err#2  ENOENT
40828946: 99024971: _getpid()                           = 40828946
40828946: 99024971: _getpid()                           = 40828946
40828946: 99024971: kopen("/etc/passwd", O_RDONLY)      = 4
40828946: 99024971: kioctl(4, 22528, 0x0000000000000000, 0x0000000000000000) Err#25 ENOTTY
40828946: 99024971: kfcntl(4, F_GETFD, 0x0000000000000000) = 0
40828946: 99024971: kfcntl(4, F_SETFD, 0x0000000000000001) = 0
40828946: 99024971: kfcntl(4, 13, 0x0FFFFFFFFFFFC770)   = 0
40828946: 99024971: lseek(4, 0, 1)                      = 0
40828946: 99024971: kioctl(4, 22528, 0x0000000000000000, 0x0000000000000000) Err#25 ENOTTY
40828946: 99024971: kread(4, " r o o t : ! : 0 : 0 : 7".., 4096) = 3179
40828946: 99024971: lseek(4, 0, 1)                      = 3179
40828946: 99024971: lseek(4, 0, 1)                      = 3179
40828946: 99024971: lseek(4, 0, 1)                      = 3179



40828946: 99024971: kopen("/etc/passwd", O_RDONLY)      = 4
40828946: 99024971: kioctl(4, 22528, 0x0000000000000000, 0x0000000000000000) Err#25 ENOTTY
40828946: 99024971: kfcntl(4, F_GETFD, 0x0000000000000000) = 0
40828946: 99024971: kfcntl(4, F_SETFD, 0x0000000000000001) = 0
40828946: 99024971: kfcntl(4, 13, 0x0FFFFFFFFFFFC860)   = 0
40828946: 99024971: lseek(4, 0, 1)                      = 0
40828946: 99024971: lseek(4, 3000, 0)                   = 3000
40828946: 99024971: kioctl(4, 22528, 0x0000000000000000, 0x0000000000000000) Err#25 ENOTTY
40828946: 99024971: kread(4, "\n d b c l i e n t : ! :".., 4096) = 179
40828946: 99024971: lseek(4, 0, 1)                      = 3179
40828946: 99024971: lseek(4, 0, 1)                      = 3179
40828946: 99024971: lseek(4, 0, 1)                      = 3179

And i see a tons of the error below.

17694742: 38535315: access("/usr/lib/nls/msg/en_US/libc.cat", 0) = 0
17694742: 38535315: _getpid()                           = 17694742
17694742: 38535315: kopen("/usr/lib/nls/msg/en_US/libc.cat", O_RDONLY) = 3
17694742: 38535315: kioctl(3, 22528, 0x0000000000000000, 0x0000000000000000) Err#25 ENOTTY
17694742: 38535315: kfcntl(3, F_SETFD, 0x0000000000000001) = 0
17694742: 38535315: kioctl(3, 22528, 0x0000000000000000, 0x0000000000000000) Err#25 ENOTTY
17694742: 38535315: kread(3, "\0\001 ù\007\007 I S O 8".., 4096) = 4096
17694742: 38535315: lseek(3, 0, 1)                      = 4096
17694742: 38535315: lseek(3, 0, 1)                      = 4096
17694742: 38535315: lseek(3, 0, 1)                      = 4096
17694742: 38535315: _getpid()                           = 17694742
17694742: 38535315: lseek(3, 0, 1)                      = 4096
17694742: 38535315: lseek(3, 8077, 0)                   = 8077
17694742: 38535315: kread(3, " T h e   s y s t e m   c".., 4096) = 4096
17694742: 38535315: close(3)                            = 0


oracle@omsa4103:SUPCON(/home/oracle/sm)> ll /usr/lib/nls/msg/en_US/libc.cat
-rw-r--r--    1 bin      bin           21046 Sep 06 2013  /usr/lib/nls/msg/en_US/libc.cat



On Thu, Jan 28, 2016 at 10:03 AM, Sundar Mahadevan <[hidden email]> wrote:
Hi Kevin and Nick,
Many thanks for your help. I was able to get isql working. I needed to unset LIBPATH on my aix machine and it started working. I am trying to test my db2 database connection with isql and i cant get it to work. Could you please assist? Thanks.

oracle@omsa4103:SUPCON(/home/oracle/bin/UnixOdbcDriverManager/etc)> cat odbc.ini
[BPMSIT]
Description     = ODBC for DB2
Driver          = /u13/app/DBCLIENT/sqllib/lib64/db2_64.o
Database        = BPMDB
Instance        = psinst1
Protocol        = TCPIP
Hostname        = oms420.omers.com
ServiceName     = 50000
uid             = db2ro
pwd             = *****

oracle@omsa4103:SUPCON(/home/oracle/bin/UnixOdbcDriverManager/etc)> cat odbcinst.ini
[BPMSIT]
Description     = IBM DB2 ODBC driver (64-bit)
Driver          = /u13/app/DBCLIENT/sqllib/lib64/db2_64.o
FileUsage       = 1
DontDLClose     = 1
Debug           = 1
CommLog         = 1

[ODBC]
Trace           = Yes
TraceFile       = /tmp/odbctrace.out

dbclient@omsa4103:SUPCON(/u13/app/DBCLIENT)> \rm /tmp/odbctrace.out 

dbclient@omsa4103:SUPCON(/u13/app/DBCLIENT)> env | grep ODBCINI    
ODBCINI=/home/oracle/bin/UnixOdbcDriverManager/etc/odbc.ini

dbclient@omsa4103:SUPCON(/u13/app/DBCLIENT)> export DB2INSTANCE=psinst1
dbclient@omsa4103:SUPCON(/u13/app/DBCLIENT)> isql -v BPMSIT            
[IM004][unixODBC][Driver Manager]Driver's SQLAllocHandle on SQL_HANDLE_HENV failed
[ISQL]ERROR: Could not SQLConnect
dbclient@omsa4103:SUPCON(/u13/app/DBCLIENT)> cat /tmp/odbctrace.out
.
.
.
[[unixODBC][Driver Manager]Driver's SQLAllocHandle on SQL_HANDLE_HENV failed]
.
.



_______________________________________________
unixODBC-support mailing list
[hidden email]
http://mailman.unixodbc.org/mailman/listinfo/unixodbc-support
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Unable to get isql working on AIX 7.1

Nick Gorham-2
On 29/01/16 14:38, Sundar Mahadevan wrote:
Hi All,
I spent all day yesterday and could not find what is wrong with my config. I did a trace with strace and notice some errors in the log snippet attached below. I see tons of errors "T h e   s y s t e m   c" for /usr/lib/nls/msg/en_US/libc.cat but the file exists. Any help is greatly appreciated. Thanks.

In the past that error indicated that the instance was not setup correctly in the db2 conf files. Can you connect to it using IBM's db2 tool?

--
Nick

_______________________________________________
unixODBC-support mailing list
[hidden email]
http://mailman.unixodbc.org/mailman/listinfo/unixodbc-support
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Unable to get isql working on AIX 7.1

Sundar Mahadevan
Hi Nick,
Thanks for getting back to me.What db2 conf files are you referring to? I did not make any db2 conf file changes. But i can connect fine to the DB2 database using the db2 client as shown below.

db2 => list dcs directory

 Database Connection Services (DCS) Directory

 Number of entries in the directory = 2

DCS 1 entry:

 Local database name                = BPMDB
 Target database name               = BPMDB
 Application requestor name         =
 DCS parameters                     =
 Comment                            =
 DCS directory release level        = 0x0100

DCS 2 entry:

 Local database name                = BPMSIT
 Target database name               = BPMSIT
 Application requestor name         =
 DCS parameters                     =
 Comment                            =
 DCS directory release level        = 0x0100

db2 => connect to BPMSIT user db2ro
Enter current password for db2ro: 

   Database Connection Information

 Database server        = DB2/LINUXX8664 10.5.3
 SQL authorization ID   = DB2RO
 Local database alias   = BPMSIT

db2 => select count(*) FROM obpmadm.lsw_bpd_instance

1          
-----------
      12079

  1 record(s) selected.

db2 => 

On Fri, Jan 29, 2016 at 9:53 AM, Nick Gorham <[hidden email]> wrote:
On 29/01/16 14:38, Sundar Mahadevan wrote:
Hi All,
I spent all day yesterday and could not find what is wrong with my config. I did a trace with strace and notice some errors in the log snippet attached below. I see tons of errors "T h e   s y s t e m   c" for /usr/lib/nls/msg/en_US/libc.cat but the file exists. Any help is greatly appreciated. Thanks.

In the past that error indicated that the instance was not setup correctly in the db2 conf files. Can you connect to it using IBM's db2 tool?

--
Nick

_______________________________________________
unixODBC-support mailing list
[hidden email]
http://mailman.unixodbc.org/mailman/listinfo/unixodbc-support



_______________________________________________
unixODBC-support mailing list
[hidden email]
http://mailman.unixodbc.org/mailman/listinfo/unixodbc-support
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Unable to get isql working on AIX 7.1

Nick Gorham-2
On 29/01/16 15:58, Sundar Mahadevan wrote:
> Hi Nick,
> Thanks for getting back to me.What db2 conf files are you referring
> to? I did not make any db2 conf file changes. But i can connect fine
> to the DB2 database using the db2 client as shown below.
>
> db2 => list dcs directory

Ok, so that all looks right. I dont know what to suggest. The error you
are getting looks like the driver manager has loaded the driver,
extracted some entry points from it, called the
SQLAllocEnvSQLAllocHandle one and got an error back. This is normally a
config problem in the driver. But other than offer suggestions its past
what I have any control of. unixODBC is built and seems to be working.

--
Nick
_______________________________________________
unixODBC-support mailing list
[hidden email]
http://mailman.unixodbc.org/mailman/listinfo/unixodbc-support
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Unable to get isql working on AIX 7.1

c2dove
Currently using UnixODBC for DB2 mainframe access on aix.
My odbc.ini entry looks as follows:

Driver=/home/db2/tsyscpri/sqllib/lib64/db2o.o
HOST=xxx.xxx.xx.xxx
PORT=1502
LINK=TCPIP
DBTY=DB2
DATABASE=USTSYIPT0D
SUBSYS=PT0D
PLAN=SDBC1010
CPFX=SYSIBM
UID=
# connection failover parameters
AlternateServers=
ConnectionRetryCount=0
ConnectionRetryDelay=3
LoadBalancing=0

Regards
Chris Dove
Information Technology|Data Warehouse & Decision Support | First Citizens Bank
FCB Mail Code:  DAC-71 | 100 E Tryon Road | Raleigh, NC 27603
Office:  919.716.4875


-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On Behalf Of Nick Gorham
Sent: Friday, January 29, 2016 11:06 AM
To: Support for the unixODBC project
Subject: Re: [unixODBC-support] Unable to get isql working on AIX 7.1

On 29/01/16 15:58, Sundar Mahadevan wrote:
> Hi Nick,
> Thanks for getting back to me.What db2 conf files are you referring
> to? I did not make any db2 conf file changes. But i can connect fine
> to the DB2 database using the db2 client as shown below.
>
> db2 => list dcs directory

Ok, so that all looks right. I dont know what to suggest. The error you are getting looks like the driver manager has loaded the driver, extracted some entry points from it, called the SQLAllocEnvSQLAllocHandle one and got an error back. This is normally a config problem in the driver. But other than offer suggestions its past what I have any control of. unixODBC is built and seems to be working.

--
Nick
_______________________________________________
unixODBC-support mailing list
[hidden email]
http://mailman.unixodbc.org/mailman/listinfo/unixodbc-support


---------------------------------------------------------------------
Call 1.888.FC DIRECT (1.888.323.4732) or visit us on the web at www.firstcitizens.com today to take advantage of our great products and services.
This electronic mail and any files transmitted with it are confidential and are intended solely for the use of individual or entity to whom they are addressed. If you are not the intended recipient or the person responsible for delivering the electronic mail to the intended recipient, be advised that if you have received this electronic mail in error and that any use, dissemination, forwarding, printing, or copying of this electronic mail is strictly prohibited. If you have received this electronic mail in error, please immediately notify the sender by return mail.
First Citizens Bank - Helping our customers achieve a lifetime of success. Visit us on the web at www.firstcitizens.com - Member FDIC
---------------------------------------------------------------------

_______________________________________________
unixODBC-support mailing list
[hidden email]
http://mailman.unixodbc.org/mailman/listinfo/unixodbc-support
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Unable to get isql working on AIX 7.1

Sundar Mahadevan
Thanks Nick, Michael, Kevin and Chris. Since I could not get this working for quite sometime, we decided to try easysoft db2 odbc driver that comes with the driver manager and it worked right off the bat. We will be buying the product. Thanks a ton for all the assistance. Appreciate it very much. Have a wonderful day. 

On Fri, Jan 29, 2016 at 3:22 PM, Dove, Chris <[hidden email]> wrote:
Currently using UnixODBC for DB2 mainframe access on aix.
My odbc.ini entry looks as follows:

Driver=/home/db2/tsyscpri/sqllib/lib64/db2o.o
HOST=xxx.xxx.xx.xxx
PORT=1502
LINK=TCPIP
DBTY=DB2
DATABASE=USTSYIPT0D
SUBSYS=PT0D
PLAN=SDBC1010
CPFX=SYSIBM
UID=
# connection failover parameters
AlternateServers=
ConnectionRetryCount=0
ConnectionRetryDelay=3
LoadBalancing=0

Regards
Chris Dove
Information Technology|Data Warehouse & Decision Support | First Citizens Bank
FCB Mail Code:  DAC-71 | 100 E Tryon Road | Raleigh, NC 27603
Office:  919.716.4875


-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On Behalf Of Nick Gorham
Sent: Friday, January 29, 2016 11:06 AM
To: Support for the unixODBC project
Subject: Re: [unixODBC-support] Unable to get isql working on AIX 7.1

On 29/01/16 15:58, Sundar Mahadevan wrote:
> Hi Nick,
> Thanks for getting back to me.What db2 conf files are you referring
> to? I did not make any db2 conf file changes. But i can connect fine
> to the DB2 database using the db2 client as shown below.
>
> db2 => list dcs directory

Ok, so that all looks right. I dont know what to suggest. The error you are getting looks like the driver manager has loaded the driver, extracted some entry points from it, called the SQLAllocEnvSQLAllocHandle one and got an error back. This is normally a config problem in the driver. But other than offer suggestions its past what I have any control of. unixODBC is built and seems to be working.

--
Nick
_______________________________________________
unixODBC-support mailing list
[hidden email]
http://mailman.unixodbc.org/mailman/listinfo/unixodbc-support


---------------------------------------------------------------------
Call 1.888.FC DIRECT <a href="tel:%281.888.323.4732" value="+18883234732">(1.888.323.4732) or visit us on the web at www.firstcitizens.com today to take advantage of our great products and services.
This electronic mail and any files transmitted with it are confidential and are intended solely for the use of individual or entity to whom they are addressed. If you are not the intended recipient or the person responsible for delivering the electronic mail to the intended recipient, be advised that if you have received this electronic mail in error and that any use, dissemination, forwarding, printing, or copying of this electronic mail is strictly prohibited. If you have received this electronic mail in error, please immediately notify the sender by return mail.
First Citizens Bank - Helping our customers achieve a lifetime of success. Visit us on the web at www.firstcitizens.com - Member FDIC
---------------------------------------------------------------------

_______________________________________________
unixODBC-support mailing list
[hidden email]
http://mailman.unixodbc.org/mailman/listinfo/unixodbc-support


_______________________________________________
unixODBC-support mailing list
[hidden email]
http://mailman.unixodbc.org/mailman/listinfo/unixodbc-support
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Unable to get isql working on AIX 7.1

Nick Gorham-2
On 01/02/16 18:55, Sundar Mahadevan wrote:
> Thanks Nick, Michael, Kevin and Chris. Since I could not get this
> working for quite sometime, we decided to try easysoft db2 odbc driver
> that comes with the driver manager and it worked right off the bat. We
> will be buying the product. Thanks a ton for all the assistance.
> Appreciate it very much. Have a wonderful day.

Cool.

--
Nick
_______________________________________________
unixODBC-support mailing list
[hidden email]
http://mailman.unixodbc.org/mailman/listinfo/unixodbc-support
Loading...