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
 
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 Copy 4 byte of data from the last rec... arunsoods DFSORT/ICETOOL 9 Fri Oct 06, 2017 12:15 pm
No new posts HEX value search in a DB2 query maxsubrat DB2 2 Wed Oct 04, 2017 3:04 pm
No new posts Create procedure issues -628 when add... chandraBE DB2 1 Mon Sep 18, 2017 12:16 pm
No new posts XMITIP sends it out. Can it copy on l... Rommel Dayon Rustia IBM Tools 0 Tue Sep 05, 2017 10:16 am
No new posts Can we limit length in concatenation ... balaji81_k DB2 7 Tue Aug 22, 2017 2:50 am

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