DB2v10.1 for ZOS. How to restore data from SLB into new table?

Oleg Dayneko

DB2v10.1 for ZOS. How to restore data from SLB into new table?

Hi!

I understand from experience that it would be very useful to be able to restore a table space from a copy to a new table space in a new table. Often, programmers are asked not to clean the data of the damaged table, but to restore it to a new table.

I have only BACKUP SYSTEM(SLB) on volumes or DUMP on tapes. 

Can I restore the data to the new table with utility restore?

For example(Allow to restore data only in corrupt table):

//RECOVTS JOB
//RECOVER EXEC DSNUPROC,SYSTEM=DBT1,
// UID=''
//DSNUPROC.SYSUT1 DD DSN=SORTTEST.SYSUT1,
// DISP=(MOD,DELETE,CATLG),
// SPACE=(TRK,(1000,1000),RLSE),
// UNIT=SYSDA,VOL=SER=DB2LOD
//DSNUPROC.SYSIN DD *
    RECOVER TABLESPACE MYDB2.MYTS1
    TORBA X'001E2DD1B67C'
    REBUILD INDEX(ALL) TABLESPACE MYDB2.MYTS1

Any help would be appreciated!

Philip Sevetson

DB2v10.1 for ZOS. How to restore data from SLB into new table?
(in response to Oleg Dayneko)
Oleg,

You can’t do it that way with DB2; you want to investigate DSN1COPY for laying down a DB2 COPY dataset in a different tablespace. It used to have a lot of limitations, so you’ll want to read the fine print.

That said, some of the third-party vendors may have offerings which can do this (recover a DB2 COPY dataset to a tablespace other than the source).

--Phil Sevetson

From: Oleg Dayneko [mailto:[login to unmask email]
Sent: Monday, January 28, 2019 8:28 AM
To: [login to unmask email]
Subject: [DB2-L] - DB2v10.1 for ZOS. How to restore data from SLB into new table?


Hi!

I understand from experience that it would be very useful to be able to restore a table space from a copy to a new table space in a new table. Often, programmers are asked not to clean the data of the damaged table, but to restore it to a new table.

I have only BACKUP SYSTEM(SLB) on volumes or DUMP on tapes.

Can I restore the data to the new table with utility restore?

For example(Allow to restore data only in corrupt table):

//RECOVTS JOB
//RECOVER EXEC DSNUPROC,SYSTEM=DBT1,
// UID=''
//DSNUPROC.SYSUT1 DD DSN=SORTTEST.SYSUT1,
// DISP=(MOD,DELETE,CATLG),
// SPACE=(TRK,(1000,1000),RLSE),
// UNIT=SYSDA,VOL=SER=DB2LOD
//DSNUPROC.SYSIN DD *
RECOVER TABLESPACE MYDB2.MYTS1
TORBA X'001E2DD1B67C'
REBUILD INDEX(ALL) TABLESPACE MYDB2.MYTS1

Any help would be appreciated!

-----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.**

Bill Gallagher

DB2v10.1 for ZOS. How to restore data from SLB into new table?
(in response to Oleg Dayneko)
The UNLOAD utility can unload data from an image copy to a sequential file. You can then load that sequential file to a new table.

Bill Gallagher | Senior Systems Engineer, DBA | Data Administration

[cid:[login to unmask email]

From: Oleg Dayneko <[login to unmask email]>
Sent: Monday, January 28, 2019 8:28 AM
To: [login to unmask email]
Subject: [DB2-L] - DB2v10.1 for ZOS. How to restore data from SLB into new table?


Hi!

I understand from experience that it would be very useful to be able to restore a table space from a copy to a new table space in a new table. Often, programmers are asked not to clean the data of the damaged table, but to restore it to a new table.

I have only BACKUP SYSTEM(SLB) on volumes or DUMP on tapes.

Can I restore the data to the new table with utility restore?

For example(Allow to restore data only in corrupt table):

//RECOVTS JOB
//RECOVER EXEC DSNUPROC,SYSTEM=DBT1,
// UID=''
//DSNUPROC.SYSUT1 DD DSN=SORTTEST.SYSUT1,
// DISP=(MOD,DELETE,CATLG),
// SPACE=(TRK,(1000,1000),RLSE),
// UNIT=SYSDA,VOL=SER=DB2LOD
//DSNUPROC.SYSIN DD *
RECOVER TABLESPACE MYDB2.MYTS1
TORBA X'001E2DD1B67C'
REBUILD INDEX(ALL) TABLESPACE MYDB2.MYTS1

Any help would be appreciated!

-----End Original Message-----
________________________________
This message (including any attachments) may contain confidential, proprietary, privileged and/or private information. The information is intended to be for the use of the individual or entity designated above. If you are not the intended recipient of this message, please notify the sender immediately, and delete the message and any attachments. Any disclosure, reproduction, distribution or other use of this message or any attachments by an individual or entity other than the intended recipient is prohibited.

TRVDiscDefault::1201
Attachments

  • image001.png (5.6k)

Oleg Dayneko

RE: DB2v10.1 for ZOS. How to restore data from SLB into new table?
(in response to Bill Gallagher)

Can I usage unload utility for backup that created by "BACKUP SYSTEM" utility?

Oleg Dayneko

RE: DB2v10.1 for ZOS. How to restore data from SLB into new table?
(in response to Philip Sevetson)

May be you knows some third-party utilities that work with SYSIBM.SYSCOPY table? In DB2 Administration Tool v10.2 I don't found this possibility.

J&#248;rn Thyssen

[AD] RE: DB2v10.1 for ZOS. How to restore data from SLB into new table?
(in response to Oleg Dayneko)

Hi Oleg,

You need a vendor tool to be able to UNLOAD a table from a SLB.

 

IBM Db2 Recovery Expert for z/OS can generate image copies from a SLB and register in SYSCOPY.
Once that have been completed you can run a UNLOAD from the IC, do DSN1COPY, etc.

In addition, IBM Db2 Recovery Expert have an feature "redirected recovery" that allows you to recover a table to a PiT under a new name. This can be useful for forensic purposes or for testing recoverability.

If the use case is more geared towards cloning, say, production data into a test environment the appropriate tool would be IBM Db2 Cloning Tool for z/OS.



In Reply to Oleg Dayneko:

May be you knows some third-party utilities that work with SYSIBM.SYSCOPY table? In DB2 Administration Tool v10.2 I don't found this possibility.


 

Best regards,

Jørn Thyssen

Rocket Software
77 Fourth Avenue • Waltham, MA • 02451 • USA
E: [login to unmask email] • W: www.rocketsoftware.com 

2018 IBM Champion.

Views are personal. 

Edit: Sorry, forgot [AD]

Edited By:
Jørn Thyssen[Organization Members] @ Jan 29, 2019 - 04:08 PM (Europe/Copenhagen)

steen rasmussen

DB2v10.1 for ZOS. How to restore data from SLB into new table?
(in response to Jørn Thyssen)
Since my countryman replied with a solution, I just want to make you aware that Broadcom (CA)  has solutions to generate a "normal" Db2 imagecopy from SLB as well, and then multiple options to unload/clone this into other objects.
Steen Rasmussen
On Tuesday, January 29, 2019, 10:07:47 AM EST, Jørn Thyssen <[login to unmask email]> wrote:


Hi Oleg,

You need a vendor tool to be able to UNLOAD a table from a SLB.

 

IBM Db2 Recovery Expert for z/OS can generate image copies from a SLB and register in SYSCOPY.
Once that have been completed you can run a UNLOAD from the IC, do DSN1COPY, etc.

In addition, IBM Db2 Recovery Expert have an feature "redirected recovery" that allows you to recover a table to a PiT under a new name. This can be useful for forensic purposes or for testing recoverability.

If the use case is more geared towards cloning, say, production data into a test environment the appropriate tool would be IBM Db2 Cloning Tool for z/OS.



In Reply to Oleg Dayneko:


May be you knows some third-party utilities that work with SYSIBM.SYSCOPY table? In DB2 Administration Tool v10.2 I don't found this possibility.






 

Best regards,

Jørn Thyssen

Rocket Software
77 Fourth Avenue • Waltham, MA • 02451 • USA
E: [login to unmask email] • W: www.rocketsoftware.com 

2018 IBM Champion.

Views are personal. 

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]
ESAi has well-regarded tools for Fast Cloning, Buffer Pool Tuning, Log Analysis, TDM & more.
BCV4, BCV5, BPA4DB2, ULT4DB2... modern power tools to get the job done faster & easier than ever.
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

Oleg Dayneko

RE: [AD] RE: DB2v10.1 for ZOS. How to restore data from SLB into new table?
(in response to Jørn Thyssen)

Yes, this tool really should help me.

I read information about IBM DB2 Recovery Expert for z/OS:

IBM DB2 Recovery Expert for z/OS, V3.2:

  • Extended the recovery capabilities to back out errant transactions
  • Facilitated the simulation of recovery by providing the capability to recover to an alternate object
  • Simplified the recovery process for applications by defining prioritizations for applications, which allows for better workload balancing and an alternate method of generating recovery operations
  • Enhanced system recovery by allowing users to create a Combined System Level Backup (CSLB) that includes one or more systems from one or more Database Management Systems (DBMSs)

Thank you all very much for your help!