Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
Database Servers
DB2InformixIngresMS SQLOraclePervasive.SQLPostgreSQLProgressSybase
Desktop Databases
FileMakerFoxProMS AccessParadox
General
General DB TopicsDatabase Theory
Related Topics
Java Development.NET DevelopmentVB DevelopmentMore Topics ...

Database Forum / DB2 Topics / February 2006

Tip: Looking for answers? Try searching our database.

Online Tablespace restore from incremental backups

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Raj - 27 Feb 2006 14:24 GMT
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
Raj - 27 Feb 2006 14:34 GMT
or even an an offline restore of a tablespace using the incremental
backup's, i can't find this info anywhere online...
Ian - 27 Feb 2006 20:26 GMT
> 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.
Pierre Saint-Jacques - 28 Feb 2006 01:46 GMT
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.
Signature

Pierre Saint-Jacques
SES Consultants Inc.
514-737-4515

> How can we do an online restore of a tablespace using the incremental
> backup's? we are on a partitioned database...
[quoted text clipped - 4 lines]
> Thanks,
> Raj
Raj - 28 Feb 2006 13:45 GMT
Thanks guys ...
Raj - 28 Feb 2006 13:46 GMT
Thanks guys ...
Raj - 28 Feb 2006 13:47 GMT
Thanks guys...
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.