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