If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > Backup database

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 01-06-04, 20:59
thanhtung2003 thanhtung2003 is offline
Registered User
 
Join Date: Jan 2004
Posts: 50
Backup database

Hi all,
I 'd like to create a database from backup image, please tell how can i do it?
Thanks
Reply With Quote
  #2 (permalink)  
Old 01-06-04, 21:11
gyuan gyuan is offline
Registered User
 
Join Date: Dec 2003
Posts: 454
store images

I'm not clear to your question. Do you want to create a new database to store the images?
Reply With Quote
  #3 (permalink)  
Old 01-06-04, 21:15
thanhtung2003 thanhtung2003 is offline
Registered User
 
Join Date: Jan 2004
Posts: 50
Re: store images

i mean that i 'd like to create a new database from backup image, please help me.
Thanks



Quote:
Originally posted by gyuan
I'm not clear to your question. Do you want to create a new database to store the images?
Reply With Quote
  #4 (permalink)  
Old 01-07-04, 02:27
nitingm nitingm is offline
Registered User
 
Join Date: Jul 2003
Location: Austin, TX, USA
Posts: 278
Restore Command

Hi,

Try this

db2 restore database <database name> from <backup-bath> to <new-location> into <new-alias>.

for e.g.

db2 restore database test from e:\db2bk to d: into newtest.

please check the restore command syntax for more details.

Cheers

Nitin
__________________
HTH

Nitin

Ask the experienced rather than the learned
Reply With Quote
  #5 (permalink)  
Old 01-07-04, 10:22
cchattoraj cchattoraj is offline
Registered User
 
Join Date: Mar 2003
Posts: 343
You need to do a redirected restore.

The sequence of events would be

restore database <source-dbname>
from/load <depending on where the backup is>
taken at <backup date and time>
to <target db directory>
into <target dbname>
newlogpath <target db logpath>
with <num buffers that source backup was taken with> buffers
buffer <buffer size that source backup was taken with>
redirect

You will have to know what the source db tablespaces were.

At this point, for every tablespace in the source database, the following must be issued
set tablespace containers for <tbspace id in src db>
using <sms or dms container path>

restore db <source dbname> continue

If this is an MPP system , this will have to be done for each node starting with the catalog node.

Hope this helps.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On