View previous topic :: View next topic
|
Author |
Message |
sravz chinnu
New User
Joined: 07 Dec 2011 Posts: 26 Location: India
|
|
|
|
Hi All,
I want to understand image copy concept in DB2 how it really functions?
Is it a load/ taking backup from table to flat file?
Please give me some details in this concept. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
At the top of the page is a link to "IBM Manuals". Suggest you read the image copy information there and if you find something that is not clear, post what you found and your doubt. Someone should be able to clarify. |
|
Back to top |
|
|
senthilnathanj
New User
Joined: 31 Jul 2007 Posts: 47 Location: chennai
|
|
|
|
Hello,
To be able to recover data when a problem occurs, you need a solid recovery plan and a strategy for each of the many situations that can arise. A key part of your plan should include taking image copies on a regular basis. You can create image copies of your table spaces and index spaces. How often image copies should be taken depends
on the allowable down time for the primary user of an application. Determine this clock-time requirement ahead of time, in case you have to recover your data. For example, if an application can’t be unavailable for more than two hours, you’ll need to take image copies more frequently than if the application can be unavailable for a complete day. Depending on the currency of data required in the recovery, determine when image copies can be taken and what types of image copies to take. You may need to take incremental image copies throughout the day, or you may need to do only one full copy at the end of the day’s processing. In some situations, especially where long-running batch processes are involved, a best practice is to take an image copy at the beginning of a batch window; this enables a restore in case something goes wrong during the batch cycle.
More details please go through the manual in the top |
|
Back to top |
|
|
sravz chinnu
New User
Joined: 07 Dec 2011 Posts: 26 Location: India
|
|
|
|
Thanks Senthil. Really explainatory. I have gone thru the manuals.
One thing i am not able to understand is is image copy is load or unloading to flat file.
I can see that we are using DSNUTILB in Image copy jobs which i am using. I know that we use this utility for loading.
Can any one explain how this utility in image copy place? to be more specific what
COPY TABLESPACE DBNAME.TSNAME SHRLEVEL REFERENCE
FULL YES
statement does? |
|
Back to top |
|
|
saiprasadh
Active User
Joined: 20 Sep 2006 Posts: 154 Location: US
|
|
|
|
Hi,
COPY TABLESPACE DBDBA01.TSDBA01 SHRLEVEL REFERENCE
FULL YES
Above mentioned command will take full image copy of tablespace TSDBA01 present under database DDBA01
Quote: |
SHRLEVEL
Indicates whether other programs can access or update the table space or index
while COPY is running.
REFERENCE
Allows read-only access by other programs.
CHANGE
Allows other programs to change the table space or index space.
When you specify SHRLEVEL CHANGE, uncommitted data might be
copied.
Recommendation: Do not use image copies that are made with
SHRLEVEL CHANGE when you run RECOVER TOCOPY.
SHRLEVEL CHANGE is not allowed for a table space that is defined as
NOT LOGGED.
SHRLEVEL CHANGE is not allowed when you use DFSMSdss concurrent
copy for table spaces that have a page size that is greater than 4 KB and
does not match the control interval size. If the page size in the table space
matches the control interval size for the associated data set, you can use
either the SHRLEVEL CHANGE option or the SHRLEVEL REFERENCE
option.
If you are copying a list and you specify the SHRLEVEL CHANGE option,
you can specify OPTIONS EVENT(ITEMERROR,SKIP) so that each object
in the list is placed in UTRW status and the read claim class is held only
while the object is being copied.
The read claim class is briefly obtained for each object during the
UTILINIT phase to determine the object size if LIMIT is specified on the
COPYDDN or RECOVERYDDN template. This applies only if OPTIONS
EVENT(ITEMERROR,SKIP) is specified.
If you do not specify OPTIONS EVENT(ITEMERROR,SKIP), all of the
objects in the list are placed in UTRW status and the read claim class is
held on all objects for the entire duration of the COPY. |
|
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
You should probably talk with your dba to learn the standard method (on your system) of taking a backup and then reloading if/when necessary.
Keep in mind that just because a "backup" job ran does not guarantee the backup is complete/correct. Until the backup is reloaded and used successfully, all that exists is some media with questionable content. It happens all too often that someone has "backed up" the data only to find it is not usable. . . |
|
Back to top |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2547 Location: Silicon Valley
|
|
|
|
Quote: |
we are using DSNUTILB in Image copy jobs which i am using. I know that we use this utility for loading. |
DSNUTILB is the utility program, but the function performed is specified in the SYSIN statements. COPY, LOAD, and UNLOAD are three different things.
COPY: copy from database to sequential data set
LOAD: copy from sequential data set to database
UNLOAD: move from database to sequential data set |
|
Back to top |
|
|
|