Problem with Surrogate Key generator stage

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
mydsworld
Participant
Posts: 321
Joined: Thu Sep 07, 2006 3:55 am

Problem with Surrogate Key generator stage

Post by mydsworld »

I am using a Surrogate Key generator stage.It runs fine with with a source type = 'File'.But when I am using the Database(DB2) sequence, the job aborts with error :

Surrogate_Key_Generator_1,1: Error Idx = 1;
DB2Driver Embedded SQL message: ;
sqlcode = -1390;
sqlstate =

Surrogate_Key_Generator_1,1: Failed to connect to the database
Surrogate_Key_Generator_1,1: The runLocally() of the operator failed.

Please advise.
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

Since it couldn't connect to the database did you check the userid, password and instance to ensure that they are correct? Have you connected to DB2 in you installation already?
mydsworld
Participant
Posts: 321
Joined: Thu Sep 07, 2006 3:55 am

Post by mydsworld »

yes, I have connected to DB2 while using DB2 API stage, but the connection seems to be not working here.I have checked the username,password,client instance name. Is there any other method to debug the stage (as I don't find any option such as view data etc).
mydsworld
Participant
Posts: 321
Joined: Thu Sep 07, 2006 3:55 am

Post by mydsworld »

Does anyone have solution to this.

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

Post by ray.wurlod »

Find out what sqlcode -1390 means, then address that.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

You can do it using this command

Code: Select all

db2 ? sql-1390
Last edited by ArndW on Fri May 09, 2008 4:21 am, edited 1 time in total.
OddJob
Participant
Posts: 163
Joined: Tue Feb 28, 2006 5:00 am
Location: Sheffield, UK

Post by OddJob »

db2 ? sql-1390


SQL1390C The environment variable DB2INSTANCE is not defined or
is invalid.

Explanation:

The environment variable DB2INSTANCE is not defined or is not set
to a valid instance owner.

User Response:

Set the DB2INSTANCE environment variable to the name of the
instance to use. If you do not know the name of the instance to
use or how to set the DB2INSTANCE environment variable to the
instance name, refer to the Administration Guide .

Federated system users: refer to the Federated Systems Guide for
DB2INSTANCE information.

Ensure your PATH environment variable contains the sqllib/adm
path in the home directory of the instance you want to use (for
example, /u/instance/sqllib/adm, where /u/instance is the home
directory of the instance owner on a UNIX system).
Post Reply