Versions in Db2 for z/OS V11

Melanie Bowen

Versions in Db2 for z/OS V11
I have a tablespace that has an oldest version of 4 and a current version of 5. There is only one table in this tablespace.

I would like to clone this table, but receive an SQLCODE -148 REASON 09 when trying to add the clone.

Therefore, I ran a repair using the INSERTVERSIONPAGES SETCURRENTVERSION TABLESPACE, I also ran a reorg, did an image copy, and then ran a modify recovery, only retaining the LAST(1).

After following the above steps, I still get the -148 SQLCODE with a REASON 09 when trying to clone the tablespace, and the oldest version and current version did not change.

I did notice that the following message was received from the repair:
REPAIR INSERTVERSIONPAGES COMPLETED. NO VERSION PAGES NEED TO BE INSERTED.

Can someone tell me what I've missed?

Thanks for your help.

Philip Sevetson

Versions in Db2 for z/OS V11
(in response to Melanie Bowen)
Melanie,

Possibly relevant: Is there an unexpanded additional column in the table? You might need to run a REORG of the tablespace to instantiate the new column(s) in rows which are older than the last ADD COLUMN.

Whether or not there's an unexpanded column, this is how we add CLONEs in the worst case where nothing else works:

* REORG the tablespace

* UNLOAD the table to protect the data

* MODIFY RECOVERY / DELETE AGE(*)

* ALTER TABLE / ADD CLONE

* COPY the tablespace (immediately).

-phil

Philip Sevetson
Computer Systems Manager
FISA-OPA
5 Manhattan West
New York, NY 10001
[login to unmask email]<mailto:[login to unmask email]>
917-991-7052 m
212-857-1659 f
[cid:[login to unmask email]

From: Melanie Bowen <[login to unmask email]>
Sent: Wednesday, July 8, 2020 2:37 PM
To: [login to unmask email]
Subject: [DB2-L] - Versions in Db2 for z/OS V11

I have a tablespace that has an oldest version of 4 and a current version of 5. There is only one table in this tablespace.

I would like to clone this table, but receive an SQLCODE -148 REASON 09 when trying to add the clone.

Therefore, I ran a repair using the INSERTVERSIONPAGES SETCURRENTVERSION TABLESPACE, I also ran a reorg, did an image copy, and then ran a modify recovery, only retaining the LAST(1).

After following the above steps, I still get the -148 SQLCODE with a REASON 09 when trying to clone the tablespace, and the oldest version and current version did not change.

I did notice that the following message was received from the repair:
REPAIR INSERTVERSIONPAGES COMPLETED. NO VERSION PAGES NEED TO BE INSERTED.

Can someone tell me what I've missed?

Thanks for your help.


-----End Original Message-----
**This e-mail, including any attachments, may be confidential, privileged, or otherwise legally protected. It is intended only for the addressee. If you received this e-mail in error or from someone who was not authorized to send it to you, do not disseminate, copy, or otherwise use this e-mail or its attachments. Please notify the sender immediately by reply e-mail and delete the e-mail from your system.**
Attachments

  • image001.png (3.3k)

Michael Hannan

RE: Versions in Db2 for z/OS V11
(in response to Melanie Bowen)

Melanie,

From the manual:
"RETAIN works internally with a date, not a complete timestamp. As a result,
more copies might be kept than are specified by RETAIN. For example, if the
most recent five copies have been taken on the same day, and RETAIN LAST
(2) is specified, then all five copies remain in SYSCOPY."

I don't know if this is the cause but could be relevant.

Michael Hannan,
DB2 Application Performance Specialist