Joined: 18 Mar 2007 Posts: 44 Location: New Jersey,USA
HI,
For testing purposes , I need to unload data from UAT or Production tables and upload it my Testing Environment.
Here the Problem , is that , i have to search for all the REferenced tables and Unlooad and reload back in the same hierachy .
Is there any possiblity to unload all the Referenced tables automatically ??
Say there are table 1 , table 2 , table 3.and i have table1 foregin key referenced from table 2 and table 2 foreign key referenced from table 3 ..
Is there anyway , if i specify Table 1 to unload ; then the Table 2 and Table 3 is also unloaded automatically???
DBA do , similar task of often unloading the PROD data to LOAD test regions... How do they achieve it?
Here the Problem , is that , i have to search for all the REferenced tables and Unlooad and reload back in the same hierachy.
=>If you know the reference tables, you can prepare a JCL, to unload the datasets, in that case you need to just sysin the table names, that's it. I don't think loading/unloading the tables need to be carried out in specific order. I never heard of that
Is there any possiblity to unload all the Referenced tables automatically ??
=>This is only possible when routines are pre-existing to unload the tables
Say there are table 1 , table 2 , table 3.and i have table1 foregin key referenced from table 2 and table 2 foreign key referenced from table 3 ..
Is there anyway , if i specify Table 1 to unload ; then the Table 2 and Table 3 is also unloaded automatically???
=> I never heard we can do this way. any expert out ther?
DBA do , similar task of often unloading the PROD data to LOAD test regions... How do they achieve it?
=>There are routines set for this and system automatically unload the data at a predefined interval
Unload can be done using DB2 UNLOAD utility and can be done only one table at a time. You can use any type of where clause to set the criteria but you need to use SELECT * as you need to LOAD it in Test environment.
for ex:
select t1.*
from t1, t2, t3
where t1.col1 = t2.col1
and t1.col2 = t3.col2
Here t1 is the table which you intended to unload.