Page 1 of 1

DB2 connection problems on AIX

Posted: Tue Aug 23, 2005 3:57 pm
by PilotBaha
I am having problems binding a db in the AIX/DB2 environment..


odbc.ini file : (i didn't name the db sample :roll: )

Code: Select all

[SAMPLE]
Driver=/opt/Ascential/DataStage/branded_odbc/lib/VMdb220.so
Description=DataDirect 5.00 DB2 Wire Protocol Driver
AddStringToCreateTable=
AlternateID=
Collection=
Database=SAMPLE
DynamicSections=100
GrantAuthid=PUBLIC
GrantExecute=1
IpAddress=s5971002
IsolationLevel=CURSOR_STABILITY
Location=
LogonID=dsadmn
Password=dsadmn123
Package=

uvodbc.config file :

Code: Select all

<SAMPLE>
DBMSTYPE = ODBC

When I try to run bind20 I get the following error message:
./bind20 SAMPLE
Datasource not found.

.config file is residing on
/opt/Ascential/DataStage/DSEngine
odbc.ini file is in
/opt/Ascential/DataStage/branded_odbc

are these locations correct? Am I missing something?


Thanks..

Posted: Tue Aug 23, 2005 9:29 pm
by trokosz
Well my immediate observation is that you did not provide a "Package" name in the .odbc.ini file. Do that and try the bind again.

Posted: Wed Aug 24, 2005 5:30 pm
by PilotBaha
Thanks for the reply.. that issue has been taken care of..
Now I get the following error :

Code: Select all

s5971002:/opt/Ascential/DataStage/branded_odbc/lib $ ./bind20 SAMPLE
exec(): 0509-036 Cannot load program ./bind20 because of the following errors:
        0509-150   Dependent module libVMicu20.a(VMicu20.so) could not be loaded.
        0509-022 Cannot load module libVMicu20.a(VMicu20.so).
        0509-026 System error: A file or directory in the path name does not exist.
Tried to find this in IBM's DB2 documents , but it returned nada..

Posted: Wed Aug 24, 2005 8:13 pm
by trokosz
I see....You need to source your key environment variables before you run the utility like the odbc_home and a few others that excape me. You do this manually at the Unix command.....then run that script.

Posted: Thu Aug 25, 2005 8:49 am
by ml
Hi,

you need to run . ./dsenv before ./bind20

Posted: Thu Aug 25, 2005 10:51 am
by PilotBaha
ml wrote:Hi,

you need to run . ./dsenv before ./bind20
Of course.. that is no brainer..and that 's how i have been doing.. I am working with "them" on this, but they are getting back to me later than you guys :)

Posted: Thu Aug 25, 2005 12:30 pm
by ml
Do you have the DSHOME/branded_odbc/lib seted up on the LIBPATH in dsenv file?

I see the same error message when I run ./bind20 and i didn't load the ds env vbles.

Posted: Thu Feb 02, 2006 7:56 am
by Leonie
I had the same problem and added the odbc libraries to the LIBPATH

when I execute the bind20 script I get the following.

USAGE: ./bind20 <DSN>

But if I put the the DSN name in I get the following.

[galaxy:dsadm]/home/datastage/Ascential/DataStage/branded_odbc/lib ./bind20 Hogan

Specified driver could not be loaded.[galaxy:dsadm]/home/datastage/Ascential/DataStage/branded_odbc/lib>


:cry:

I'm trying to connect to OS/390

Do I need to install other DB2 drivers or will this driver be sufficient?


This is my entry in the odbc.ini file
[Hogan]
Driver=/home/datastage/Ascential/DataStage/branded_odbc/lib/VMdb220.so
Description=DataDirect 5.00 DB2 Wire Protocol Dri
AddStringToCreateTable=
AlternateID=
Collection=OS/390
DynamicSections=100
GrantAuthid=PUBLIC
GrantExecute=1
IpAddress=10.00.000.00
IsolationLevel=CURSOR_STABILITY
Location=dbname
LogonID=
Password=
Package=DB2 package name
PackageOwner=
TcpPort=000
WithHold=1


Please help :)

Posted: Thu Feb 02, 2006 8:48 am
by ml
Hi, Leonie

You don't need any other driver.

Are you sure that you add the correct "$DSHOME`/branded_odbc/lib" to de LIBPATH in dsenv file and after that did you restart the services?

mat

Posted: Fri Feb 03, 2006 12:02 am
by Leonie
Hi Mat,

I not sure but this is my LIBPATH at the moment. Is something missing, do I
need more entries?

I did stop and start the services after adding the libraries.

[galaxy:dsadm]/home/datastage> echo $LIBPATH
/opt/sybase/OCS-12_5/lib:/home/IQ/ASIQ-12_6/lib:/home/IQ//home/IQ/OCS-12_5/lib
:/home/IQ/ASIQ-12_6/lib32:/home/datastage/Ascential/DataStage/DSEngine/lib:
:/home/datastage/Ascential/DataStage/branded_odbc/lib

:)

Thanks

Leonie

Posted: Fri Feb 03, 2006 6:03 am
by Eric
ml wrote: you need to run . ./dsenv before ./bind20
Leonie, why don't you source the dsenv file as ml suggested ...

Posted: Fri Feb 03, 2006 7:37 am
by chulett
Can't help on the specifics of DB2 connections, but in general...

There should be no need to manually add the branded odbc libraries to the library path, that happens automatically during the installation and is controlled by the dsenv file. Adding it into the user's .profile won't help when it comes to running jobs, if that is what you meant that you did. That's also why it's important to 'source' the dsenv file (as others have already noted) when working at the command line so that you have (basically) the same environment as when your jobs run.

Just in case anyone is wondering, while you do need to stop/restart the engine when making changes to dsenv, there is no need to do so after adding an ODBC DSN entry.

The original poster made an interesting comment:
.config file is residing on
/opt/Ascential/DataStage/DSEngine
odbc.ini file is in
/opt/Ascential/DataStage/branded_odbc
The uvodbc.config file resides in both the $DSHOME directory and each Project directory that needs to use entries from it. DataStage can automatically add the Project entry, but I prefer to do it myself explicitly. The .odbc.ini file resides in the $DSHOME directory. Those other locations may work when 'binding', I don't really know, but these locations are where they need to reside for proper ODBC operation of your jobs.

Posted: Fri Feb 03, 2006 8:05 am
by ml
Craig is right. The LIBPATH I mentioned is the one in the dsenv file, located in "../DataStage/Engine".

So, Leonie check the dsenv file (if you need to make any change on it, you will need to stop/start ds services), then check the .odbc.ini file and set the correct values for your OS390 connection.

If you can't find anything wrong, conntact IBM. May be there is something wrong with the "VMdb220.so".

Do you have any other ODBC connection working on this server?

Posted: Fri Feb 03, 2006 8:44 am
by Leonie
I do have other DB2 database - they all run on AIX. They worked without having to bind then. The problem is when I try to connect to the MAINFRAME (OS390). The other connections is also using the same driver, so I think the driver is fine it is the Mainframe part that is tricky.

Here is an example of one that does work.....


[Siebel]
Driver=/home/datastage/Ascential/DataStage/branded_odbc/lib/VMdb220.so
Description=DataDirect 5.00 DB2 Wire Protocol Driver
AddStringToCreateTable=
AlternateID=
Database=SIEBEL
DynamicSections=100
GrantAuthid=PUBLIC
GrantExecute=1
IpAddress=10.00.000.00
IsolationLevel=CURSOR_STABILITY
LogonID=userid
Password=password
Package=DB2 package name
PackageOwner=
TcpPort=11111
WithHold=1

I have bind SIEBEL before I set the LIBPATH and it worked.
:?: