Page 1 of 1

Data missing in teradata tables

PostPosted: Tue Oct 15, 2013 4:04 pm
by surime72
Hi,

I doesn't see any option Teradata,

I have faced problem with data missing tables and I was new to it problem is have validated the jobs which loads the data into Teradata table for the missing days and found that all the jobs were completed successful and there was no error logs or failure message/abends in the Job.The job logs confirms the same with the record count of the record insert/updated table matching with the actual count.

Problem is both the jobs which are used to load the data into tables has been ran at a time this causes the issue.

Can you please advise your taughts inorder to overcome this issue in future...!

Re: Data missing in teradata tables

PostPosted: Tue Oct 15, 2013 4:48 pm
by BillyBoyo
Ensure, via your Scheduler, that they cannot be run at the same time in future.

You could also include a "lock" file with DISP=OLD in both jobs. Just a DD statement with a DSN on it and DISP=OLD. It doesn't have to be used by any program, but it will ensure the two jobs cannot be run at the same time even if they are both submitted/released at the same time.

Also, someone has to go back as far as they can to find other instances of this which may have happened. Long way is going back through logs. Short way (takes more thinking about, but less time and potentially more accurate) is to work out from the data whether you can identity any missing data. This may be from the Terradata data or from the source data, or some combination. You should ensure through your boss that all users know of the problem and the results of the verification. You boss should know how to present this diplomatically to the users.

Re: Data missing in teradata tables

PostPosted: Tue Oct 15, 2013 5:42 pm
by surime72
Hi Billy,

Thanks for your reply...

1)Two jobs will run on different time in scheduler but unfortunatley on that day due to dependent jobs two jobs has been run at the same time

2)We can't use "lock" file with DISP=OLD, Because we have two different files inorder to load the data in two different tables.

Please let me know if my understanding is wrong...!

Re: Data missing in teradata tables

PostPosted: Tue Oct 15, 2013 6:02 pm
by BillyBoyo
The lock is simple:

//LOCKJOB1 DD DSN=same.name.for.both.jobs,DISP=OLD

//LOCKJOB2 DD DSN=same.name.for.both.jobs,DISP=OLD


You put those in the step which is doing the updating. The name for the DD is irrelevant, just has to be syntactically-correct. The DSN= must be the same in each job, the dataset must exist, and must specify DISP=OLD on both (with only two JOBs one could be DISP=SHR and it would still work).

Nothing has to open, close, read, anything. No program changes. Just a DSN. Just so that the two JOBs cannot be run at the same time due to the DISP=OLD.

Re: Data missing in teradata tables

PostPosted: Tue Oct 15, 2013 7:28 pm
by dick scherrer
Hello,

1)Two jobs will run on different time in scheduler but unfortunatley on that day due to dependent jobs two jobs has been run at the same time
Did someone do this because there already were problems? The schedulers/operators need to understand that dependency still exists even when there are problems.

2)We can't use "lock" file with DISP=OLD, Because we have two different files inorder to load the data in two different tables.
The dataset you would use to "lock" is neither of the update datasets. It exists only as a traffic controller. I'd suggest making this a small file with s bit of text to explain the use of the file.