Integrity check of image copy on Db2 v11 (for z/OS)

Bharath Nunepalli

Integrity check of image copy on Db2 v11 (for z/OS)

Hi All,
We take daily full backups in Prod. My requirement is to be able to perform integrity check on backup datasets to make sure the dataset is not corrupted and can be used for recovery.

Is there any easy way to do that in Db2 v11 (for z/OS)?
There is db2ckbkp command on Db2 for LUW. Just wondering if there is anything similar in Db2 for z/OS?


Bharath Nunepalli,

Senior DB2 DBA.

Kenny Fogarty

Integrity check of image copy on Db2 v11 (for z/OS)
(in response to Bharath Nunepalli)
CHECKPAGE?



From: Bharath Nunepalli <[login to unmask email]>
Sent: 10 May 2018 21:26
To: [login to unmask email]
Subject: [DB2-L] - Integrity check of image copy on Db2 v11 (for z/OS)



Hi All,
We take daily full backups in Prod. My requirement is to be able to perform integrity check on backup datasets to make sure the dataset is not corrupted and can be used for recovery.

Is there any easy way to do that in Db2 v11 (for z/OS)?
There is db2ckbkp command on Db2 for LUW. Just wondering if there is anything similar in Db2 for z/OS?



Bharath Nunepalli,

Senior DB2 DBA.



-----End Original Message-----

Jim Tonchick

Integrity check of image copy on Db2 v11 (for z/OS)
(in response to Bharath Nunepalli)

<div id="AOLMsgPart_2_c90def92-2e7d-482f-aa79-b90e3916c452">

You can run a CHECK function on image copy files using DSN1COPY, one of the DB2 stand-alone utilities. It checks the pages in the copy. I use it before a release upgrade to make sure all the Catalog tablespaces are clean. I also run it after the upgrade. </div><div id="AOLMsgPart_2_c90def92-2e7d-482f-aa79-b90e3916c452">
</div><div id="AOLMsgPart_2_c90def92-2e7d-482f-aa79-b90e3916c452">Jim Tonchick

-----Original Message-----
From: Bharath Nunepalli <[login to unmask email]>
To: DB2-L <[login to unmask email]>
Sent: Thu, May 10, 2018 03:25 PM
Subject: [DB2-L] - Integrity check of image copy on Db2 v11 (for z/OS)



<div id="AOLMsgPart_2_bcce2f1f-2e94-4e2d-b5e0-b91a2d780e88">
<div class="aolReplacedBody"><p>Hi All,
We take daily full backups in Prod. My requirement is to be able to perform integrity check on backup datasets to make sure the dataset is not corrupted and can be used for recovery.</p>
<p>Is there any easy way to do that in Db2 v11 (for z/OS)?
There is db2ckbkp command on Db2 for LUW. Just wondering if there is anything similar in Db2 for z/OS?</p>
<p>
</p>
<p>Bharath Nunepalli,</p>
<p>Senior DB2 DBA.</p>
<hr size="1" style="color:#ccc"><div id="aolmail_socfooter" style="font-size:80%"><span style="font-weight:bold">Site Links: </span>
<a target="_blank" rel="noopener noreferrer" href="https://www.idug.org/p/fo/st/?post=185791&anc=p185791#p185791">View post online</a>
<a target="_blank" rel="noopener noreferrer" href="https://www.idug.org/p/fo/si/?topic=19">View mailing list online</a>
<a target="_blank" rel="noopener noreferrer" href="mailto:[login to unmask email]">Start new thread via email</a>
<a target="_blank" rel="noopener noreferrer" href="mailto:[login to unmask email]?Subject=Unsubscribe">Unsubscribe from this mailing list</a>
<a target="_blank" rel="noopener noreferrer" href="https://www.idug.org/p/us/to/">Manage your subscription</a>


This email has been sent to: <a href="mailto:[login to unmask email]" target="_blank">[login to unmask email]</a>
<p>
Faster data refresh is here! The long waits and babysitting of unload/load jobs is over. Contact

ESAi to learn about BCV5 & XDM. Be a hero to users with fast on-demand test/QA data provisioning.See

<a target="_blank" rel="noopener noreferrer" href="http://www.ESAIGroup.com/idug">http://www.ESAIGroup.com/idug</a>

</p>
<p>
Use of this email content is governed by the terms of service at:
<a target="_blank" rel="noopener noreferrer" href="http://www.idug.org/p/cm/ld/fid=2">http://www.idug.org/p/cm/ld/fid=2</a></p>

</div><hr size="1" style="color:#ccc"></div>
</div>

</div>

Bharath Nunepalli

RE: Integrity check of image copy on Db2 v11 (for z/OS)
(in response to Jim Tonchick)

Hi Jim,
Thanks for the response.

 

I believe PGM=DSN1COPY,PARM='CHECK' does both checking the validity of input dataset and also copy that dataset to a target dataset. 

 

But, I want only the checking part.

I haven't tried this yet, will just DD DUMMY for SYSUT2 help in only checking the validity of input dataset?

 

 

Bharath Nunepalli,

Senior DB2 DBA.

Anguraj Rathinasamy

Integrity check of image copy on Db2 v11 (for z/OS)
(in response to Bharath Nunepalli)
Bharath,
When you state - integrity and not corrupted image copy dataset. Specifically are you encountering any kind of issue. ?

Raj

> On May 11, 2018, at 12:10 AM, Bharath Nunepalli <[login to unmask email]> wrote:
>
> Hi Jim,
> Thanks for the response.
>
>
>
> I believe PGM=DSN1COPY,PARM='CHECK' does both checking the validity of input dataset and also copy that dataset to a target dataset.
>
>
>
> But, I want only the checking part.
>
> I haven't tried this yet, will just DD DUMMY for SYSUT2 help in only checking the validity of input dataset?
>
>
>
>
>
> Bharath Nunepalli,
>
> Senior DB2 DBA.
>
>
> Site Links: View post online View mailing list online Start new thread via email Unsubscribe from this mailing list Manage your subscription
>
> This email has been sent to: [login to unmask email]
> Faster data refresh is here! The long waits and babysitting of unload/load jobs is over. Contact
> ESAi to learn about BCV5 & XDM. Be a hero to users with fast on-demand test/QA data provisioning.See
> http://www.ESAIGroup.com/idug
>
> Use of this email content is governed by the terms of service at:
> http://www.idug.org/p/cm/ld/fid=2
>

Bharath Nunepalli

RE: Integrity check of image copy on Db2 v11 (for z/OS)
(in response to Anguraj Rathinasamy)

Anguraj,
I do not have any issues as of now. This is pro-active monitoring setup needed as part of High Availability.

 

Bharath Nunepalli,

Senior DB2 DBA.

Colin Clayton

Integrity check of image copy on Db2 v11 (for z/OS)
(in response to Bharath Nunepalli)
Bharath,

The IBM Copy utility by default does page checking during the copy (CHECKPAGE keyword).

Other vendor tools offer the same (or better) functionality including auditing of e.g. spacemaps, page flags, segment pointers, header pages…

Colin


<mailto:[login to unmask email]>[CA] http://www.ca.com/us/default.aspx>[Twitter]<http://twitter.com/CAInc>[Slideshare]<http://www.slideshare.net/cainc>[Facebook] https://www.facebook.com/CATechnologies>[YouTube]<http://www.youtube.com/user/catechnologies>[LinkedIn]<http://www.linkedin.com/company/1372?goback=.cps_1244823420724_1>[Google+]<https://plus.google.com/+CATechnologies [Google+]<http://www.ca.com/us/rss.aspx?intcmp=footernav
CA DB2 Tools Global User Community http://bit.ly/DB2tools
[Cert-Info-Mgmt_color]
<mailto:[login to unmask email]>

From: Bharath Nunepalli [mailto:[login to unmask email]
Sent: 11 May 2018 16:05
To: [login to unmask email]
Subject: [DB2-L] - RE: Integrity check of image copy on Db2 v11 (for z/OS)


Anguraj,
I do not have any issues as of now. This is pro-active monitoring setup needed as part of High Availability.



Bharath Nunepalli,

Senior DB2 DBA.

-----End Original Message-----
Attachments

  • image002.jpg (2.3k)

Avram Friedman

RE: Integrity check of image copy on Db2 v11 (for z/OS)
(in response to Bharath Nunepalli)

I would like to take issue with those who suggest DSNCOPY with the CHECK option

While it is true that having a clean run of this utility will raise the level of confidence that the copy can be restored, a dirty run of the same utility (except for a physical I/O) error will provide the same level of confidence that the copy can be restored..

Recover restores the copied pages.  If the original table space has page damage and an image copy is taken then the original table space including the page damage will be restored.

Should you be concerned about a damaged copy there are two ways to address this
1. Dual copies, if one copy is not readable use the other.
2. replicate the copy using a utility like IEBGENER or IDCAMS REPRO.  This comes with a difficulty ... the replicated copy can usually only be restored with DSN1COPY

DB2 z/OS image copies are physical copies of the underlying datasets (tablespaces)  They are not copies of the table.

Avram Friedman
DB2-L hall of fame contributor
DB2-L 'past' administrator

[login to unmask email]

Paul Ogborne

[OT][FRIDAY] Integrity check of image copy on Db2 v11 (for z/OS)
(in response to Avram Friedman)
Avram,


If I could respectfully (and teasingly) remark): An intriguing Friday-ish statement perhaps?


"DB2 z/OS image copies are physical copies of the underlying datasets (tablespaces) They are not copies of the table".

Are you perhaps alluding to the fact that an image copy and say, DB2's representation of the table in the catalog OR a table row's external representation can be very different?

Have a great weekend.
Regards,
Paul


-----Original Message-----
From: Avram Friedman <[login to unmask email]>
To: DB2-L <[login to unmask email]>
Sent: Fri, 11 May 2018 18:14
Subject: [DB2-L] - RE: Integrity check of image copy on Db2 v11 (for z/OS)



I would like to take issue with those who suggest DSNCOPY with the CHECK option

While it is true that having a clean run of this utility will raise the level of confidence that the copy can be restored, a dirty run of the same utility (except for a physical I/O) error will provide the same level of confidence that the copy can be restored..

Recover restores the copied pages. If the original table space has page damage and an image copy is taken then the original table space including the page damage will be restored.

Should you be concerned about a damaged copy there are two ways to address this
1. Dual copies, if one copy is not readable use the other.
2. replicate the copy using a utility like IEBGENER or IDCAMS REPRO. This comes with a difficulty ... the replicated copy can usually only be restored with DSN1COPY

DB2 z/OS image copies are physical copies of the underlying datasets (tablespaces) They are not copies of the table.

Avram Friedman
DB2-L hall of fame contributor
DB2-L 'past' administrator
[login to unmask email]



Site Links: View post online View mailing list online Start new thread via email Unsubscribe from this mailing list Manage your subscription

This email has been sent to: [login to unmask email]
Faster data refresh is here! The long waits and babysitting of unload/load jobs is over. Contact
ESAi to learn about BCV5 & XDM. Be a hero to users with fast on-demand test/QA data provisioning.See
http://www.ESAIGroup.com/idug


Use of this email content is governed by the terms of service at:
http://www.idug.org/p/cm/ld/fid=2



Avram Friedman

RE: [OT][FRIDAY] Integrity check of image copy on Db2 v11 (for z/OS)
(in response to Paul Ogborne)

The table row and an imaged copied block could be very diffrent
Some of the ways are
Many rows per block
Non row data in the block such as free space pointers
versioning considerations after alters
compression
aux table data missing for LOBS
character set translation
null processing

copies are physical copies of the data, jot logical
Should one wish a logical copy UNLOAD can be used

In Reply to Paul Ogborne:

Avram,


If I could respectfully (and teasingly) remark): An intriguing Friday-ish statement perhaps?


"DB2 z/OS image copies are physical copies of the underlying datasets (tablespaces) They are not copies of the table".

Are you perhaps alluding to the fact that an image copy and say, DB2's representation of the table in the catalog OR a table row's external representation can be very different?

Have a great weekend.
Regards,
Paul



Bharath Nunepalli

RE: Integrity check of image copy on Db2 v11 (for z/OS)
(in response to Bharath Nunepalli)


My requirement is to setup a process that can run on regular basis for checking integrity of backup datasets as part of High Availability (that means, to make sure the backup datasets are not corrupted and can be used for recovery in case of chaos).

There are 6000 backup datasets created everyday in prod.


Do you think it's a good idea to develop and schedule a REXX process that executes DSN1COPY with CHECK on 6000 datasets to run everyday?
Please share if you have any better ideas.

Phil Grainger

Integrity check of image copy on Db2 v11 (for z/OS)
(in response to Bharath Nunepalli)
You’re checking for ONE thing that could affect recovery - “are my copies corrupt?”

Your recovery can fail for many other reasons

- what if you have missing log datasets?
- what if your tapes go missing after you verify them?
- what if your icf catalog is corrupted?
- what if something I can’t imagine happens?

It seems like an admirable process, but it’ll be expensive to execute. And every day??

You are better off scheduling a process that checks you have all the pieces needed for a recovery and just take it for granted that ONE generation of copy will be readable. How many generations of your daily 6,000 copies do you keep? Please don’t say “one”. Also, make sure you keep enough archive logs to roll forward from your OLDEST copy (otherwise, why are you keeping it?)

Hope this helps to crystallize your options

Phil G
BMC Software

Sent using OWA for iPad
________________________________
From: Bharath Nunepalli <[login to unmask email]>
Sent: 11 May 2018 20:33:11
To: [login to unmask email]
Subject: [DB2-L] - RE: Integrity check of image copy on Db2 v11 (for z/OS)


My requirement is to setup a process that can run on regular basis for checking integrity of backup datasets as part of High Availability (that means, to make sure the backup datasets are not corrupted and can be used for recovery in case of chaos).

There are 6000 backup datasets created everyday in prod.

Do you think it's a good idea to develop and schedule a REXX process that executes DSN1COPY with CHECK on 6000 datasets to run everyday?
Please share if you have any better ideas.

-----End Original Message-----
BMC Software Limited Registered Office: Building E2, Eskdale Road, Winnersh, Wokingham, Berkshire, United Kingdom, RG41 5TS Registered in England No. 1927903 The content of this email is confidential. If you are not the addressee, you may not distribute, copy or disclose any part of it. If you receive this message in error, please delete this from your system and notify the sender immediately.

Kenny Fogarty

Integrity check of image copy on Db2 v11 (for z/OS)
(in response to Bharath Nunepalli)
That seems to be quite over the top, given what you’re trying to detect and avoid.





From: Bharath Nunepalli <[login to unmask email]>
Sent: 11 May 2018 20:33
To: [login to unmask email]
Subject: [DB2-L] - RE: Integrity check of image copy on Db2 v11 (for z/OS)




My requirement is to setup a process that can run on regular basis for checking integrity of backup datasets as part of High Availability (that means, to make sure the backup datasets are not corrupted and can be used for recovery in case of chaos).

There are 6000 backup datasets created everyday in prod.


Do you think it's a good idea to develop and schedule a REXX process that executes DSN1COPY with CHECK on 6000 datasets to run everyday?
Please share if you have any better ideas.



-----End Original Message-----

Colin Clayton

Integrity check of image copy on Db2 v11 (for z/OS)
(in response to Bharath Nunepalli)
Far simpler and safer to just take dual copies.
In the very unlikely situation that an image copy dataset is corrupted, what would you do with it anyway?




Sent from my Samsung Galaxy smartphone.


-------- Original message --------
From: Bharath Nunepalli <[login to unmask email]>
Date: 11/05/2018 20:33 (GMT+00:00)
To: [login to unmask email]
Subject: [DB2-L] - RE: Integrity check of image copy on Db2 v11 (for z/OS)


My requirement is to setup a process that can run on regular basis for checking integrity of backup datasets as part of High Availability (that means, to make sure the backup datasets are not corrupted and can be used for recovery in case of chaos).

There are 6000 backup datasets created everyday in prod.

Do you think it's a good idea to develop and schedule a REXX process that executes DSN1COPY with CHECK on 6000 datasets to run everyday?
Please share if you have any better ideas.

-----End Original Message-----

Bharath Nunepalli

RE: Integrity check of image copy on Db2 v11 (for z/OS)
(in response to Phil Grainger)

Phil,
You made a very valid point. There can be many things out of scope that can result in recovery failure, and checking everything may not be possible always.

 

We keep 45 generations of 6000 datasets created everyday.

 

Bharath Nunepalli,

Senior DB2 DBA.