472,973 Members | 1,888 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,973 software developers and data experts.

regarding tablespace PIT recovery.

hi all,
i was working on DB2 and came across an issue. i.e. can a tablespace be
rollforwarded to POINT-IN-TIME?

the scenario is as follows:
i created a data base and a tablespace in it.
i have enabled archival logging (enabled userexit and logretain) and
changed log path to a different location.
as the log path and logging method was changed, the database was in
backup pending state. so, i took a complete offline backup of the
database (say image1 and time t1)
And then i created a table and inserted some records into it (say 10
and time t2)
now i took a complete online backup of database (say image2 and time
t3)
after the backup action, i inserted some more records (say 5 and time
t4)
now i dropped the table (time t5)
i was trying to restore table which i dropped. so, i restored the
tablespace from the backup image2 and rollforwarded it to time t4.
but there was a pop up saying that tablespace cannot be rollforwaded to
t4. it should be either till t5 or end of logs.
when i rollforwarded tablespace to end of logs or time t5, the table
was found to be missing still......
now, i restored whole database from backup image2 and rollforwarded to
time t4.
when i checked the list of tables available, i could see the table and
records till time t4.

IS THERE ANY WAY TO ROLLFORWARD TABLESPACE TO POINT-IN-TIME?

May 17 '06 #1
2 2713
You can always roll forward a tablespace to a PIT. The issue is that the
PIT an never be PRIOR to what it has been fixed for the tablespace.
This fixed time is determined by
A) The timestamp of the las backup if condition 2 is not met
2) The timestamp of the last DDL statement that was run against the
tablespace or any of its components.
Example`
Valid backup for TS1 exists at Time1
at Time2, alter table T1 in TS1, add a column (17 cols + 1). This also
updates the catalog tables.
at Time3, restore tablespace from backup image.
at Time3, roll forward restored tablespace, PRIOR to Time3. Command bounces
with your error message.
Why? The restored tablespace could not be rolled forward to the time chosen
because your table would show 17 cols, prior to alter which is where you
want to be. But the catalog tables SYSIBM.SYSTABLES shows 18 cols. and
SYSIBM.SYSCOLUMNS shows a column (the one you added) but it is not in the
restored, rolled forward tablespace. Ding, you lost because catalog always
wins.

Doing what you did at DATABASE level works, because both the tablespace and
the catalog tablespace are rolled forward together in sync.

Morale, tblspc. can be rolled forward to PIT byt always beyond their minimum
PIT. The minimum PIT can be found if you do:
db2 list tablespaces show detail
The last line will show it to you if it exists. If you don't see it then
the minimum PIT is the timestamp of the backup.

HTH, Pierre

--
Pierre Saint-Jacques
SES Consultants Inc.
514-737-4515
"Raghava" <cv*******@gmail.com> a écrit dans le message de news:
11**********************@i39g2000cwa.googlegroups. com...
hi all,
i was working on DB2 and came across an issue. i.e. can a tablespace be
rollforwarded to POINT-IN-TIME?

the scenario is as follows:
i created a data base and a tablespace in it.
i have enabled archival logging (enabled userexit and logretain) and
changed log path to a different location.
as the log path and logging method was changed, the database was in
backup pending state. so, i took a complete offline backup of the
database (say image1 and time t1)
And then i created a table and inserted some records into it (say 10
and time t2)
now i took a complete online backup of database (say image2 and time
t3)
after the backup action, i inserted some more records (say 5 and time
t4)
now i dropped the table (time t5)
i was trying to restore table which i dropped. so, i restored the
tablespace from the backup image2 and rollforwarded it to time t4.
but there was a pop up saying that tablespace cannot be rollforwaded to
t4. it should be either till t5 or end of logs.
when i rollforwarded tablespace to end of logs or time t5, the table
was found to be missing still......
now, i restored whole database from backup image2 and rollforwarded to
time t4.
when i checked the list of tables available, i could see the table and
records till time t4.

IS THERE ANY WAY TO ROLLFORWARD TABLESPACE TO POINT-IN-TIME?


May 17 '06 #2
Like Pierre explained below, you can only rollforward to a PIT that is
equal or greater to the MRT (minimum recovery time) of the tablespace,
this has to do with the need to keep the database objects definitions
in synch with the catalogs.

If all you're interested in is recovering the dropped table, I think
there is an option to rollforward that will export all of your table
data prior to processing the drop table log record. That data can then
be used to recreate your table after the completion of the rollorward.
Read up on the "recover dropped table" rollforward option here:
http://publib.boulder.ibm.com/infoce...e/r0001978.htm

Hope this helps,
Miro

May 18 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Vikrant | last post by:
On my DB2/UDB system, some tablespace 'Minimum recovery time' is 2000-11-19 or some '1999-10-04' or different, for some tablespace theres is no 'Minimum recovery time' , what does it tell me? ...
6
by: hikums | last post by:
How to accomplish a tablespace move from 32K to 4K page size on AIX 5.2, DB2 UDB 8.2? Enable forward recovery, take 32K tablespace backup, drop 32K tablespace, create 4K tablespace, restore to...
1
by: Raj | last post by:
How can we restore a tablespace from a Full backup to a new tablespace with out effecting the existing tablespace.. (can we use the redirect option in the backup command for tablespace recovery...
8
by: Raj | last post by:
-Is it possible to recover a tablespace just from a full offline backup and offline incremental backup? If not possible -Can we recover tablespace from Full backup , Wednesdays incremental backup...
4
by: Raj | last post by:
For tablespace level recovery of the db is the following strategy good enough? Sunday's Table - Full offline backup Mondays incremental to tape Monday's offline incremental backup + Monday's logs...
1
by: Sam Durai | last post by:
Env: DB2 v9.1 Server / Win XP. DB is enabled for Archival Logging. Was playing around with rebuild tablespace feature. My database 'CARD' has tablespace named t1,t2,t3. Taken couple of...
3
by: Troels Arvin | last post by:
Hello, A DB2 v. 8 DMS tablespace ran full. Subsequently, almost all data in the tablespace has been deleted, but "LIST TABLESPACES SHOW DETAIL" keeps stating that the tablespace has 0 free...
0
by: okonita | last post by:
Hi all, I am running a recover tocopy procedure and twice with different image copy I found this informational message AND no data recovered: DSNUCBAL - THE IMAGE COPY DATA SET...
0
by: Okonita | last post by:
Hi all, I am running a recover tocopy procedure and twice with different image copy I found this informational message AND no data recovered: DSNUCBAL - THE IMAGE COPY DATA SET...
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
2
by: DJRhino | last post by:
Was curious if anyone else was having this same issue or not.... I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...
0
by: Aliciasmith | last post by:
In an age dominated by smartphones, having a mobile app for your business is no longer an option; it's a necessity. Whether you're a startup or an established enterprise, finding the right mobile app...
2
by: giovanniandrean | last post by:
The energy model is structured as follows and uses excel sheets to give input data: 1-Utility.py contains all the functions needed to calculate the variables and other minor things (mentions...
4
NeoPa
by: NeoPa | last post by:
Hello everyone. I find myself stuck trying to find the VBA way to get Access to create a PDF of the currently-selected (and open) object (Form or Report). I know it can be done by selecting :...
1
by: Teri B | last post by:
Hi, I have created a sub-form Roles. In my course form the user selects the roles assigned to the course. 0ne-to-many. One course many roles. Then I created a report based on the Course form and...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 1 Nov 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM) Please note that the UK and Europe revert to winter time on...
3
by: nia12 | last post by:
Hi there, I am very new to Access so apologies if any of this is obvious/not clear. I am creating a data collection tool for health care employees to complete. It consists of a number of...
0
isladogs
by: isladogs | last post by:
The next online meeting of the Access Europe User Group will be on Wednesday 6 Dec 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, Mike...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.