By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,247 Members | 1,273 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,247 IT Pros & Developers. It's quick & easy.

Online Tablespace restore from incremental backups

P: n/a
Raj
How can we do an online restore of a tablespace using the incremental
backup's? we are on a partitioned database...

Also, how could we use backup copy made by the load (using the copy to
option in load) to revover the tablespace?

Thanks,
Raj

Feb 27 '06 #1
Share this Question
Share on Google+
6 Replies


P: n/a
Raj
or even an an offline restore of a tablespace using the incremental
backup's, i can't find this info anywhere online...

Feb 27 '06 #2

P: n/a
Ian
Raj wrote:
How can we do an online restore of a tablespace using the incremental
backup's? we are on a partitioned database...
See http://tinyurl.com/orcr6, and also db2ckrst command.
Also, how could we use backup copy made by the load (using the copy to
option in load) to revover the tablespace?

This is done automatically by ROLLFORWARD. It recalls the load copy
files and "replays" the loads.
Feb 27 '06 #3

P: n/a
Life is really hard !!!
For question 1 from a command line:
D:\SQLLIB\BIN>db2 ? restore
RESTORE DATABASE source-database-alias { restore-options | CONTINUE |
ABORT }

restore-options:
[USER username [USING password]] [TABLESPACE [ONLINE] |
TABLESPACE (tblspace-name [ {,tblspace-name} ... ]) [ONLINE] |
HISTORY FILE [ONLINE] | LOGS [ONLINE] | COMPRESSION LIBRARY [ONLINE]]
[INCREMENTAL [AUTOMATIC | ABORT]] [USE {TSM | XBSA} [OPEN num-sess
SESSIONS]
[OPTIONS {options-string | options-filename}] |
FROM dir/dev [{,dir/dev} ... ] | LOAD shared-lib [OPEN num-sess SESSIONS]
[OPTIONS {options-string | options-filename}]] [TAKEN AT date-time]
[[TO target-directory] | [ON drive[{,drive}...][DBPATH ON drive]]]
[INTO target-database-alias] [LOGTARGET directory]
[NEWLOGPATH directory] [WITH num-buff BUFFERS] [BUFFER buffer-size]
[DLREPORT file-name] [REPLACE HISTORY FILE] [REPLACE EXISTING] [REDIRECT]
[PARALLELISM n] [COMPRLIB lib-name] [COMPROPTS options-string]
[WITHOUT ROLLING FORWARD] [WITHOUT DATALINK] [WITHOUT PROMPTING]

So:
db2 retore db mystuff tablespace(thatname) ONLINE INCREMENTAL AUTOMATIC from
.......
Automatic will then come back and prompt you for each image required in its
proper sequence.
For Question 2:
Retore your tablespace from the most recent backup prior to the load. It can
be full or incremental backup image.

D:\SQLLIB\BIN>db2 ? rollforward
ROLLFORWARD DATABASE database-alias [USER username [USING password]]
[TO {isotime [ON ALL DBPARTITIONNUMS] [USING LOCAL TIME] | END OF LOGS
[On-DbPartitionNum-Clause]}] [AND {COMPLETE | STOP}] |
{COMPLETE | STOP | CANCEL | QUERY STATUS [USING LOCAL TIME]}
[On-DbPartitionNum-Clause] [TABLESPACE ONLINE | TABLESPACE (tblspace-name
[ {,tblspace-name} ... ]) [ONLINE]] [OVERFLOW LOG PATH (log-directory
[{,log-directory ON DBPARTITIONNUM db-partition-number} ... ])] [NORETRIEVE]
[RECOVER DROPPED TABLE dropped-table-id TO export-directory]

On-DbPartitionNum-Clause:
ON {{DBPARTITIONNUM | DBPARTITIONNUMS} (db-partition-number
[TO db-partition-number] , ... ) | ALL DBPARTITIONNUMS [EXCEPT
{DBPARTITIONNUM | DBPARTITIONNUMS} (db-partition-number
[TO db-partition-number] , ...)]}

As the the tbspace rolls through the log, it will meet the load command with
the target of the copy to.
It will automatically access (make sure the path is available) and execute
the load then resume the roll forward.

HTH, Pierre.
--
Pierre Saint-Jacques
SES Consultants Inc.
514-737-4515
"Raj" <sp****@yahoo.com> a écrit dans le message de news:
11*********************@v46g2000cwv.googlegroups.c om...
How can we do an online restore of a tablespace using the incremental
backup's? we are on a partitioned database...

Also, how could we use backup copy made by the load (using the copy to
option in load) to revover the tablespace?

Thanks,
Raj


Feb 28 '06 #4

P: n/a
Raj
Thanks guys ...

Feb 28 '06 #5

P: n/a
Raj
Thanks guys ...

Feb 28 '06 #6

P: n/a
Raj
Thanks guys...

Feb 28 '06 #7

This discussion thread is closed

Replies have been disabled for this discussion.