Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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 Identify top 30 big tables or indexes... ashek15 DB2 0 Fri Jun 16, 2017 10:01 am
No new posts unload data from table with lob columns farhad_evan DB2 1 Sat Apr 22, 2017 1:32 pm
This topic is locked: you cannot edit posts or make replies. Need help in estimating space of unlo... ashek15 IMS DB/DC 12 Fri Apr 07, 2017 5:11 am
No new posts Data replication from multiple Db2 ta... kishpra DB2 9 Mon Mar 27, 2017 9:58 pm
No new posts SPUFI -- Joining 3 tables – data in... Sysaron DB2 2 Wed Mar 08, 2017 4:18 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us