DB2 connection problems on AIX

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
PilotBaha
Premium Member
Premium Member
Posts: 202
Joined: Mon Jan 12, 2004 8:05 pm

DB2 connection problems on AIX

Post 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..
Earthbound misfit I..
trokosz
Premium Member
Premium Member
Posts: 188
Joined: Thu Sep 16, 2004 6:38 pm
Contact:

Post 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.
PilotBaha
Premium Member
Premium Member
Posts: 202
Joined: Mon Jan 12, 2004 8:05 pm

Post 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..
Earthbound misfit I..
trokosz
Premium Member
Premium Member
Posts: 188
Joined: Thu Sep 16, 2004 6:38 pm
Contact:

Post 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.
ml
Participant
Posts: 82
Joined: Wed Jun 09, 2004 1:03 pm
Location: Argentina

Post by ml »

Hi,

you need to run . ./dsenv before ./bind20
PilotBaha
Premium Member
Premium Member
Posts: 202
Joined: Mon Jan 12, 2004 8:05 pm

Post 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 :)
Earthbound misfit I..
ml
Participant
Posts: 82
Joined: Wed Jun 09, 2004 1:03 pm
Location: Argentina

Post 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.
Leonie
Participant
Posts: 16
Joined: Thu Jul 31, 2003 7:16 am
Location: South Africa
Contact:

Post 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 :)
ml
Participant
Posts: 82
Joined: Wed Jun 09, 2004 1:03 pm
Location: Argentina

Post 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
Leonie
Participant
Posts: 16
Joined: Thu Jul 31, 2003 7:16 am
Location: South Africa
Contact:

Post 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
Eric
Participant
Posts: 254
Joined: Mon Sep 29, 2003 4:35 am

Post by Eric »

ml wrote: you need to run . ./dsenv before ./bind20
Leonie, why don't you source the dsenv file as ml suggested ...
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post 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.
-craig

"You can never have too many knives" -- Logan Nine Fingers
ml
Participant
Posts: 82
Joined: Wed Jun 09, 2004 1:03 pm
Location: Argentina

Post 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?
Leonie
Participant
Posts: 16
Joined: Thu Jul 31, 2003 7:16 am
Location: South Africa
Contact:

Post 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.
:?:
Post Reply