DB2 Connector Remote instance

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
le thuong
Premium Member
Premium Member
Posts: 76
Joined: Wed Sep 09, 2009 5:21 am

DB2 Connector Remote instance

Post by le thuong »

I have a new installation Information Server V8.5 64-bit on Windows Server. A simple job reading a sequential file and writing to a remote DB2 table with DB2 connector stage (Runtime Column Propagation active).

In Datastage, we succesfully test the connection and we can view the data, but when running the job, we get the following error:

main_program: Fatal Error: An error occurred validating the DB2 instance. Verify that a valid DB2 instance is specified in the Instance property.

What did I miss ?
Thanks for your input.
Thuong

best regards
MT
Premium Member
Premium Member
Posts: 198
Joined: Fri Mar 09, 2007 3:51 am

Re: DB2 Connector Remote instance

Post by MT »

Hi le thuong

in the DS 8.5 connector stage you can specify an instance name
make sure that - if specified - it is the DB2 instance name of the client
instance - the one where your DataStage server resides.

In my eyes they should have named it client instance - but who asks me :-)

I hope this helps
regards

Michael
le thuong
Premium Member
Premium Member
Posts: 76
Joined: Wed Sep 09, 2009 5:21 am

Re: DB2 Connector Remote instance

Post by le thuong »

I tried 2 instances:
- I can view the data with the Remote instance name.
- I cannot view the data with the local instance name.

Unfortunately, we are still blocked. :(
Thuong

best regards
le thuong
Premium Member
Premium Member
Posts: 76
Joined: Wed Sep 09, 2009 5:21 am

Re: DB2 Connector Remote instance

Post by le thuong »

Our Information Server V8.5 is under Windows Server 2008 64-bit. Our remote DB2 is under Suse Linux 64-bit.
I tried to set up a ODBC Connector and got an error: mismatch architecture between client and application ? Does this mean that the DB2 driver taken in the Windows Server cannot interface the DB2 in Linux ?
Thuong

best regards
MT
Premium Member
Premium Member
Posts: 198
Joined: Fri Mar 09, 2007 3:51 am

Re: DB2 Connector Remote instance

Post by MT »

Hi le thuong
- I can view the data with the Remote instance name.
- I cannot view the data with the local instance name.
This does not make any sense to me - the "remote" instance name is not needed at all for conncting to the DB2 server.

Our Information Server V8.5 is under Windows Server 2008 64-bit. Our remote DB2 is under Suse Linux 64-bit.
I tried to set up a ODBC Connector and got an error: mismatch architecture between client and application ? Does this mean that the DB2 driver taken in the Windows Server cannot interface the DB2 in Linux ?
No - it is no problem connecting from Windows to Linux or Unix in the currently suppoted DB2 versions.

Have you tried to connect from the command line?
Open a DB2CLP and try
db2 connect to <dbalias> user <userid>
and you will get prompted for th password.

This has to work - outside DataStage - if it works try connecting in the DBw connector stage without specifying n Instance name (assuming you got only one client instane running on your DataStag server.

Let us see how far you get.
regards

Michael
MT
Premium Member
Premium Member
Posts: 198
Joined: Fri Mar 09, 2007 3:51 am

Re: DB2 Connector Remote instance

Post by MT »

Hi le thuong
- I can view the data with the Remote instance name.
- I cannot view the data with the local instance name.
This does not make any sense to me - the "remote" instance name is not needed at all for conncting to the DB2 server.

Our Information Server V8.5 is under Windows Server 2008 64-bit. Our remote DB2 is under Suse Linux 64-bit.
I tried to set up a ODBC Connector and got an error: mismatch architecture between client and application ? Does this mean that the DB2 driver taken in the Windows Server cannot interface the DB2 in Linux ?
No - it is no problem connecting from Windows to Linux or Unix in the currently suppoted DB2 versions.

Have you tried to connect from the command line?
Open a DB2CLP and try
db2 connect to <dbalias> user <userid>
and you will get prompted for th password.

This has to work - outside DataStage - if it works try connecting in the DBw connector stage without specifying n Instance name (assuming you got only one client instane running on your DataStag server.

Let us see how far you get.
regards

Michael
le thuong
Premium Member
Premium Member
Posts: 76
Joined: Wed Sep 09, 2009 5:21 am

Re: DB2 Connector Remote instance

Post by le thuong »

Thanks for your input.
We did not specify the instance name (we only specified database name, user id and password) - and surprisingly, it works now.

What happens if we have 2 instances (instance A and instance B), and the same database name ?
Thuong

best regards
MT
Premium Member
Premium Member
Posts: 198
Joined: Fri Mar 09, 2007 3:51 am

Post by MT »

Hi,
We did not specify the instance name (we only specified database name, user id and password) - and surprisingly, it works now.
good to know
What happens if we have 2 instances (instance A and instance B), and the same database name ?
Well, one will be choosen - the one which is defined in the profile of the dsadm user.
Please note that we talk about client instances again - instances on the DataStage server where (at least) a DB2 client ist installed.
It is quite unlikely that you have more than one instance though.

YOu can check the client instance if you log in as dsadm and do an set or env (depending on your environment) to list the environment variables and look for the value og DB2INSTANCE.
regards

Michael
le thuong
Premium Member
Premium Member
Posts: 76
Joined: Wed Sep 09, 2009 5:21 am

Post by le thuong »

Thanks Michael.
Let's agree on what is local and what is remote.
We installed Datastage engines with DB2 repository (in one server A) and this is the local DB2 instance. Is it correct ?
Then we have another server (B) where we run another DB2 instance to store the data tables. This is the remote DB2 instance. Is this correct ?
Which value will have the environment variable DB2INSTANCE in Server A ? Instance A or Instance B ?
Thuong

best regards
greggknight
Premium Member
Premium Member
Posts: 120
Joined: Thu Oct 28, 2004 4:24 pm

Post by greggknight »

Lets see,
I have 8.5 32bit installed with a Local DB2 database for the repository
and I have 8.5 64bit installed with SQL server on a different server installed as the repository.

on 8.5 32bit you need to go into the DB2 control panel and connect to the remote DB2 instance that you are going to be using. That means add it to your instances. You will see the xmeta there. Add your target Instance. Once that configuration is done you can use that instance name in you Stage.

Since on the 64bit box I have no DB2 installed I installed the iSeries ODBC drivers to connect to my DB2 database.
"Don't let the bull between you and the fence"

Thanks
Gregg J Knight

"Never Never Never Quit"
Winston Churchill
MT
Premium Member
Premium Member
Posts: 198
Joined: Fri Mar 09, 2007 3:51 am

Post by MT »

le thuong wrote:Thanks Michael.
Let's agree on what is local and what is remote.
We installed Datastage engines with DB2 repository (in one server A) and this is the local DB2 instance. Is it correct ?
Then we have another server (B) where we run another DB2 instance to store the data tables. This is the remote DB2 instance. Is this correct ?
Which value will have the environment variable DB2INSTANCE in Server A ? Instance A or Instance B ?
Hi le thuong,

well yes - DB2INSTANCE should not be server B.
Check if your remote database (which holds the tables you want to access) is cataloged in the server a instance - you can do this with

Code: Select all

db2 list db directory 
from the DB2 Command line or from the shell (in Unix).
Because you have installed DataStage and the DB2 respository on one server there could also be more than one instance in the server.
Check the evironment of your dsadm user and then run the command I listed above and see if you can find the db alias of your remote DB2 database.
regards

Michael
Post Reply