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 > How to restore from backup created by Load..Copy Yes command

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 05-25-09, 07:40
MeeraJoy MeeraJoy is offline
Registered User
 
Join Date: Apr 2009
Posts: 16
How to restore from backup created by Load..Copy Yes command

I run the following command ...

load from mycursor of cursor replace into <table_name> copy yes to c:\test check pending cascade immediate

After running the command :
In folder C:\test , the following 2 files got created:
DBNAME.4.DB2.NODE0000.CATN0000.20090525163235.001
DBNAME.4.DB2.NODE0000.CATN0000.20090525163237.001

__________________________________________________ _________________

I understand that these two files create the backup of data during the Load

I tried using DB2 RESTORE command:
DB2 RESTORE DATABASE DBNAME FROM "C:\test" TAKEN AT 20090525163235 WITH 2
BUFFERS BUFFER 1024 PARALLELISM 1 WITHOUT PROMPTING


And got the error:
SQL2542N No match for a database image file was found based on the source
database alias "DBNAME" and timestamp "20090525163235" provided.


Please tell me what is the use of the two files created suring DB2 load.
And How exactly can I use it for recovery.

Last edited by MeeraJoy; 05-25-09 at 08:36.
Reply With Quote
  #2 (permalink)  
Old 05-25-09, 09:34
n_i n_i is offline
:-)
 
Join Date: Jun 2003
Location: Toronto, Canada
Posts: 4,449
The COPY YES option does not create a backup image, so you cannot use the RESTORE command the way you tried. The data collected by that option contains information that is necessary to roll forward the LOAD command. The proper way of restoring a database in this situation would be to RESTORE a backup image taken before the LOAD, then ROLLFORWARD to a point in time after the LOAD.
Reply With Quote
  #3 (permalink)  
Old 05-25-09, 09:36
db2girl db2girl is offline
∞∞∞∞∞∞
 
Join Date: Aug 2008
Location: Toronto, Canada
Posts: 1,816
You can't restore from this image. This image will be used by db2 during the rollforward.
Reply With Quote
  #4 (permalink)  
Old 05-25-09, 09:36
MeeraJoy MeeraJoy is offline
Registered User
 
Join Date: Apr 2009
Posts: 16
OK. I was trying to know the usability of the files created after I run the Load command
namely
DBNAME.4.DB2.NODE0000.CATN0000.20090525163235.001
DBNAME.4.DB2.NODE0000.CATN0000.20090525163237.001


What is the way, that gets used? and how?
Reply With Quote
  #5 (permalink)  
Old 05-25-09, 09:38
MeeraJoy MeeraJoy is offline
Registered User
 
Join Date: Apr 2009
Posts: 16
Quote:
Originally Posted by db2girl
You can't restore from this image. This image will be used by db2 during the rollforward.
So, is there any way the user can use it?.....by what command...?
Reply With Quote
  #6 (permalink)  
Old 05-25-09, 09:42
db2girl db2girl is offline
∞∞∞∞∞∞
 
Join Date: Aug 2008
Location: Toronto, Canada
Posts: 1,816
This image is only intended to be used by db2 itself during the rollforward. It will be read when db2 encounters a LOAD ...COPY YES log record.
Reply With Quote
  #7 (permalink)  
Old 05-25-09, 09:56
MeeraJoy MeeraJoy is offline
Registered User
 
Join Date: Apr 2009
Posts: 16
So once the Load command completes, these files still remain ,
So, are they of no use for an end user to use at all?
Reply With Quote
  #8 (permalink)  
Old 05-25-09, 10:00
db2girl db2girl is offline
∞∞∞∞∞∞
 
Join Date: Aug 2008
Location: Toronto, Canada
Posts: 1,816
Yes, they're for db2 internal use only, not for any end users at all.
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