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
 

 

Query on image copy

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
View previous topic :: :: View next topic  
Author Message
Guest







PostPosted: Mon Sep 26, 2011 11:07 am    Post subject: Query on image copy
Reply with quote

HI,
I have taken image copy using below commands in a test region.Now i have requirement to copy the same data in to different test region under same subsystem. Could you please advice if I can use the below recovery command or any other command to get it done?

Image copy
--------------
Code:


 COPY     TABLESPACE RST.*,
DSNUM    PART         
COPYDDN  SYSCOPY     
GROUP    YES         
FULL     YES         
SHRLEVEL REFERENCE   
RESETMOD NO           
QUIESCE  AFTER       
         WRITE      NO
PARALLEL 8           

Recovery
-----------
Code:

RECOVER TABLESPACE XYZ.ABC DSNUM ALL     
  TOCOPY TTXX.RST.w.G0002V00
REBUILD INDEX(ALL) TABLESPACE XYZ.ABC
NOWORKDDN                                         
                                                     
Back to top

ashimer

Active Member


Joined: 13 Feb 2004
Posts: 551
Location: Bangalore

PostPosted: Mon Sep 26, 2011 12:50 pm    Post subject:
Reply with quote

This might not be possible as the image copy details are stored within the system tables for a recovery.
Why not unload and load data else use DSN1COPY to copy the image copy to normal dataset and use it for the other tablespace.
Back to top
View user's profile Send private message
Guest







PostPosted: Mon Sep 26, 2011 2:21 pm    Post subject: Reply to: Query on image copy
Reply with quote

Hi ashimer, Thanks for the reply. The problem with unload is we have over 500 tables to take back ups and preparing jobs for all these tables are time consuming as its an urgent task. Could you please tell me steps for back up and load using the the alternative way you mentioned , ie using DSN1COPY on mage copy ?
Back to top
sushanth bobby

Senior Member


Joined: 29 Jul 2008
Posts: 1013
Location: India

PostPosted: Tue Sep 27, 2011 10:10 pm    Post subject:
Reply with quote

Hello devil13,

You can use cross-loader feature of load utility to get the job done,

Code:
EXEC SQL DECLARE C1 CURSOR FOR SELECT * FROM DSN8810.EMP ENDEXEC

LOAD DATA INCURSOR(C1) REPLACE INTO TABLE BOBT1.MYEMP STATISTICS


Since there are 500 tables, here is an idea for preparing the above utility statements,

Query not tested
Code:
SELECT 'EXEC SQL DECLARE C1 CURSOR FOR SELECT * FROM DSN8810.'||strip(name)||' ENDEXEC'
from sysibm.systables where creator ='DSN8810'


Prepare similar query for the load also.

Remember there should be 500 cursors.

God Bless,
Sushanth
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 SORTJOIN - Copy Matched and Unmatched... Steve Ironmonger DFSORT/ICETOOL 5 Tue Jan 17, 2017 4:26 pm
No new posts Join in SQL Query vickey_dw DB2 2 Tue Jan 17, 2017 12:15 am
This topic is locked: you cannot edit posts or make replies. MQ setup query mohitsaini Java & MQSeries 4 Sun Jan 08, 2017 1:53 am
No new posts DB2 query Using Recursion, Converting... smilewithashu2 DB2 1 Tue Jan 03, 2017 12:50 pm
No new posts HALDB data refresh/copy from producti... vineetanand2007 IMS DB/DC 0 Mon Jan 02, 2017 11:16 am


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