jzhardy
Active User
Joined: 31 Oct 2006 Posts: 139 Location: brisbane
|
|
|
|
I have a particular requirement to delete records from a db2 table based on a full primary key match with records in a DSNTIAUL format dataset. Is there a tool/utility that can do this ?
a simple example to explain the motivation and to provide the context:
suppose I want to refresh ClientContact data (client id = 123) in a development environment (call it D), from Production (P). Suppose further that:
D.ClientContact(client_id = 123) has 10 records
P.ClientContact(client_id = 123) has 9 records
this can and does happen because D is actively used for testing and follows its own lifecycle.
Currently what I do is extract (optim extract) all ClientContact (id=123) data from environemnt D, delete (optim delete) using extract file, load all clientContact(id=123) from P => D (with option "B" = Insert and Update)
this is a blunt instrument and - mainly because of the delete - has huge i/o costs associated with index rebuilds when D is a large enviornment.
a better approach is to remove the one record in environment D that does not exist in Prod, then just load all Prod data for that client.
I can't see an easy or direct way of doing this within the Infosphere Optim ecosystem. However, with a bit of conversion and manipulation I can derive a delta file containing the one 'to be deleted' record in DSNTIAUL format. Hence the requirement.
Open to any suggestions. |
|