Question

Asked:
Asked By:
Nov 21 2008   10:34 AM GMT
Toramky   5 pts.

Create DB2 table relations


DB2, Table Relationships, DB2 Table Relationships, Mapping table relationships

There is a requirement to have a subset of data available in DB2 tables in production to a test environment. There is no relationship defined in DB2 (so info available in catalog relationship tables). Now we need to find the relationship between the tables using some automation process. So we might not able to manually see each and every program to check how the tables are related. Any suggestions/ideas would be greatly appreciated.

Thanks.

Subscribe to Alerts! Get questions and answers delivered to your Inbox.


E-mail me updates on this question



   SUBSCRIBE

hidden modal window

Answer Wiki (Improve, edit or add to this answer)


 RATE THIS ANSWER
0
Click to Vote:
  •   0
  •  0



Without RI or a really good data dictionary you are essentially out of luck for doing this completely automatically. You'll need to get somebody to at least define the relationship to you -- there are ways to deduce relationships based on table names / column names etc. but you can't be guaranteed that your interpretation is 100% accurate. Once you've mapped out the relationships of the tables then generally the easiest way to solve the problem is to write a quicky program that moves the data for you. Depending on how nice you are, you can make the program smart enough to recognize general keys and then move it all together based on simple user input to the JCL (or ISPF panel, etc). Don't forget the option to allow the requester to either REPLACE or RESUME (append) the test table data.
  • AddThis Social Bookmark Button

Browse more Questions and Answers on DataManagement and Database.

Looking for relevant DataManagement Whitepapers? Visit the SearchDataManagement.com Research Library.


Discuss This Answer


You must be logged-in to discuss a question. Log-in/Register