Unable to connect the database

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

wernerg_at
Premium Member
Premium Member
Posts: 30
Joined: Thu Jan 14, 2010 5:46 am
Location: Austria

Post by wernerg_at »

prasanna_anbu wrote:I have used the enterprise stage and I passed the credentials as parameterset values. The Password is hardcode in the parameterset against the database name. I am getting the same error when I tried to viewdata.
Do you use special characters in your password?

If so, try to enclose your password in either single or double quotes.
prasanna_anbu
Participant
Posts: 42
Joined: Thu Dec 28, 2006 1:39 am

Post by prasanna_anbu »

I conncted a datastage client with two databases(DB1 and DB2) in the different environment. here the database alaias names(DB) are same, but the instants names are different. I can able to connect a database but not the other one. Is that any problem to keep the database alias name as same.
wernerg_at
Premium Member
Premium Member
Posts: 30
Joined: Thu Jan 14, 2010 5:46 am
Location: Austria

Post by wernerg_at »

to be honest I'm a little bit confused right now. you said you're using db2 enterprise stage hence you are using either db2 client instance libraries or libraries from your local db2 xmeta repository instance.

You should issue the following commands on your AIX and doublecheck it with your

DataStage Environment Settings
e.g DB2INSTANCE, APT_DBNAME or DB2DBDFT

and/or your
DB2 Enterprise Stage Settings
e.g. Use Default Database, Use Default Server, Server, Client Instance Name, Database

to list your db2 instances
# db2ilist

to get the active instance
# db2 get instance

to list your db catalog for an instance
# db2 list db directory

note:
if you're not sure about these db2 commands you should consult your local db2 admin.

you may need to set db2instance environment variable before if you use more than one instance

if you're running the datastage engine and the services tier on different machines you have to issue the commands on the machine where the engine resides.
wernerg_at
Premium Member
Premium Member
Posts: 30
Joined: Thu Jan 14, 2010 5:46 am
Location: Austria

Post by wernerg_at »

another useful check:
try to establish a connection to the database in question from your db2 instance on AIX (DataStage Engine) via the command line processor.

the command is:
# db2 connect to <thisDatabase> user <thisUser> using <thisPassword>

If it's working you know that your problem is related to wrong settings in your DataStage Project/Job (as stated in my last reply).
prasanna_anbu
Participant
Posts: 42
Joined: Thu Dec 28, 2006 1:39 am

Post by prasanna_anbu »

wernerg_at wrote:another useful check:
try to establish a connection to the database in question from your db2 instance on AIX (DataStage Engine) via the command line processor.

the command is:
# db2 connect to <thisDatabase> user <thisUser> using <thisPassword>

If it's working you know that your problem is related to wrong settings in your DataStage Project/Job (as stated in my last reply).
Thanks for your valueble feedback, but i am not able to connect from datastage to Database in the command line. but i am able to connect to the database from other servers.
wernerg_at
Premium Member
Premium Member
Posts: 30
Joined: Thu Jan 14, 2010 5:46 am
Location: Austria

Post by wernerg_at »

To provide you with further hints or advices I would expect, that you provide more detailed information about the error e.g. a db2 clp error code from your connect-attempt via the aix command line, an output of db2ilist/db2 list db directory or something similar.

A possible reason is that you have a problem with the db2instance environment variable (which actually plays a role on your aix box and within datastage) and databases with the same name/alias under different db2 instances.

As I already mentioned you may consult your local db2 admin to get the aix/command line connection up and running. As soon as you worked this out you'll be able to fix your datastage connection issues as well.
prasanna_anbu
Participant
Posts: 42
Joined: Thu Dec 28, 2006 1:39 am

Post by prasanna_anbu »

Thanks for everyone who gave me the valueble feedback,

the issue had been resolved by uncataloging and cataloging. I have given below the steps


db2 => uncatalog db <DatabaseName>

db2 => uncatalog node <DB Cluster Name>

db2 catalog tcpip node <DB Cluster Name> remote <DB Cluster FQDN> server 50020

db2 catalog database <DatabaseName> as <Database Alias Name> at node <DB Cluster Name>

Thanks
Prasanna.
Post Reply