Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

DB2 Unload on all referenced Tables

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
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    Post subject: DB2 Unload on all referenced Tables
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    Post subject:
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    Post subject: Reply to: DB2 Unload on all referenced Tables
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    IBMMAINFRAMES.com Support Forums -> DB2 All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Best IMS DB Unload Utility jjabez10 IMS DB/DC 12 Thu Sep 22, 2016 11:15 pm
No new posts Getting list of tables defined under ... kishpra DB2 2 Wed Aug 24, 2016 10:36 am
No new posts DB2 Unload format options Susanta DB2 2 Fri Aug 12, 2016 5:42 pm
No new posts ISPF Tables Creation newsysprg TSO/ISPF 6 Wed Jul 13, 2016 2:21 pm
No new posts DXT unload utility - DVRE0000 mistah kurtz DB2 1 Thu Jul 07, 2016 4:56 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us