How do handle static Hash File corruption?

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
vinaymanchinila
Premium Member
Premium Member
Posts: 353
Joined: Wed Apr 06, 2005 8:45 am

How do handle static Hash File corruption?

Post by vinaymanchinila »

Hi,
How do handle static Hash File corruption? And also the best strategy for data staging (database table / Flat file).

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

Post by ArndW »

Vinay,

When a DS Hash file gets corrupted you have access to the UVFIXFILE command to attempt to fix the errors. Your options are limited if that doesn't fix the file; Ascential support has access to a tool that deles a little deeper into the file structure, but it requires an in-depth knowledge of how the file is built-up and, even in the hands of experts, can manage to inadvertantly trash the file. The good news is that hash files are quite stable and respond well to UVFIXFILE and usually the worst that happens is that a record or a couple of records are lost.

There are so many strategies out there (usually at least one per consultant 8) ) that I don't know where to begin; perhaps you could explain your particular scenario and someone will give you their strategy for it.
vinaymanchinila
Premium Member
Premium Member
Posts: 353
Joined: Wed Apr 06, 2005 8:45 am

Post by vinaymanchinila »

Thanks Arnd, we we donot have an issue with it right now but this is the question we were pondering over now at design time. One or two preferred strategy to avoid it would be good to start with.
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

Vinay,

Static hash file corruption common causes:

(a) Disk Full while writing to file. A fixfile corrects, might lose last group where the write was taking place. 90%

(b) Curious UNIX level user doing a "vi" on file and writing to file. A fixfile will laugh at you and ask whether the file is really a hash file. No correction possible in most cases. 9%

(c) System crash. Usually doesn't corrupt file, but might if actively being written. Similar to (a) in effect & correction. 1%
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Dealing with hashed file corruption is the same whether the hashed file is static or dynamic.

Prevention is better than cure; monitor to ensure they don't go over, say, 1.5GB. Once they do, RESIZE to 64-bit addressing, and question why they're so large. Monitor disk space; set alarms to send email at, say, 85% full. Use uninterruptable power supplies and other high availability strategies.

If they do get corrupted, you may not be able to recover. For example, you can never write the page that will take a hashed file over 2GB, so you can never recover that page. If the power goes off before you've written a page, you can never recover that page.

UVFIXFILE can only address 32-bit files and is, indeed, deprecated. The "official" repair tool is called fixtool.
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 »

Ray corrected two errors in my post, but did it so sweetly that it might be easy to miss.

First, I neglected the file-size-going-over-2Gb type of corruption; this occurs in somewhere around 30% of all cases.

Secondly, the use of fixtool as opposed to UVFIXFILE.

Thanks,

-Arnd.
Post Reply