Terawrite worked once, now won't work again

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
bcarlson
Premium Member
Premium Member
Posts: 772
Joined: Fri Oct 01, 2004 3:06 pm
Location: Minnesota

Terawrite worked once, now won't work again

Post by bcarlson »

I have a parallel job that just reads a PX dataset and writes to a Teradata table using the Teradata Enterprise Stage (aka terawrite). It writes using the replace mode. I got it to work a couple of times, and now it won't work at all. The program has not changed. It would work once, then fail a few times and then it would work again.

I am pasting in the log summary in the hopes that someone could shed some light on what is going on.

Code: Select all

Status code = 0 
0   RESET   Tue May 24 09:39:30 2005
    Log cleared by user
1   STARTED Tue May 24 09:40:06 2005
    Starting Job write_pcd_officer_tb_write2. (...)
2   INFO    Tue May 24 09:40:08 2005
    Environment variable settings: (...)
3   INFO    Tue May 24 09:40:09 2005
    Parallel job initiated (...)
4   INFO    Tue May 24 09:40:09 2005
    main_program: Ascential DataStage(tm) Enterprise Edition 7.1r2 (...)
5   INFO    Tue May 24 09:40:09 2005
    main_program: The open files limit is 2000; raising to 2147483647.
6   INFO    Tue May 24 09:40:09 2005
    main_program: orchgeneral: loaded (...)
7   INFO    Tue May 24 09:40:10 2005
    main_program: APT configuration file: /u001/Ascential/DataStage/Configurations/brad.apt (...)
8   INFO    Tue May 24 09:40:47 2005
    main_program: Echo: (...)
9   WARNING Tue May 24 09:40:47 2005
    Teradata_Enterprise_12,2: TeraSession: cli rejected buffer write, stall #0 of 0. [terasession.C:1001]
10  FATAL   Tue May 24 09:40:47 2005
    Teradata_Enterprise_12,2: TeraUtils:Put  failed:  Error Code = 204 [terautils.C:2631]
11  FATAL   Tue May 24 09:40:47 2005
    Teradata_Enterprise_12,2: DBCAREA msg_txt: Completed successfully. (...)
12  FATAL   Tue May 24 09:40:47 2005
    Teradata_Enterprise_12,2: session wait failed, return code = 311 (...)
13  FATAL   Tue May 24 09:40:47 2005
    Teradata_Enterprise_12,2: Error waiting for session. [terautils.C:855]
14  FATAL   Tue May 24 09:40:47 2005
    Teradata_Enterprise_12,2: Cannot write record. [terawriteop.C:1009]
15  FATAL   Tue May 24 09:40:47 2005
    Teradata_Enterprise_12,2: Operator's runLocally() failed [api/operator_rep.C:3883]
16  FATAL   Tue May 24 09:40:56 2005
    Teradata_Enterprise_12,2: Operator terminated abnormally: runLocally did not return APT_StatusOk [processmgr/rtpexecutil.C:161]
17  INFO    Tue May 24 09:40:56 2005
    Teradata_Enterprise_12: Teradata write operator was run from a step which did not run to completion.The recovery which will take
 place depends on how far the write progressed. Please see the messages  (...)
18  FATAL   Tue May 24 09:40:56 2005
    Teradata_Enterprise_12: TeraGenericQuery Error: Request Close failed:  Error Code = 305 Session return code = 305 , DBC return c
ode = 305 [genericquery.C:823] (...)
19  FATAL   Tue May 24 09:40:56 2005
    main_program: Step execution finished with status = FAILED. [sc/sc_api.C:252]
20  INFO    Tue May 24 09:40:56 2005
    main_program: Startup Time 0:25 Production Run Time 0:22
21  STARTED Tue May 24 09:40:57 2005
    Job write_pcd_officer_tb_write2 aborted.
I get the same errors whether the target table exists beforehand or not. Any ideas? If you need more info from the log, let me know.
Jay
Participant
Posts: 105
Joined: Tue Nov 11, 2003 8:28 pm

Post by Jay »

every time u run the job, some 2-3 log tables are created...if there are errors u have to delete them and re-run your job...u can view the log tables when do a refresh in the teradata client....they will be created in the same schema as your other tables...

i am forgetting the name of the log tables..but check the documentations...u shud get 'em...

Jay
bcarlson
Premium Member
Premium Member
Posts: 772
Joined: Fri Oct 01, 2004 3:06 pm
Location: Minnesota

Post by bcarlson »

Unfortunately I already thought of that (sorry, didn't mention it in the first posting). The tables I found were <database>.terasync and <database>.ORCH_WORK_######## (where #'s appear to be a generated unique id per execution). Are those the tables you were thinking of?

I have tried running both with and without those tables pre-existing. Didn't make a difference.
nrevezzo
Participant
Posts: 15
Joined: Mon Sep 08, 2003 2:36 pm

Post by nrevezzo »

This is a known problem in DataStage v7.1:
9 WARNING Tue May 24 09:40:47 2005
Teradata_Enterprise_12,2: TeraSession: cli rejected buffer write, stall #0 of 0. [terasession.C:1001]
10 FATAL Tue May 24 09:40:47 2005
Teradata_Enterprise_12,2: TeraUtils:Put failed: Error Code = 204 [terautils.C:2631]

Ecase 68549 is the fix. Contact Ascential support to get the patch
bcarlson
Premium Member
Premium Member
Posts: 772
Joined: Fri Oct 01, 2004 3:06 pm
Location: Minnesota

Post by bcarlson »

nrevezzo wrote: Ecase 68549 is the fix. Contact Ascential support to get the patch
Thanks for the patch info. Our software guy will be working on getting that installed. We'll see if that takes care of it.
bcarlson
Premium Member
Premium Member
Posts: 772
Joined: Fri Oct 01, 2004 3:06 pm
Location: Minnesota

Post by bcarlson »

Nrevezzo,

We installed the patch you recommended and now my job is working great! Thanks for the info, you saved a lot of confused head scratching.
Post Reply