DB2EE stage - write data to 2 different DB instances

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
shin0066
Premium Member
Premium Member
Posts: 69
Joined: Tue Jun 12, 2007 8:42 am

DB2EE stage - write data to 2 different DB instances

Post by shin0066 »

Hi,

We have 2 ETL applications running on same application server - each uses different DB2 instances. Requirement is both applications needs to write data using DB2EE stage,where are currently one DB2 instance is cataloged and it has needed db server information in db2nodes.cfg file.

Is there any option, we can provide both applications to use DB2EE stage to write data into their own DB environment?

Thanks,
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Just set the DB2-related environment variables separately for each "application".
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
shin0066
Premium Member
Premium Member
Posts: 69
Joined: Tue Jun 12, 2007 8:42 am

Post by shin0066 »

Hi Ray,

You are suggesting to DB2 environment variables like instance information in dsenv file? if so, how do we flip dsenv db2 environment variables for different project?
appreciate your input.

Thanks,
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Put the environment variables into the project's environment variables.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
bcarlson
Premium Member
Premium Member
Posts: 772
Joined: Fri Oct 01, 2004 3:06 pm
Location: Minnesota

Post by bcarlson »

We use job parameters for connecting to the database and provide the following: client instance, server instance, user name, password, database name. There shouldn't be anything preventing you from connecting to either of the databases if you pass all the parameters.

Brad
It is not that I am addicted to coffee, it's just that I need it to survive.
shin0066
Premium Member
Premium Member
Posts: 69
Joined: Tue Jun 12, 2007 8:42 am

Post by shin0066 »

Hi,

As long as i pass DBname, Instancename, Id and Password ETL job works fine. But when i try to log to Designer and try to import Metadata via ODBC or Plug in metadata options it is throwing SQL1013N error. Any idea what else needs to be done to over come this issue.

Thanks,
MTA
Participant
Posts: 37
Joined: Thu Feb 02, 2006 2:25 pm

Post by MTA »

Check odbc.ini file in DS engine
shin0066 wrote:Hi,

As long as i pass DBname, Instancename, Id and Password ETL job works fine. But when i try to log to Designer and try to import Metadata via ODBC or Plug in metadata options it is throwing SQL1013N error. Any idea what else needs to be done to over come this issue.

Thanks,
M.T.Anwer
The day the child realizes that all adults are imperfect he becomes an adolescent;
the day he forgives them, he becomes an adult; the day he forgives himself, he becomes wise.
-Aiden Nowlan
MTA
Participant
Posts: 37
Joined: Thu Feb 02, 2006 2:25 pm

Post by MTA »

Check odbc.ini file in DS engine
shin0066 wrote:Hi,

As long as i pass DBname, Instancename, Id and Password ETL job works fine. But when i try to log to Designer and try to import Metadata via ODBC or Plug in metadata options it is throwing SQL1013N error. Any idea what else needs to be done to over come this issue.

Thanks,
M.T.Anwer
The day the child realizes that all adults are imperfect he becomes an adolescent;
the day he forgives them, he becomes an adult; the day he forgives himself, he becomes wise.
-Aiden Nowlan
shin0066
Premium Member
Premium Member
Posts: 69
Joined: Tue Jun 12, 2007 8:42 am

Post by shin0066 »

database entry is already been in .odbc.ini file.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Do you have the database environment variables in your Administrator client (that is, in the DSParams file for the project)?
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
shin0066
Premium Member
Premium Member
Posts: 69
Joined: Tue Jun 12, 2007 8:42 am

Post by shin0066 »

yes,
I did set APT_DB2INSTANCE_HOME to "2nd db2 instance"

1st db2 instance is set in dsenv file. I am overriding 2nd db2 instance in DS Admin for specific to this project only. But some how when i log to this specific project APT_DB2INSTANCE_HOME is not reflecting to 2nd db2 instance.

DB2EE stage is working file when i pass dbinstance, id and password but not the ODBC stage is not working. I provided driver information in .odbc.ini and updated uvodbc.config for this specific project. When i perform ./example program from branded_odbc folder it is working but i have to export DB2INSTANCE='2nd db2 instance'.

Any advise is appreciated.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Put ALL of the database environment variables into your project (in the Administrator client), and use environment variable job parameters to override the value (as required) on a per-job basis.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
shin0066
Premium Member
Premium Member
Posts: 69
Joined: Tue Jun 12, 2007 8:42 am

Post by shin0066 »

Hi Ray,

Can't it be done with out use of environment variables per job basis in job parameters?

for example if i want to import ODBC metadata - how does job level parameters works?

Thanks,
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

I don't think so. If you find a way please post your findings.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
shin0066
Premium Member
Premium Member
Posts: 69
Joined: Tue Jun 12, 2007 8:42 am

Post by shin0066 »

Thanks for the info Ray,

Now ODBC stage is working after adding a user variable called DB2INSTANCE = '2nd instance' name, I could able to point to DB2 database and extract data but when i try to import meta data using ODBC or Plug-in methods getting SQL1013N error.

Today I updated LIBPATH and PATH for DataStage project on Administrator client to add 2nd instance information - but what ever i provided in LIBPATH and PATH in administrator will get padded at the end of sourced dsenv libpath and path string - so 1st instance is coming before 2nd instance information - i guesss that is why when i try to import meta data process not taking 2nd instance information. But i was doing changing LIBPATH and PATH for this specific DS project today morning - at one point i was able to import Metadata using ODBC and Plug-in option, but after 30 min when i try to do the same thing it was giving SQL1013 - not sure what i did to get it worked - i tried all the option it is not working.

Any idea how to resolve SQL1013N for meta data import.

Thanks,
Post Reply