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 > Recover/restore db2 database from files under node directory

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 02-24-10, 09:06
lalit_dba lalit_dba is offline
Registered User
 
Join Date: Apr 2009
Posts: 6
Recover/restore db2 database from files under node directory

Is there any way (other than normal backup/restore operation) to restore db2database using files in node directory (e.g C:\DB2\NODE0000) from one machine to another machine?
Reply With Quote
  #2 (permalink)  
Old 02-24-10, 10:24
ARWinner ARWinner is offline
Registered User
 
Join Date: Jan 2003
Posts: 3,575
No. The recommended method is backup and restore.

Andy
Reply With Quote
  #3 (permalink)  
Old 02-24-10, 12:29
sathyaram_s sathyaram_s is offline
Super Moderator
 
Join Date: Aug 2001
Location: UK
Posts: 4,534
It may be possible to use db2relocatedb , but as Andy says, backup and restore is the recommended option.
__________________
Visit the new-look IDUG Website , register to gain access to the excellent content.
Reply With Quote
  #4 (permalink)  
Old 02-24-10, 23:56
lalit_dba lalit_dba is offline
Registered User
 
Join Date: Apr 2009
Posts: 6
Thanks, I will check with db2relocatedb.
Reply With Quote
  #5 (permalink)  
Old 05-04-11, 04:01
grdfrsk grdfrsk is offline
Registered User
 
Join Date: May 2011
Posts: 3
Hi all, really old thread, but I am taking my chances

lalit_dba,

Any luck in this endeavor? I am facing a similar problem after a system crash and so far db2relocatedb has failed to help me...

Best regards,
Robert
Reply With Quote
  #6 (permalink)  
Old 05-04-11, 09:04
ARWinner ARWinner is offline
Registered User
 
Join Date: Jan 2003
Posts: 3,575
If your system crashed, then it is possible that the data on disk got corrupted so db2relocatedb will not work. You really should have used backup and restore.

Andy
Reply With Quote
  #7 (permalink)  
Old 05-04-11, 09:41
grdfrsk grdfrsk is offline
Registered User
 
Join Date: May 2011
Posts: 3
Many thanks for the quick reply, Andy.

The disk on the system is OK, the motherboard is not, however I have managed to retreive all files from the disk without problems so I do not think the files are corrupt in any way.

Problems arise with db2relocatedb when the database to be relocated it is not found in the database directory, according to message DBT1025N.

Robert
Reply With Quote
  #8 (permalink)  
Old 05-04-11, 09:45
ARWinner ARWinner is offline
Registered User
 
Join Date: Jan 2003
Posts: 3,575
What DB2 version and OS are you using? Please explain in detain what you are trying to do.

Andy
Reply With Quote
  #9 (permalink)  
Old 05-05-11, 07:04
grdfrsk grdfrsk is offline
Registered User
 
Join Date: May 2011
Posts: 3
The DB2-version is 9.5.0.808. Source OS is Windows Vista, target is Windows 7. As I mentioned before, the Vista system is dead and thus the instance on which the database resided does not exist anymore.

I have retreived the database folder and files from the Vista system harddrive and I want to recreate this database from these files.

I am using a relocadedb.cfg file in which I have experimented a little. One version I have tried looked like this (I have consulted the DB2 online help as well as google):

DB_NAME=NAME
DB_PATH=C:
INSTANCE=db2
NODENUM=0

Here is another one:
DB_NAME=NAME,NAME
DB_PATH=C:,C:
INSTANCE=db2inst1,db2inst1
NODENUM=0

However, both these files render the same message (DBT1025N).

To me it seems like there is no way of using db2relocatedb for databases that no longer exist within a running db2 instance, but I might ofcourse be mistaken.

Once more, many thanks for all help.

Robert
Reply With Quote
  #10 (permalink)  
Old 05-05-11, 07:37
n_i n_i is offline
:-)
 
Join Date: Jun 2003
Location: Toronto, Canada
Posts: 4,449
I'd try copying the files to the target system using exactly the same directory structure as in the old system. Assuming you have installed DB2 and created a new instance using all the same parameters as before, issuing CATALOG DB whatever ON C: might just work.
Reply With Quote
  #11 (permalink)  
Old 05-05-11, 15:38
rajaraja_cholan rajaraja_cholan is offline
Registered User
 
Join Date: Dec 2008
Posts: 31
you may try to follow database mirroring pocedure. In db mirroring, you copy the filesystems/disks from source to target and initialize the target as mirror
Reply With Quote
  #12 (permalink)  
Old 05-05-11, 15:59
ARWinner ARWinner is offline
Registered User
 
Join Date: Jan 2003
Posts: 3,575
Quote:
Originally Posted by rajaraja_cholan View Post
you may try to follow database mirroring pocedure. In db mirroring, you copy the filesystems/disks from source to target and initialize the target as mirror
This will only work if the data on the disk is in a steady state (WRITE SUSPEND or deactivated DB).

Andy
Reply With Quote
  #13 (permalink)  
Old 05-06-11, 11:15
rajaraja_cholan rajaraja_cholan is offline
Registered User
 
Join Date: Dec 2008
Posts: 31
Quote:
Originally Posted by ARWinner View Post
This will only work if the data on the disk is in a steady state (WRITE SUSPEND or deactivated DB).

Andy
Yes, that is true, good catch!!
Reply With Quote
Reply

Tags
backup, recover, unconventional restore

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