MODIFY RECOVERY to delete LB/RP image copy entries

Bharath Nunepalli

MODIFY RECOVERY to delete LB/RP image copy entries

Hi All,
My requirement is to delete only the entries for LB/RP image copies from SYSCOPY.

As per my understanding, MODIFY RECOVERY can delete entries based on age or date but not based on ICTYPE.
Is that correct? Just want to make sure I didn't miss anything about MODIFY RECOVERY utility.

 

Bharath Nunepalli,

Senior DB2 DBA.

Steen Rasmussen

MODIFY RECOVERY to delete LB/RP image copy entries
(in response to Bharath Nunepalli)
Nunepalli – that is correct – unless you have a tool from an ISV supporting this. I know of one where you can use SQL like predicates to do selective clean up of SYSCOPY entries.

Steen Rasmussen
CA technologies

From: Bharath Nunepalli [mailto:[login to unmask email]
Sent: Tuesday, January 30, 2018 5:18 PM
To: [login to unmask email]
Subject: [DB2-L] - MODIFY RECOVERY to delete LB/RP image copy entries

CAUTION: This email originated from outside of CA. Do not click links or open attachments unless you recognize the sender and know the content is safe.

Hi All,
My requirement is to delete only the entries for LB/RP image copies from SYSCOPY.

As per my understanding, MODIFY RECOVERY can delete entries based on age or date but not based on ICTYPE.
Is that correct? Just want to make sure I didn't miss anything about MODIFY RECOVERY utility.



Bharath Nunepalli,

Senior DB2 DBA.

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

Bharath Nunepalli

RE: MODIFY RECOVERY to delete LB/RP image copy entries
(in response to Steen Rasmussen)

Hi Steen,

Thanks for the response.

Just curious to know the name of the Tool that can do selective cleanup of SYSCOPY.

 

Bharath Nunepalli,

Senior DB2 DBA.

Steen Rasmussen

MODIFY RECOVERY to delete LB/RP image copy entries
(in response to Bharath Nunepalli)
CA Merge Modify is my choice of course.

Steen

From: Bharath Nunepalli [mailto:[login to unmask email]
Sent: Wednesday, January 31, 2018 11:59 AM
To: [login to unmask email]
Subject: [DB2-L] - RE: MODIFY RECOVERY to delete LB/RP image copy entries

CAUTION: This email originated from outside of CA. Do not click links or open attachments unless you recognize the sender and know the content is safe.

Hi Steen,

Thanks for the response.

Just curious to know the name of the Tool that can do selective cleanup of SYSCOPY.



Bharath Nunepalli,

Senior DB2 DBA.

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

Bharath Nunepalli

RE: MODIFY RECOVERY to delete LB/RP image copy entries
(in response to Steen Rasmussen)

Thanks for the tool name.

 

Bharath Nunepalli,

Senior DB2 DBA.

Kai Stroh

RE: MODIFY RECOVERY to delete LB/RP image copy entries
(in response to Bharath Nunepalli)

Just in case you want prevent the RECOVER utility from using a certain set of image copies: The LOCALSITE and RECOVERYSITE parameters allow you to select which site you want to use image copies from. I don't think you can specify if you want to use the primary or backup copies though.

FWIW, it is not impossible to run DELETEs on SYSCOPY, but you would have to enable catalog updates first by setting a flag in the Db2 MSTR address space. This would allow you to run any INSERT, UPDATE and DELETE statement on any of the catalog tables. I used to have a program somewhere that enabled/disabled this flag for a running Db2, but I consider it extremely dangerous to do so and therefore cannot recommend it.

Bharath Nunepalli

RE: MODIFY RECOVERY to delete LB/RP image copy entries
(in response to Kai Stroh)

Kai,

Thanks for the response.

 

I totally agree with you. Updating catalog tables using a program is a dangerous territory which I want to avoid totally :)

 

Yes, I use LOCALSITE and RECOVERYSITE parameters to choose the type of backups needed for recovery (I coded a REXX routine to generate the RECOVERY JCLS with whatever type of backups I want).

 

We have our LP copies on TAPE. So, we create LB/RP to DISK whenever we need to recover the database (using DISK datasets for recovery helps in quick completion of recovery process) and delete them after recovery. That leads to orphan entries in SYSCOPY (no datasets in ICF catalog).
I want such orphan entries to be deleted from SYSCOPY.

Kai Stroh

RE: MODIFY RECOVERY to delete LB/RP image copy entries
(in response to Bharath Nunepalli)

It sounds like you are using COPYTOCOPY in order to create the LB/RP copies. This utility registers the new image copy data set in the SYSCOPY table so that Db2 knows about it and can use it. Problem is the SYSCOPY record will remain there even if you delete the data set later.

If you are on Db2 V12, you could use IEBCOPY instead of COPYTOCOPY in order to copy your tape image copy to DASD. If you do this, Db2 will not know that this data set exists, so by default it will never use it for recovery. But you can use the following new syntax:

 

RECOVER [...] TOCOPY <your-data-set> NOSYSCOPY

 

The NOSYSCOPY option will force Db2 to use the specified data set even if it is not recorded in SYSIBM.SYSCOPY. The Utility Guide and Reference contains a description of this new option and its sub-options.

 

Hope this helps

Kai

Bharath Nunepalli

RE: MODIFY RECOVERY to delete LB/RP image copy entries
(in response to Kai Stroh)

Yes, you are right about us using COPYTOCOPY.

I read about NOSYSCOPY option in Db2 v12.
We are still in Db2 v11, and may take atleast another year to go to Db2 v12.
I guess we have to live with this situation until Db2 gets upgraded to v12.


Bharath Nunepalli,

Senior DB2 DBA.