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 > LOAD REPLACE vs LOAD RESUME NO

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old
Registered User
 
Join Date: Feb 2009
Posts: 9
Question LOAD REPLACE vs LOAD RESUME NO

Hi,

I have this confusion since long time.
Could you please advise why there is a need for load resume NO.

afterall, if the tablespace is empty we can happily go with load replace.

is there any scenario where we need to especially use load resume NO?

Please educate. Thank you.
Reply With Quote
  #2 (permalink)  
Old
Registered User
 
Join Date: Sep 2004
Location: Belgium
Posts: 1,126
Quote:
Originally Posted by tataforums
Could you please advise why there is a need for load resume NO.
There are three possible LOAD scenarios for a tablespace:
(1) tablespace is empty and you have all new data in an external file
(2) tablespace is not empty; you want to empty it first, then do (1)
(3) tablespace is not empty; you have additional data to be added to it (like a set of INSERTs)

RESUME NO is the default; it makes sure that you're in situation (1) so that you won't accidentially do (2) or (3) which are either nonrecoverable (2) or difficult to recover (3) unless you fall back to an image copy.

Otherwise said: the default makes sure you don't do stupid things.

Combined with REPLACE, you explicitly tell DB2 you want scenario (2), which is of course also not a RESUME. So REPLACE goes together with RESUME NO.

RESUME YES tells DB2 you want to resume, i.e., continue with, the data already present in the table, i.e. you go for appending (scenario 3).
This is of course incompatible with RESUME YES.
__________________
--_Peter Vanroose,
__IBM Certified Database Administrator, DB2 9 for z/OS
__IBM Certified Application Developer
__ABIS Training and Consulting
__http://www.abis.be/
Reply With Quote
  #3 (permalink)  
Old
Registered User
 
Join Date: Feb 2009
Posts: 9
Smile Thank you peter



Thanks for your time and a good explanation.
Reply With Quote
  #4 (permalink)  
Old
Registered User
 
Join Date: Apr 2012
Posts: 2
load resume yes

Hello Peter,

My case is another situtation which you didnt mentioned in above 3 condition, which is:
4) My tablespace/ table is not empty; I have Few data which will update/ replace A PART OF some existing data to it (like a set of UPDATEs)
Pls suggest me a suitable load option for this scenario!!!
Reply With Quote
  #5 (permalink)  
Old
Super Moderator
 
Join Date: Aug 2001
Location: UK
Posts: 4,649
You cannot use LOAD utility to update records.

LOAD is designed for speed to format records and 'dump' directly into the tablespace pages bypassing the "SQL layer"


==
__________________
Visit the new-look IDUG Website , register to gain access to the excellent content.

Last edited by sathyaram_s; 04-25-12 at 11:56.
Reply With Quote
  #6 (permalink)  
Old
Registered User
 
Join Date: Apr 2012
Posts: 2
Thanks Sathya

Thanks Sathya for the confirmation!!
Reply With Quote
  #7 (permalink)  
Old
Window Washer
 
Join Date: Nov 2002
Location: Jersey
Posts: 10,322
You should start a new thread...but let's say you have LOTS of Data and you need to apply updates to, and then you need to load new data

And let's also assume you have 1 table in the tablespace

And there's no RI

I would, Unload the Data using SQL, modifying the columns I wanted, into a file

I would then concat that file with the new file and do a LOAD REPLACE
__________________
Brett
8-)

It's a Great Day for America everybody!

dbforums Yak CorralRadio 'Rita
dbForums Member List
I'm Good Once as I ever was

The physical order of data in a database has no meaning.
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