Error using surrogate key in transformer

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
anu123
Premium Member
Premium Member
Posts: 143
Joined: Sun Feb 05, 2006 1:05 pm
Location: Columbus, OH, USA

Error using surrogate key in transformer

Post by anu123 »

Hello All,

I am getting the following error when I am trying to generate Surrogate Key in the transformer. I am using function NextSurrogateKey().

xfmr_data,0: Operator terminated abnormally: received signal SIGSEGV
main_program: Step execution finished with status = FAILED.

I am using DB sequence. We are using DB2 database, version 10x, I guess, not sure. But definitely above 9. I have provided the sourcename (UDP.SRA_POST_SEQ - This is the Sequence name), User name, password, Database name.I have also verified APT_DBNAME.

If I haven't tried to generate Surrogate Key, Job runs fine and I am able to capture data in a dataset. I am facing this issue when trying to generate a surrogate key value.

Parallel Job.
DS version: 8.1.
Unix

Please shed some light. Do I need to provide any other details.

Thank you every one.
Thank you,
Anu
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Have you filled in the state file (or sequence) information on the Surrogate Key tab?
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

How was the DB2 Sequence created? From what I recall, the stage has to create it which means a separate one-time job to do that. From what I recall. :wink:
-craig

"You can never have too many knives" -- Logan Nine Fingers
anu123
Premium Member
Premium Member
Posts: 143
Joined: Sun Feb 05, 2006 1:05 pm
Location: Columbus, OH, USA

Post by anu123 »

ray.wurlod wrote:Have you filled in the state file (or sequence) information on the Surrogate Key tab?
Ray, Yes I did. I have selected DBSequence for Source Type, I have given the table Sequence name in Source Name, Database Type - DB2, Provded Username, Password and Database Name. The database is on the same server, so I haven't provided Client Instance Name.
Thank you,
Anu
anu123
Premium Member
Premium Member
Posts: 143
Joined: Sun Feb 05, 2006 1:05 pm
Location: Columbus, OH, USA

Post by anu123 »

chulett wrote:How was the DB2 Sequence created? From what I recall, the stage has to create it which means a separate one-time job to do that. From what I recall. :wink:
Chulett, At the database level it is an auto incremented value by 1. Generally if I am writing a sequel to insert values into Databse I am using SequenceName.nextval. I thought if I have given the sequence name in the surrogate key tab in the transformer and used NextSurrogateKey() in the column derivation in transformer, then it will be same as using nextval function. Please correct me if I am wrong.

Thanks.
Thank you,
Anu
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

The documentation notes some 'extra steps' are required for DB2 usage of that function:
7. If the database type is DB2, complete some additional steps:
a. In the Database name field, type the name of the database. If you leave this field blank, the stage uses the name that is specified by the environment variable APT_DBNAME, or by the variable DB2DBDFT if APT_DBNAME is not set.
b. In the Client instance name field, type the name of the DB2 client instance. This field is required for a remote database.
c. In the Client alias DB name field, type the name of the client alias database on the remote server. This field is needed only if the alias database name is not the same as the server database name.
FYI
-craig

"You can never have too many knives" -- Logan Nine Fingers
anu123
Premium Member
Premium Member
Posts: 143
Joined: Sun Feb 05, 2006 1:05 pm
Location: Columbus, OH, USA

Post by anu123 »

Chulett, Thank you for searching that for me.

But I have seen those step and verified all those. I have also mentioned those details in my first post, that DB is on same server and I have verified APT_DBNAME and also provided the database name while running the job.

Is there any other checks I need to do.

Thanks.
Thank you,
Anu
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Well, that's good.

I am still under the impression that you need to let DataStage create the sequence. In any case, why not ping your official support provider, see what they say regarding your error?
-craig

"You can never have too many knives" -- Logan Nine Fingers
anu123
Premium Member
Premium Member
Posts: 143
Joined: Sun Feb 05, 2006 1:05 pm
Location: Columbus, OH, USA

Post by anu123 »

Our DB2 is on mainframe and we are connecting through a gateway. So I guess we can't use it atleast in 8.1 version.
Thank you,
Anu
Post Reply