Page 1 of 1

DB2 Connector Remote instance

Posted: Fri May 13, 2011 4:24 am
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.

Re: DB2 Connector Remote instance

Posted: Fri May 13, 2011 6:01 am
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

Re: DB2 Connector Remote instance

Posted: Fri May 13, 2011 9:10 am
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. :(

Re: DB2 Connector Remote instance

Posted: Fri May 13, 2011 9:32 am
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 ?

Re: DB2 Connector Remote instance

Posted: Fri May 13, 2011 12:59 pm
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.

Re: DB2 Connector Remote instance

Posted: Fri May 13, 2011 1:01 pm
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.

Re: DB2 Connector Remote instance

Posted: Mon May 16, 2011 2:52 am
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 ?

Posted: Mon May 16, 2011 3:51 am
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.

Posted: Mon May 16, 2011 7:15 am
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 ?

Posted: Mon May 16, 2011 7:33 am
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.

Posted: Mon May 16, 2011 11:10 am
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.