0% found this document useful (0 votes)
177 views19 pages

Presented by Swapan Banerjee

The document discusses various types of image copies that can be created in DB2 including full image copies, incremental image copies, and inline copies created during LOAD or REORG operations. It covers the phases, syntax, options, and parallelism of the COPY utility. Features like CHANGELIMIT, CHECKPAGE, REPORTONLY, SHRLEVEL CHANGE, COPYTOCOPY, FILTERDDN, and MERGECOPY are described. Hands-on practice is suggested to create a tablespace, take full and incremental copies, and recover using logpoint.

Uploaded by

Sreenivas Rao
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
177 views19 pages

Presented by Swapan Banerjee

The document discusses various types of image copies that can be created in DB2 including full image copies, incremental image copies, and inline copies created during LOAD or REORG operations. It covers the phases, syntax, options, and parallelism of the COPY utility. Features like CHANGELIMIT, CHECKPAGE, REPORTONLY, SHRLEVEL CHANGE, COPYTOCOPY, FILTERDDN, and MERGECOPY are described. Hands-on practice is suggested to create a tablespace, take full and incremental copies, and recover using logpoint.

Uploaded by

Sreenivas Rao
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 19

COPY

Presented by Swapan Banerjee


Can create 4 image copies of the
following objetcs
 Table space
 Table space partition
 Data set of a linear table space
 Index space
 Index space partition
Types
 Full Image Copy of all pages in a table
space, partition , dataset , or index space

 Incremental Image copy is a copy of only


pages that have been modified since the
last use of the COPY utility.
Inline copy with LOAD/REORG
 Load Replace/Load Resume No : The
discarded rows are left as the inline copy is
done during reload phase.

 Reorg Shrlevel change : The image copies


have incremental copies added to the end
during each log iteration .
Phases
 UTILINIT : Initialization and setup
 REPORT : Reporting for CHANGELIMIT
option
 COPY : Copying phase
 UTILTERM : Cleanup process
Syntax
 COPY Tablespace < tablespace-name>
COPYDDN( local-primary-copy ,local-
secondary-copy)
RECOVERDDN( rem-pri-copy , rem-
sec-copy )
Index <index-name>
COPYDDN(loc-prim-copy, loc-sec-copy)
RECOVERYDDN(rem-prim-copy, rem-
sec-copy)
Copy parallelism
 Objective is to reduce elapsed time .
Keyword PARALLEL n has to be specified .

 Number of threads needed when


PARALLEL is used = ( n * 2 +1 ) , where n is
the number of objects processed in
parallel ,regrdaless of number of objects in
the list .
CHANGELIMIT
 The triggering of COPY if the condition is
satisfied .
 COPY table space < Tb Name >
CHANGELIMIT ( 0 , 25 )
SHRLEVEL REFERENCE
COPYDDN ( local ddn )
Return Code in CHANGELIMIT
 RC1 if the utility does not take an image
copy
 RC2 if an incremental copy is taken
 RC3 if full copy is taken
 RC8 if a broken page is encountered
CHECKPAGE
 Checks the Integrity of data pages mostly
due to hardware errors
COPY TABLESPACE <name >
CHCKPAGE
FULL YES  ‘no’ option creates incremental copy
COPYDDN ( copyddn )
REPORTONLY
DB2 will only execute REPORT phase of the
utility reporting
 Total number of pages
 Empty pages in segmented Table space
 Number of changed pages
 Percentage of changed pages
 Type of image copy required
SHRLEVEL CHANGE
 Allows full read/write during copy process
 Should NOT be used in RECOVER
TOCOPY as it may contain uncommitted
data
COPYTOCOPY
 A single copy during LOAD/REORG is taken
and later additional copies can be made
using this , asynchronously from the
original , and record the copy in SYSCOPY .
 This increases data availability.
 COPYTOCOPY does not check
recoverability of an object
COPYTOCOPY Options
 FROMLASTCOPY
 FROMLASTFULLCOPY
 FROMLASTINCRCOPY
 FROMCOPY dsn
CONCURRENT Copy
 Full Image copies using DFSMS concurrent
copy . Syscopy has image copy recorded
with ICTYPE=F , and STYPE= C
 Following can’t be run on copies made by
DFSMS concurrent copy
DSN1COMP , DSN1COPY, DSN1PRNT
FILTERDDN
 Use FILTERDDN Keyword to copy a list of
tables spaces using concurrent COPY to a
single image copy output dataset , instead
of one image copy data set for each table
space in the list. All the table spaces are
processed with a single DFDSS DUMP .
MERGECOPY
 The MERGECOPY online utility merges Image
Copies produced by the COPY utility or inline
copies produced by the LOAD or REORG utilities.
It can merge several incremental copies of a table
space to make one incremental copy. It can also
merge incremental copies with a full Image Copy
to make a new full Image Copy.
MERGECOPY operates on the Image Copy data
sets of a table space, and not on the table space
itself.
PRACTICE SESSION
 Create your own Table space and Table
 Populate with data
 Take a full Image copy
 Take two incremental copies
 Take a quiesce
 Recover to LOGPOINT
Hands-on
 The detailed practice document has been
provided . Understand the various aspects
of it , and also refer to JCL syntax in the
PDS A367123.TEST.JCL .

 Thank You

You might also like