IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

DB2 Unload on all referenced Tables


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
VIGNRSH
Warnings : 1

New User


Joined: 18 Mar 2007
Posts: 44
Location: New Jersey,USA

PostPosted: Thu Nov 27, 2008 12:32 pm
Reply with quote

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?
Back to top
View user's profile Send private message
pankaj_kulkarni111

New User


Joined: 17 Aug 2006
Posts: 13
Location: Pune

PostPosted: Wed Dec 17, 2008 2:53 am
Reply with quote

Quote:
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
Back to top
View user's profile Send private message
balubhat

New User


Joined: 04 Oct 2005
Posts: 19
Location: Singapore

PostPosted: Wed Dec 17, 2008 7:58 am
Reply with quote

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.

Hope it clear now.

Cheers!
Balu
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DB2

 


Similar Topics
Topic Forum Replies
No new posts Load new table with Old unload - DB2 DB2 6
No new posts Remote Unload of CLOB Columns DB2 6
No new posts Multiple table unload using INZUTILB DB2 2
No new posts changing defaults in db2 admin - Unlo... DB2 0
No new posts DB2 Table - Image copy unload IBM Tools 2
Search our Forums:

Back to Top