Backup/restore of DB2 files using DFDSS

Buz W

Backup/restore of DB2 files using DFDSS
I thought I should be able to use DFDSS to quickly restore a test database to a point in time.

I stopped the database, DUMPed with DFDSS then started the database to get a backup. When the time came to restore, I again stopped the database, RESTOREd with DFDSS and started the database.

When I try to SELECT, I get an error indicating the DSNDBC dataset is not available.

I DUMPed the DSNDBC datasets with the SPHERE parameter. I RESTOREd the DSNDBC datasets with the SPHERE parameter.

What am I missing? Right now, the only way to get my data back is to re-load and this takes too long. I need to be able to drop this data back to a specific date several times per day during testing.

Thanks in advance for your help.

Buz Williams
Sophisticated Business Systems, Inc.
Dallas, TX

Deepak G. Gaikwad

Re: Backup/restore of DB2 files using DFDSS
(in response to Buz W)
Hello Buz,

What I guess is you probably got SQLCODE=-904 and Reason Code=00C2010D.
These are common when a TS is restored to some point of time outside DB2
without DB2 knowing of it. You should check for DSNB232I / LEVEL ID error
messages on Console. If you are getting these, you can run DSN1COPY-RESET
to accept the down-levelled TS and won't have -904.


Thanks & Regards,
Deepak G. Gaikwad




Buz W
<[login to unmask email]> To: [login to unmask email]
Sent by: DB2 Data cc:
Base Discussion Subject: Backup/restore of DB2 files using DFDSS
List
<[login to unmask email]
LASSOC.COM>


12/10/02 07:17 PM
Please respond to
DB2 Data Base
Discussion List






I thought I should be able to use DFDSS to quickly restore a test database
to a point in time.

I stopped the database, DUMPed with DFDSS then started the database to get
a backup. When the time came to restore, I again stopped the database,
RESTOREd with DFDSS and started the database.

When I try to SELECT, I get an error indicating the DSNDBC dataset is not
available.

I DUMPed the DSNDBC datasets with the SPHERE parameter. I RESTOREd the
DSNDBC datasets with the SPHERE parameter.

What am I missing? Right now, the only way to get my data back is to
re-load and this takes too long. I need to be able to drop this data back
to a specific date several times per day during testing.

Thanks in advance for your help.

Buz Williams
Sophisticated Business Systems, Inc.
Dallas, TX



David S Waugh

Re: Backup/restore of DB2 files using DFDSS
(in response to Deepak G. Gaikwad)
Buz -- Questions for you:

1. What is the error message you get when you try to SELECT?

2. Can you post your DUMP and RESTORE DFDSS commands for us to peruse?

3. Did you by any chance get "INVALID LEVEL ID" error messages out of DB2 when you tried to use these test databases after restore?

David Waugh, NCW
DSW Consulting & Services
Former DB2 Sysprog, now clueless DBA
===============
For all you fans of Assembler Language:
Newly proposed assembler instructions!
===============
CEMU Close eyes and monkey with user space
TDB Transfer and drop bits
UER Update and Erase Record
WBT Water binary tree
WEMG Write eighteen-minute gap


---------- Buz W <[login to unmask email]> writes:

I thought I should be able to use DFDSS to quickly restore a test database to a point in time.

I stopped the database, DUMPed with DFDSS then started the database to get a backup. When the time came to restore, I again stopped the database, RESTOREd with DFDSS and started the database.

When I try to SELECT, I get an error indicating the DSNDBC dataset is not available.

I DUMPed the DSNDBC datasets with the SPHERE parameter. I RESTOREd the DSNDBC datasets with the SPHERE parameter.

What am I missing? Right now, the only way to get my data back is to re-load and this takes too long. I need to be able to drop this data back to a specific date several times per day during testing.

Thanks in advance for your help.

Buz Williams
Sophisticated Business Systems, Inc.
Dallas, TX



Paul A Redhead

Re: Backup/restore of DB2 files using DFDSS
(in response to David S Waugh)


Buz,
I used to know all the intricacies of this in depth some time ago but my
memory is failing. Suffice to say that when the data is updated the LOG RBA
(LRSN ?) is stored in the pageset header and individual data pages and also in
DB2. A comparison of these is done on data access and if the don't gel you get
an unavailable resource. You need to run a REPAIR utility such as
REPAIR LEVELID TABLESPACE DBNAME.TSNAME
which, if my memory serves me, resets the RBA's in the pageset to 0's and DB2 is
happy with this.


Paul.





Buz W <[login to unmask email]> on 10/12/2002 23:47:12

Please respond to DB2 Data Base Discussion List <[login to unmask email]>

To: [login to unmask email]
cc: (bcc: Paul A Redhead/CorpServ/qdot/au)
Subject: Backup/restore of DB2 files using DFDSS



I thought I should be able to use DFDSS to quickly restore a test database to a
point in time.

I stopped the database, DUMPed with DFDSS then started the database to get a
backup. When the time came to restore, I again stopped the database, RESTOREd
with DFDSS and started the database.

When I try to SELECT, I get an error indicating the DSNDBC dataset is not
available.

I DUMPed the DSNDBC datasets with the SPHERE parameter. I RESTOREd the DSNDBC
datasets with the SPHERE parameter.

What am I missing? Right now, the only way to get my data back is to re-load and
this takes too long. I need to be able to drop this data back to a specific date
several times per day during testing.

Thanks in advance for your help.

Buz Williams
Sophisticated Business Systems, Inc.
Dallas, TX


************************************************************
Opinions contained in this e-mail do not necessarily reflect
the opinions of the Queensland Department of Main Roads,
Queensland Transport or National Transport Secretariat, or
endorsed organisations utilising the same infrastructure.
If you have received this electronic mail message in error,
please immediately notify the sender and delete the message
from your computer.
************************************************************

Shaun Lombard

Re: Backup/restore of DB2 files using DFDSS
(in response to Paul A Redhead)
... And for the brave you could set DSNZPARM DLDFREQ to zero to disable
down-level detection.

Shaun

-----Original Message-----
From: Paul Redhead [mailto:[login to unmask email]
Sent: Wednesday, December 11, 2002 11:48 AM
To: [login to unmask email]
Subject: Re: Backup/restore of DB2 files using DFDSS




Buz,
I used to know all the intricacies of this in depth some time ago
but my memory is failing. Suffice to say that when the data is updated
the LOG RBA (LRSN ?) is stored in the pageset header and individual data
pages and also in DB2. A comparison of these is done on data access and
if the don't gel you get an unavailable resource. You need to run a
REPAIR utility such as
REPAIR LEVELID TABLESPACE DBNAME.TSNAME
which, if my memory serves me, resets the RBA's in the pageset to 0's
and DB2 is happy with this.


Paul.





Buz W <[login to unmask email]> on 10/12/2002 23:47:12

Please respond to DB2 Data Base Discussion List
<[login to unmask email]>

To: [login to unmask email]
cc: (bcc: Paul A Redhead/CorpServ/qdot/au)
Subject: Backup/restore of DB2 files using DFDSS



I thought I should be able to use DFDSS to quickly restore a test
database to a point in time.

I stopped the database, DUMPed with DFDSS then started the database to
get a backup. When the time came to restore, I again stopped the
database, RESTOREd with DFDSS and started the database.

When I try to SELECT, I get an error indicating the DSNDBC dataset is
not available.

I DUMPed the DSNDBC datasets with the SPHERE parameter. I RESTOREd the
DSNDBC datasets with the SPHERE parameter.

What am I missing? Right now, the only way to get my data back is to
re-load and this takes too long. I need to be able to drop this data
back to a specific date several times per day during testing.

Thanks in advance for your help.

Buz Williams
Sophisticated Business Systems, Inc.
Dallas, TX


************************************************************
Opinions contained in this e-mail do not necessarily reflect the
opinions of the Queensland Department of Main Roads, Queensland
Transport or National Transport Secretariat, or endorsed organisations
utilising the same infrastructure. If you have received this electronic
mail message in error, please immediately notify the sender and delete
the message from your computer.
************************************************************


Notice:
The information contained in this e-mail message and any attached files may
be confidential information, and may also be the subject of legal
professional privilege. If you are not the intended recipient any use,
disclosure or copying of this e-mail is unauthorised. If you have received
this e-mail in error, please notify the sender immediately by reply e-mail
and delete all copies of this transmission together with any attachments.



Buz W

Re: Backup/restore of DB2 files using DFDSS
(in response to Shaun Lombard)
Paul,

You da man! That is exactly what I needed to do. I hadn't monkeyed with this process since DB2 v 4.1 and apparently 6.1 is a bit smarter than 4.1.

Thanks for everyone's input.

Buz

------------------------------

Date: Wed, 11 Dec 2002 10:47:57 +1000
From: Paul Redhead <[login to unmask email]>
Subject: Re: Backup/restore of DB2 files using DFDSS

Buz,
I used to know all the intricacies of this in depth some time ago but my
memory is failing. Suffice to say that when the data is updated the LOG RBA
(LRSN ?) is stored in the pageset header and individual data pages and also in
DB2. A comparison of these is done on data access and if the don't gel you get
an unavailable resource. You need to run a REPAIR utility such as
REPAIR LEVELID TABLESPACE DBNAME.TSNAME
which, if my memory serves me, resets the RBA's in the pageset to 0's and DB2 is
happy with this.


Paul.





Buz W <[login to unmask email]> on 10/12/2002 23:47:12

Please respond to DB2 Data Base Discussion List <[login to unmask email]>

To: [login to unmask email]
cc: (bcc: Paul A Redhead/CorpServ/qdot/au)
Subject: Backup/restore of DB2 files using DFDSS



I thought I should be able to use DFDSS to quickly restore a test database to a
point in time.

I stopped the database, DUMPed with DFDSS then started the database to get a
backup. When the time came to restore, I again stopped the database, RESTOREd
with DFDSS and started the database.

When I try to SELECT, I get an error indicating the DSNDBC dataset is not
available.

I DUMPed the DSNDBC datasets with the SPHERE parameter. I RESTOREd the DSNDBC
datasets with the SPHERE parameter.

What am I missing? Right now, the only way to get my data back is to re-load and
this takes too long. I need to be able to drop this data back to a specific date
several times per day during testing.

Thanks in advance for your help.

Buz Williams
Sophisticated Business Systems, Inc.
Dallas, TX


************************************************************